Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

Assignment No. 03
Semester Spring 2019

CS508- Modern Programming Languages

 

Total Marks: 20

 

Due Date:July31, 2019

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit  if:

·         The assignment is submitted after due date.

·         The submitted assignment does not open or file is corrupt.

·         The assignment is completely or partially copied from (other student, handouts or internet).

·         Student ID is not mentioned in the assignment File or name of file is other than student ID.

·         The assignment is not submitted in .rar format.

Uploading instructions

Your submission must include:

·         Assignment should be in .rar format.

·         Save your assignment with your ID (e.g. bx180200786.rar).

Objective

The objective of this assignment is to give hands on practice on Java programming language.

 

Lectures Covered: This assignment covers Lecture # 27 – 33

Deadline

Your assignment must be uploaded/submitted at or beforeJuly31, 2019.

 

Problem Statement:

 

Make sure to write your id on top of the code file (As shown in the gif file) otherwise your assignment will not be accepted.

Create a console application in java, where you will input a paragraph and also input some words and application will match all the words in the given paragraph to output success or failure for all words.

1.      First the paragraph will be inserted.

2.      Next the user will be asked to input words.

3.      Words will be inserted all at once without any space between the words, and words will be comma separated (example shown in the gif file).

4.      The application will check each word in the given paragraph and will output success or frailer for each word on a separate line checking must be case sensitive.

You can install NetBeans IDE or simple java Compiler to develop application.

 

Output.gifhas been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.

Submission details

Following Files Must be submitted in a single .zip or .rar file.

·         Code file(s) .java file only

·         A .gif file which shows working of your Application(For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)

You are not required to submit the complete project, only copy these files from project folder. Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.

If you do not submit any of the above mentioned file 50% marks per file will be deducted.

 

 

Views: 4033

Attachments:

Replies to This Discussion

its complete for code check comments

file kis format main send krni ha. kindly tell me anyone 

agar apka pass code ha to plz send kr dain mera wala work ni kr raha

wrong output.

it works only for 1 word. 

not whole paragraph

which software is used for this assignment and where to put code?

Netbeans 

https://netbeans.org/downloads/8.1/

download last 215mb 

create new project and run.

apke pas sai code of software ha jis per gif ban jaye?

yr koi to bata dya gif ka sath kis format main code send krna ha aur kasa??????

ok thanks bro

Kisi ke pas sai code or tareeka ha to btao yr. 2 ganty reh gaye hain

Correct code of cs508 assignment by Riz Mughal

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("your id:");
System.out.println("Input Paragraph: ");
String paragraph = scanner.nextline();
System.out.println("Enter words comma sperated");
String words = scanner.nextline();
String[] word = words.split(",");
for (int i = 0; i < word.length; i++){
if ( paragraph.toLowerCase().contains(word[i].toLowerCase()) ) {
System.out.println("The word : '"+word[i]+"' Exist in the paragraph");
} else {
System.out.println("The word : '"+word[i]+"' does not Exist in the paragraph");
}
}

}}

ye b sai code ni error a rha ha

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service