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


+ Link For Assignments, GDBs & Online Quizzes Solution


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

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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






+ How to Follow the New Added Discussions at Your Mail Address?

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

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 21152


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

Replies to This Discussion

salman bhai faisalrazzaque@gmail.com



Latest Activity

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

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