Question: Create a class called Employee that includes three pieces ofinformation as instance variables a first name ( type String),a last name (type String), and a
Create a class called Employee that includes three pieces ofinformation as instance variables a first name ( type String),a last name (type String), and a monthly salary(double). class should have a constructor thatinitializes the three instance variables. Provide a set and getmethod for each instance variable. If the monthly salary is notpositive, set it to 0.0. Write a test application namedEmployeeTest that demonstrates class Employee's capabilities.Create two Employee objects and display eash object's yearlysalary. Then give each Employee a 10% raise and display eachEmployee's yearly salary again. Create an HourlyEmployee class to store the employee data and calculatePay method. Add class variables and getters/setters for firstName, lastName, empNumber, hours and payRate. Add calculatePay method that returns the total including overtime pay.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
