Question: Can you please help me with test earning class can we use for loop in that one and dont use string.format for to string method
Can you please help me with test earning class can we use for loop in that one and dont use string.format for to string method

Q1: Use the information provided in the table below in creating this project: Element name Description Includes/Has Earning Public interface earnPerMonthl):double Abstract method earnPerMonth() Public abstract method to calculate and return employee monthly salary, as explained below: For Salaried-emp returns MonthlySaraly for Hourly-emp returns (Hou rs_per_week* Hour_rate}*4 Employee Abstract class Private id: String Private name:String vacationDays():int Abstract method All required accessors and mutators. vacationDays[):int Public abstract method to return number of vacation's days per year for each employee. Default: 30 days for Salaried-emp and 15 days for Hourly-emp. Hourly-emp Child class of Employee Private Hours_per_week:int Greater or equal 10. Private Hour_rate:double Greater or equal 15 and less than or equal 100. earnPerMonth()1double vacationDays():int All required accessors and mutators. Salariedemp Child class of Employee MonthlySaralyzdouble Greater or equal 1000. earnPerMonthl):doub|e vacationDays[):int All required accessors and mutators. TestEarning Main class for testing Notes: - All mutator methods should only assign the param value if it is valid, otherwise an IllegalArgumentException is thrown with a specic, yet concise and informative error message. - The toStringO returns the Employee object as a String in the following format: Id Name Employee Category Monthly Salary Vacation Days Main class (TestEarning) Program: - This program must be in the class called TestEarning in your assignment 2 project. Create 4 different employees (2 from each type} then print all the information in tabular format as shown in the sample below: Id Name Employee Category Monthly Salary Vacation Days This program prompts the user to enter all the required values for the data members. Use the methods of your employee class to ensure that the user's input is valid. If any input is not valid, repeatedly prompt the user to enter data until that data is valid. After the user has entered all 4 input values: - Display the employee object as a String. - You need to collect information for 4 employees
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
