A. Create a class named Employee that contains the following: [1.5 POINTS] • private instance variable SSN (integer). •

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

A. Create a class named Employee that contains the following: [1.5 POINTS] • private instance variable SSN (integer). •

Post by correctanswer »

A Create A Class Named Employee That Contains The Following 1 5 Points Private Instance Variable Ssn Integer 1
A Create A Class Named Employee That Contains The Following 1 5 Points Private Instance Variable Ssn Integer 1 (66.94 KiB) Viewed 91 times
A. Create a class named Employee that contains the following: [1.5 POINTS] • private instance variable SSN (integer). • private instance variable Salary (double). • public instance variable Name (String). • parameterized constructor to set its parameter values to the instance variables. • an instance method getSalary() that returns the salary. B. Create a class named HourlyEmployee that inherits class Employee. The HourlyEmployee class has the following: [2.5 POINTS] • private instance variable hours (integer). constructor with four parameters to be assigned to the HourlyEmployee instance variables. • an overrided instance method getSalary() that returns the Employee salary computed according to following criteria: If hours > 200 1.5 *salary Otherwise 1.1 * salary. C. In a demo class named Demo, create an object of type HourlyEmployee. Fill the object with data from user then print on screen the Employee salary. [1 POINT] //paste your code below this line
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply