Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in java Paragraph ou want to dlOWJQa you to keep tikkifkf Of etnlOyees_ reviewing your employee list, you notice that your employees fall

Please do in java
image text in transcribed

Paragraph ou want to dlOWJQa you to keep tikkifkf Of etnlOyees_ reviewing your employee list, you notice that your employees fall into two categories: Salaned and Hourly - The follovang table shows the informauon that is stored for each type of employee. styles billate the ernP169-eLi array withfhfIIowm re6FcEby creating an appropriate Instance of either the Salaried or Hourly class for each employee and then add the instance to the array. The employees should be added to the employeeList array in the order that they are listed, A1 should be at index 0, Kelly should be at index 1, etc. Field id title position hourlyRate Data Type String double Salaried x x x Hourly x x x x O. 2. 3. 5. A salaried employee named A1 who is the Manager and is paid $60,000 per year_ An hourly employee named Kelly who is a Hostess and is paid $25.75 per hour. A salaried employee named Peggy who is the CEO and is paid $120,000 per year_ An hourly employee named Bud who is a Busboy and is paid S15.00 per hour. An hourly employee named Marcy who is a Server and is paid Sl 0_00 per hour. An hourly employee named Jefferson who is a Cook and is paid $35.00 per hour. a NeBeans project using the following naming convention: The project name will: Start with the assignment prefix, in this case Lab 101 _ The prefix is followed by a dash character The dash is followed by your last n.ame Your last name is followed by your Krst initial Your first initial is followed by your middle initial For example, for this assignment my project would be named Lab101 -LatimerJB o Note, no student should tum in a project named Lab101-LatimeTJB In this project create three classes named Employee. Salaried and Hourly such that: The Employee class contains all of the fields common to both types of entries ip your employee list Salaried class is a subclass ofEmployee and contains only those fields that are specific to the Salaried entries in your employee list_ The Hourly class is a subclass Of Employee and contains those fields that are specific to the Hourly endies in your employee list Each Of these classes contains all of the normally expected" methods. The normally expected" methods are: o At least one constructor that is an overload constructor that includes all of the necessary information to create an instance. o A getter and setter (accessor and mutator) method for each instance/class variable o A method o An method Create your classes so that you can keep track ofthe Total nuuber of Employee s o Total mrnber of Salaried employe es o Total of Hourly emp loyees Note that you determine these totals by counting the number Of times the respective constructors have been call ed. Create a fourth named Client that Will used to test your Other classes. Ln this Client class: This class must include the main method In the main method o Create array named employeeList Of type Employee with a length Of O Search 1 Once you have populated the array print out the contents of the array using a for loop. Hint just call the method to print the contents of an instance. This loop should print out the contents of every entry In the array includmg the blank (null) entries _ Now give everyone m the employeeList array a 25% raise. When applying the raises use a loop to step across the array. Your code must dynamically determine the type of employee at each array location by using dle instanceof operator@your code should correctly apply raises regardless of the order in which the employees ze entered into the array) _ Aher you have given everyone a 25% raise: Print out the contents of the array usmg a loop_ nus time do not print the blank (null) entnes_ Your code must dynamically determme if an entry is null and not print out the null entries. Finally. explicitly test the equals methods for each ofyour classes_ This will require four tests_ Show at least one test where the method returns true and one test where the equals( ) method returns Else for the Hourly class. Show at least one test Where the method returns true and one test where the equals( ) method retLMns Else for the Salaried class_ provide adequate documentation for your code where adequate documentation is defined as foll ows: Each instance or class variable should have a semantically rich name. the should tell a reader Of the code what the variable represents. The use Of semantically rich identifiers reduce the amount Of documentation that needs to be writ-tew Each class should include a Java docs header comment block that includes the following: o Your nanr using the @author tag o Ille date usin g the@ierston tag o A brief description of the class Each method should include a Java docs header

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Assess various approaches to understanding performance at work

Answered: 1 week ago

Question

Provide a model of performance management

Answered: 1 week ago