We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

CS506 - Web Design and Development Assignment no 02 Solution And Discussion due date Dec 11, 2015

+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..


See Your Saved Posts Timeline

Views: 21562

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Attachments:

Replies to This Discussion

Lets Discuss Students ...

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

Assignment No. 02 Fall 2015 CS506- Web Design and Development

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 corrupt.
  • The assignment is fully or partially copied from (other student or ditto copy from handouts or internet).
  • The assignment is not submitted in .java format.

 

Uploading instructions

Your submission must include:

 

  1. You have to make a zip file which contains one java file and one text file and upload it on VULMS.

 

Note:Use Notepad or Notepad++ for coding and JDK package for java source code compilation and running (guideline document on JDK installation and configuration is given in course download section). You can also use IDE such as Eclipse or NetBeans.

Objective

 

The objective of this assignment is to

  • Give you some practice exercise of Classes and Objects. And how to compile and run java programs.
  • Understand the concept of Streams in java
  • Develop GUI (Graphical User Interface) in java

 

 

 

 

 

 

 

Problem Statement:                                                          

You are required to write a java program which contains two classes named as “Student” and “Test” and one text file named as input.txt.

 

Student class must have the following data members:

  • Name
  • Roll No
  • Marks

Student class must have the following member methods:

  • Default constructor
  • Parameterized constructor
  • Getter functions for each data member

Detailed Description:

Default constructor: The default constructor will initialize data members of Student class to default values (int values to 0 and String values to null).

Parameterized constructor: It should take three parameters (Name, Roll No and marks) andset the values of data members with the passed parameters.

Getter Functions: You will have to define the getter function for each data member (Name, Roll No, marks). There will be a separate getter function for each data member. Such as getName(), getRollNo() and getMarks()

 

Input text file contains the Student data which has three columns and as many rows as you want. First column contains student name, second column contains student roll no and third column contains student marks. All three columns are separated by space.

Ali 1 70

Ahmad 2 60

Ayesha 380

Hina 490

Sana 5 50

input.txt

 

Testis a public driver class that contains the main() method. The name of your file should be Test as it is a public class in your program.

Within main() method, you are required to read the Student record one by one from input.txt file and then display the student information (name, roll no, marks) on the command prompt and GUI (Graphical User Interface). You have to display the information in the same format as was in input.txt file.

You are also required to calculate the average marks of students and then display it on the command prompt and GUI as shown in the sample output given below.

 

Sample Output:

Output on Command Prompt

 

Output on GUI

        

 

Note: Program must have the flexibility that if you change data of input.txt file then there is no need to change the code. 

 

Deadline

Your assignment must be uploaded/submitted at or before 11th Dec, 2015.

 

 

For any query about the assignment, contact at cs506@vu.edu.pk

 

Hi Fellows,

Here is the 75% working solution. Try remaining part yourself... 

import java.io.*;

class Student{
String name;
int rollno;
int marks;

public Student(){
name = "Atlas";
rollno = 24;
marks = 78;
}

public Student(String name, int rollno, int marks){

}
}

public class Test{
public static void main(String args[]){
try{
FileReader fr = null;
BufferedReader br = null;

fr = new FileReader("C:/Users/Atlas_Gondal/Desktop/input.txt");
br = new BufferedReader(fr);

String line = br.readLine();

while(line != null){
System.out.println(line);
line = br.readLine();
}

fr.close();
}
catch(IOException e){
System.out.println("o teri, file's not found!");
}
}
}

Attachments:

Thanks for sharing 

i try my best do complete but some one given hit how can do next

Almost completed ...........

just out is shown on GUI 

for hint see the hand out lecture no 8 page 87

JDK instal kr lea hy all process ho gea hy but notpad p likh k kesy CMD p compil krty hn.progrm compile kesy krty hn kindly koi bta dy

how to compile and run program written in notepade

https://www.youtube.com/watch?v=Y5iUfodednY

video dekho sb smj a jaye ge agr phir b smj na aye to btana

somone tell how can w calculate average in such situation where we read data through streams

RSS

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

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