Question: IN JAVA CodeZinger Dashboard > Classes > 2023 Fall - Ja... > Multi level inheritance Statement Output Code Review Multi level inheritance Comment Given a

IN JAVA
Multi level inheritance Given a string NAME and three integers ID, HR, HW. Create a Class HourlyEmployee with following charaolution.java \( \mathbf{x} \) 1. fimport java.util.*; //write your code here 4 5 . class Person \{ 6 private String name; 7 *

CodeZinger Dashboard > Classes > 2023 Fall - Ja... > Multi level inheritance Statement Output Code Review Multi level inheritance Comment Given a string NAME and three integers ID, HR, HW. Create a Class HourlyEmployee with following characteristics 1. Extend an Employee class. 2. Private member variable hourly Rate and hoursWorked as an integer. 3. Parameterized Constructor with parameters in the order of NAME, ID, HR (for hourlyRate) and HW (for hoursWorked). 4. Parameterized Constructor should call a super class constructor with NAME and ID. Also, initialize hourly Rate with HR and hoursWorked with HW. 5. The public function getGrosspay without any parameter and return gross pay amount of type integer. Grosspay = (hourlyRate * hoursWorked) Input Alex 101 100 5 Where, First line represents NAME. Second line represents ID. Third line represents hourly rate HR. Forth line represents hours worked HW. Output 101 Alex 500 Where, The first line represents an ID. The second line represents a NAME. The third line represents Gross Pay. + Test Case(s) + Grading Criteria

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!