We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 1

Spring 2016
CS506- Web Design and Development

Total Marks: 20

Due Date:18/05/16


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 (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

  • 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 classesnamed as “Employee” and “Test” and one text file as input.txt.

Note: There should be single java file which contains both classes.

Employee class must have the following data members:

  • empId
  • empName
  • costPrHour
  • salary

Employee class must have the following member methods:

  • Parameterized constructor
  • Getter functions for each data member

Detailed Description:

Parameterized constructor: It should take four parameters (empId, empName, costPrHour, salary) andset the values of data members with the passed parameters.

Getter Functions: You will have to define the getter function for each data member (empId, empName,costPrHour, salary). There will be a separate getter function for each data member. Such as getEmpID(), getEmpName(),getCostPrHour() and getSalary( ).

Input text file contains the Employee data which has three columns and as many rows as you want. First column contains EmployeeempId, second column contains EmployeeempNameand third column contains EmployeeCostprHour. All three columns are separated by space.

1 Ali 100

2 Noman 200

3 waqar 300

4 Toqeer 400

5 Waqas 500




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 enter the  value of working hours in a week 

and read the Employee record one by one from input.txt file.

Calculate the monthly Salary of each employee based on the working hours in a week and cost per hour.

salary = costPrHour*workinghoursprweek*4;

then display the Employee information (empId, empName, costPrHour, salary) 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.


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. 



Your assignment must be uploaded/submitted at or before 18thMay, 2016.



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






+ 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)

Views: 21206

Replies to This Discussion

kn bnara ae assgnmnt n kb????? 

Assignment almost completed

just thinking if i use JLabel/JTextArea for inserting the Data stored in Line variable in GUI.

JTextArea bhai ap please coding share kar do 

If you are saying it hard assignment then we should pray 4 ur futre :)
Any one who did cs201 by himself any prog subject is child play 4 him

I know sir sorry for that I am also doing my programming but still I am confusing because I am weak in programming because every human have different mind and thinking If you field is programming my field is database and networking different people different mind thank you for praying me for my future and I will also pray for you for your future and again SORRY to every body.

Assalam-a-Alikum Sir ap takh tha ka assignment hard nahi hai SORRY I was wrong Because when I was doing my coding I is easy like C++ but this is difficult to calculate when I was writing Test class its difficult putting Try{} and catch{} it is new concept I got errors but assignment is easy SORRY AGAIN pray for me that I we complete my degree I will also pray for you. My major field which I like it is NETWORKING and DATABASE and my software skills and coding is weak that's why I said hard SORRY and thank you all who post their assignment to help us to complete our assignment and tell us our mistake BEST OF LUCK for the Future Waiting for you reply.

sir kindly koi link send krein jis sy setup properly download ho sky r  assignment k bhry ma sochna b suru krein gy jb setup (software ho ga to na 

Hard assignment but we have to help each other share your problem and complete your assignment also share it thank you and best of luck

Allah ka naam ly k assignment strt kro

software i setting nhi ho rahi java ki

try Google to get quick support.


Looking For Something? Search Here

Today Top Members 


This is a member-supported website. Your contribution is greatly appreciated!

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

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