Concept explainers
Code in JAVA and see attached images for information on classes and methods
A company pays its personnel on a weekly basis. The personnel are of 4 types:
FixedWeekly personnel are paid a fixed amount regardless of the number of hours worked
ByTheHour personnel are paid by the hour and receive overtime pay for all hours worked in excess of 40
PercentOfSales personnel are paid a percentage of their sales
FixedWeeklyPercentOfSales personnel receive a fixed amount plus a percentage of their sales.
Create a class called Personnel. This class will represent the general concept of all personnel. All 4 types of personnel are considered Personnel. FixedWeeklyPercentOfSales personnel are considered to be PercentOfSales Personnel.
The Personnel class will also be Payable. You will need to create the Payable interface. It will contain just one method called earnings().
Test Run
Personnel processed polymorphically:
FixedWeekly personnel: Harry Clark
social security number: 111-11-1111
weekly salary: $800.00
earned $800.00
ByTheHour personnel: Katie Brown
social security number: 222-22-2222
ByTheHour wage: $16.75; hours worked: 40.00
earned $670.00
PercentOfSales personnel: Joan White
social security number: 333-33-3333
gross sales: $10,000.00; PercentOfSales rate: 0.06
earned $600.00
FixedWeeklyPercentOfSales personnel: Bob Green
social security number: 444-44-4444
gross sales: $5,000.00; PercentOfSales rate: 0.04; FixedWeekly salary: $300.00
new FixedWeekly salary with 10% increase is: $330.00
earned $530.00
Trending nowThis is a popular solution!
Step by stepSolved in 6 steps
My output returns "D:\personnel.txt does not exist." instead of providing the proper test run. Is it not reading the file from readFile?
My output returns "D:\personnel.txt does not exist." instead of providing the proper test run. Is it not reading the file from readFile?
- Describe how classes are implemented.arrow_forwardC# LANGUAGE polymorphism to iterate across different employees. SEE PICTURE FOR EXAMPLE OUTPUT Employee 1 is HourlyEmployeeEmployee 2 is PerDaymployeeEmployee 3 is MonthlyEmployeearrow_forwardScheduling a Class (Intermediate above) You are an administrator for the Kulliyyah and is assigned the task to schedule a set of classes for a given day. Unfortunately, there is only one lecture hall and therefore, two classes cannot run at the same time. This is usually an easy task, however, there are some criteria that you would have to consider. The criteria are as follows: · Each class has a duration class time. · Higher level courses has higher priority than other low level courses. · Some lecturers prefer to have morning classes instead of the afternoon classes because they come to the office much earlier than other lecturers so they should be scheduled earlier. Your job is to propose the best scheduling based on this criteria. To do this, you will write a C++ program that will first sort the classes by lecturer arrive time and then by course levels. Lecturers arriving early, can start first, but if they arrive at the same time, the higher level course will go…arrow_forward
- Question 52 Python is not great at Information Hiding because it doesn't allow creating data attributes for an instance from outside class definition allows access to data from outside class definition it doesn't allows access to data from outside class definition it doesn't allow write to data from outside class definitionarrow_forwardThe ACTION and METHOD attributes are utilized by both forms and code to accomplish a variety of tasks.arrow_forwardQuestion p .Full explain this question and text typing work only We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this linearrow_forward
- Object oriented programming is where you focus more of the data and the properties that make that data up, along with the actions you can preform by that data, rather than focusing on doing some procedural thing. Group of answer choices True Falsearrow_forwardScheduling a Class (Intermediate above) You are an administrator for the Kulliyyah and is assigned the task to schedule a set of classes for a given day. Unfortunately, there is only one lecture hall and therefore, two classes cannot run at the same time. This is usually an easy task, however, there are some criteria that you would have to consider. The criteria are as follows: · Each class has a duration class time. · Higher level courses has higher priority than other low level courses. · Some lecturers prefer to have morning classes instead of the afternoon classes because they come to the office much earlier than other lecturers so they should be scheduled earlier. Your job is to propose the best scheduling based on this criteria. To do this, you will write a C++ program that will first sort the classes by lecturer arrive time and then by course levels. Lecturers arriving early, can start first, but if they arrive at the same time, the higher level course will go…arrow_forwardSequence diagram Create a UML sequence diagram that will show your clients how the system’s classes will interact when customers are buying their flight tickets on the booking website. How to create your assignment Review the code responsible for adding a new item. Make a sequence diagram that captures the interactions of objects in the app when a new item is added. Your sequence diagram should contain the following classes: AddItemActivity ItemList Dimensions Item And contain calls of the following methods: onCreate() loadItems() saveItem() Dimensions constructor Item constructor addItem() saveItems() Lastly, the activation of AddItemActivity should start with the call to “onCreate()”arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education