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

kindly share your code here

package main;

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

System.out.println("My ID is bcxxxxxxxxx");
System.out.println("Enter the Input Paragraph");
Scanner s = new Scanner(System.in);
String input = s.nextLine();

System.out.println("Enter the Input Word");
String word = s.nextLine();

String str = "";
int occurance = 0;
for(char c : input.toCharArray()) {
str += c;
if(str.length() == word.length()) {
if(str.equals(word)) {
occurance ++;
}

str = str.substring(1);
}
}

if(occurance > 0)
System.out.println("The word is exist");
else
System.out.println("The word is not exist");
}
}

Solution Idea

ye code compile  ho jata ha pr run time pr error aa jata ha...

error ha main class is not find

koi btae is ka kia hal ha..

Please give us the code of this program

Code run b ho jata ha or compile b ... par jab paragraph enter karty ha or us ka bad jab words enter karty ha find karny ka liye ka is ma exist karta ha ya nahi to agar aik he word likho ga to sahi btay ga ka word exist karta ha ya nahi magar jab 2 ya zyada words enter karty ha comma separated ka sath to jawab ghalat data ha har bar yahi kahta ha ka words exist nahi karty.

Sir plz code upload kr dain plz sir

public static void main(String[] args) {

 

System.out.println("My ID is bcxxxxxxxxx");

System.out.println("Enter Paragraph");

Scanner s = new Scanner(System.in);

String input = s.nextLine();

 

System.out.println("Enter comma separated words");

String word = s.nextLine();

 

String str = "";

int occurance = 0;

for(char c : input.toCharArray()) {

str += c;

if(str.length() == word.length()) {

if(str.equals(word)) {

occurance ++;

}

 

str = str.substring(1);

}

}

 

if(occurance > 0)

System.out.println("The word is exist");

else

System.out.println("The word is not exist");

}

}

CS508 kidr hain,idea solution 
public static void main(String[] args) {

System.out.println("My ID is bcxxxxxxxxx");
System.out.println("Enter Paragraph");
Scanner s = new Scanner(System.in);
String input = s.nextLine();

System.out.println("Enter comma separated words");
String word = s.nextLine();

String str = "";
int occurance = 0;
for(char c : input.toCharArray()) {
str += c;
if(str.length() == word.length()) {
if(str.equals(word)) {
occurance ++;
}

str = str.substring(1);
}
}

if(occurance > 0)
System.out.println("The word is exist");
else 
System.out.println("The word is not exist");
}
}

#Cs508 step by step idea solution

Where is code and software link. today is extended day.

Dear this code is not complete working

#Cs508 Assig Solution 

RSS

Looking For Something? Search Below

Latest Activity

Mani Siddiqui replied to Mani Siddiqui's discussion شرم
4 minutes ago
iffi liked Mani Siddiqui's discussion شرم
5 minutes ago
iffi replied to Mani Siddiqui's discussion شرم
5 minutes ago
Mani Siddiqui posted discussions
7 minutes ago
+ !! Ήලᵯᵯℹ Ⲥⱨ !! +!! liked Mani Siddiqui's discussion بہتر کی خواہش
9 minutes ago
Profile IconTaimoor Hussain, Arslan and Tehreem Fatima joined Virtual University of Pakistan
17 minutes ago
iffi liked Mani Siddiqui's discussion بہتر کی خواہش
3 hours ago
iffi liked AS(SE#3)'s discussion saza
3 hours ago

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

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