subject

Write in java (inheritance)consider the company class and the program output given. now, design a class hierarchy that implements company employee’s salary calculation. a company has two types of employees: hourly paid employees and monthly salary based employees. every employee has a name, salary and tax rate. in addition, hourly paid employee has two attributes: hours worked and the hourly rate. the monthly paid employee has one attribute, annual salary. both classes have constructor methods that take all attributes and a method to calculate monthly salary. finally both classes should have the tostring method that returns name, monthly salary, and the tax paidimport java. util. arraylist; public class company{ public static void main(string[] args) {arraylist emplist= new arraylist(); monthlypaidemp mpe1 = new monthlypaidemp("john william" , 55675.00); monthlypaidemp mpe2 = new monthlypaidemp("nancy william" , 65675.00); hourlypaidemp hpe1 = new hourlypaidemp("samira monid", 7.50, 35); emplist. add(mpe1); emplist. add(mpe2); emplist. add(hpe1); for(int i=0; i

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 24.06.2019 15:40
In the above figure, what type of cylinder arrangement is shown in the figure above? a. l-type b. v-type c. in-line d. horizontal pls make sure its right if its rong im grounded for 3months
Answers: 1
You know the right answer?
Write in java (inheritance)consider the company class and the program output given. now, design a cl...
Questions
question
Mathematics, 21.05.2020 04:07
Questions on the website: 13722363