Java Program

Nov 21st, 2015
Anonymous
Category:
Calculus
Price: $5 USD

Question description

For this assignment, we will work with the employee program. See the provided files. ((((I will copy the files to the end of the PROJECT))))))

  1. Class Employee will represent the superclass. This class is an example of re-use in your object-oriented design.
  2. Class StudentEmployee will be derived from the Employee class. It should have fields to hold the following information:
Parameters Descriptions 
hoursWorked The number of hours worked in the current two-week pay period 
isWorkStudy True is the student is eligible for work study status; false otherwise 
payRate The student's hourly pay rate 

Mou icon

Q1. Create the StudentEmployee as a child class of Employee(you need to override the constructor).

Q2. Read the list of student employees from semployee.csv and store them into a ArrayList.

Q3. Interact with your user through command-line run arguments.

commands Actions 
show display every the student employee's information (id, rate, etc.) 
add add a new student employee (user needs to provide the require informations)
remove remove one or more student employees (user need to provide ids) 
sort-by-name sort the list of student employees by their names
sort-by-rate sort the list of student employees by their hourly rate
student-isWorkStudy show all the students that are eligible for work study status
show-highest show the student employee with highest hourly rate
show-lowest show the student employee with lowest hourly rate
change-rate id/name xxx user input the student employee's name or id, the program change its rate to xxx
rate x y (bonus) show the student employees that with the hourly rate between x and y.
###########################################################################

Files::::

1. Filename ******Employee.java******

public class Employee
{
//Private instance variable fields
   private String employeeName;
   private int employeeId;
   private boolean isWorking;   // true if currently working; false otherwise
        
// Constructor - All args passed in as Strings
    public Employee(String name, String id, String isworking) {
      employeeName = name;
      employeeId = Integer.parseInt(id);
      isWorking = Boolean.parseBoolean(isworking);
   }

    public String getName() {
      return employeeName;
   }
   
    public void setName(String name) {
      employeeName = name;
   }

    public int getEmployeeId() {
      return employeeId;
   }
   
    public void setEmployeeId(int id) {
      employeeId = id;
   }

    public boolean isWorking() {
      return isWorking;
   }

    public void setIsWorking(boolean employed) {
      isWorking = employed;
   }
   
    public String toString() {
      return employeeName + "\t" + employeeId + "\t" + isWorking;
   }
}
 2. Filename *******semployees.csv*********

Stan Stanley,123456789,TRUE,19,FALSE,10.95
Ralph Maccio,258866445,TRUE,15,FALSE,9.55
Julie Andrews,112222445,FALSE,0,FALSE,7.25
Janice Young,558844115,TRUE,19,TRUE,11.75
Annie Song,532120049,FALSE,10,TRUE,14.55
Charles Castro,449032259,TRUE,12,TRUE,7.25
Ruby Johnson,602938575,FALSE,14,TRUE,9.92
Angela Jones,572656432,TRUE,12,TRUE,15.24
John Erwin,986276422,FALSE,20,FALSE,16.70
Socorro Gibson,762844562,TRUE,27,FALSE,13.3


Tutor Answer

(Top Tutor) Studypool Tutor
School: UC Berkeley
PREMIUM TUTOR

Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1821 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors