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

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.

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

 

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

 

Deadline

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

 

 

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

GOOD LUCK

 

 

 

 

+ Click Here To Join also Our facebook study Group.

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


See Your Saved Posts Timeline

Views: 21090

.

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

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

Replies to This Discussion

salman bhai faisalrazzaque@gmail.com

faisalrazzaque@gmail.com

RSS

Latest Activity

+ M.Tariq Malik added a discussion to the group STA644 Non-Parametric Statistics
12 seconds ago
+ M.Tariq Malik added a discussion to the group STA643 Experimental Designs
21 seconds ago
+ M.Tariq Malik added a discussion to the group STA642 Probability Distributions
33 seconds ago
+ M.Tariq Malik added a discussion to the group STA641 - Statistical Packages and its Applications
42 seconds ago
+ M.Tariq Malik added a discussion to the group STA632 Sampling Techniques
53 seconds ago
+ M.Tariq Malik added a discussion to the group STA631 Inferential Statistics
1 minute ago
+ M.Tariq Malik added a discussion to the group STA630 Research Methods
1 minute ago
+ M.Tariq Malik added a discussion to the group STA621 Time Series Analysis
1 minute ago

Today Top Members 

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

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