+ Link For Assignments, GDBs & Online Quizzes Solution |
+ Link For Past Papers, Solved MCQs, Short Notes & More |
Tags:
+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)
+ Click Here to Search (Looking For something at vustudents.ning.com?) + Click Here To Join (Our facebook study Group)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:
Your submission must include:
Note:Use Notepad or Notepad++ for coding and JDK package for java source code compilation and running (A guideline document on JDK installation and configuration is given in course download section). You can also use IDE such as Eclipse or NetBeans.
The objective of this assignment is to
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:
Student class must have the following member methods:
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!");
}
}
}
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
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We are user-generated contents site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post