Mandatory Programming Project Project Description The goal of this simple payrol
ID: 3920949 • Letter: M
Question
Mandatory Programming Project Project Description The goal of this simple payroll system project is twofold: a) serve as a case-study and b) give students the opportunity to connect the dots and implement a full-fledged (albeit simple) application using most of Object-Oriented Programming. Understanding this project, by implementing, testing and debugging it, should provide students with the necessary OOP foundation (classes, information hiding, inheritance and polymorphism) so widely used in real-world applications nowadays. The project, spanning across a few chapters, is developed on a step-by-steip basis, starting in unit 5, moving on to inheritance and polymorphism and finally putting it all together in unit 8. All you have to do is to follow the step-by-step instructions, creating your own application and submitting your project via Moodle. At the end of unit 8, you should have a program for a Simple Payroll System in Java that: Keeps a list of employees: Id, Name, Vehicle in the parking lot (if applicable) Enter and save the payroll information: Salary, Bonus, Hourly rate, worked hours Store employee information to an ArrayList. Calculate the payroll Unit 5- The first step is to create the necessary classes to the project: Employee, PartTime, FullTime and Vehicle. The main application, which makes use of those classes, is also created here (PayrollSystem). Creating classes and start working with inheritanceExplanation / Answer
As asked, Unit 5 is complete
Employee Class:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package payrollsystem;
/**
*
* @author Ayush
*/
public abstract class Employee {
private int ID;
private String Name;
private Vehicle vehicle;
/**
* @return the ID
*/
public int getID() {
return ID;
}
/**
* @param ID the ID to set
*/
public void setID(int ID) {
this.ID = ID;
}
/**
* @return the Name
*/
public String getName() {
return Name;
}
/**
* @param Name the Name to set
*/
public void setName(String Name) {
this.Name = Name;
}
/**
* @return the vehicle
*/
public Vehicle getVehicle() {
return vehicle;
}
/**
* @param vehicle the vehicle to set
*/
public void setVehicle(Vehicle vehicle) {
this.vehicle = vehicle;
}
}
FullTime class:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package payrollsystem;
/**
*
* @author Ayush
*/
//Inherits properties of Employee class
public class FullTime extends Employee {
}
PartTime class:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package payrollsystem;
/**
*
* @author Ayush
*/
//Inherits properties of Employee class
public class PartTime extends Employee{
}
Vehicle class:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package payrollsystem;
/**
*
* @author Ayush
*/
public class Vehicle {
}
PayRoll System:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package payrollsystem;
/**
*
* @author Ayush
*/
public class PayrollSystem {
/**
* @param args the command line arguments
*/
public static void main(String[] args)//program execution starts from here
{
// TODO code application logic here
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.