We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
Assignment No. 1
Total Marks: 20
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
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:
Employee class must have the following member methods:
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.
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.
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 email@example.com
+ Click Here To Join also Our facebook study Group...How to Join Subject Study Groups & Get Helping Material?..
.+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)