Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please when posting answer post a screenshot of code as it makes it easier for me to understand the indentation Writing object-oriented programs involve four

please when posting answer post a screenshot of code as it makes it easier for me to understand the indentation
image text in transcribed
Writing object-oriented programs involve four frinciples - Abeiracton, Polymorphism, Inhcriance, and Fncapsalation (APIE). In this ansignment, you are tequired to apply all the coscepts that you have leamed to devign object-ariented neftware. You are also required to implement other lava features such as File 10 and AmayLists. Going above and beyond the requirements of this assignment is highly cooourapod. Since this assignnsent is your midterm peofect, yee mase attempe to complete the work yourself. Asking the instrucior to detug your midterm joggrameing axsignment and then reward points to you for fixing your poogranming problems does avt jpatify your kearning skills. Try your very best. Thas assignment demonstrates your kowalodpe of leva languge and object-orientod design up to this point of the courne. Your Assienment Write a program that consists of an abstract class called Worker. The class should have the following "protected' variakle types of informative: Worker natme Werker number Hire date Crcate one of more constructors and the appropriatc accesor and mutator functions for the class. Create an abseract function called "calculatepay that will calcalate and return the total payment of the worker. Neat, creale a class name Praduction Worker that is derived from the Worker class. The Production Worker class showld have member variables so hold the following information: Shift (an integer, 1-day, 2-night) Hourly pay rate (a double) Hours worked (a double) Create coe or more constructon and the appropriate secessor and mutbor fanctions for the class. Create a function called calculatelay that vill calculate ind return the total payment of the worker. The payment should be the houly nate muliply by the bours worked. The payment shoold be double pay for houn weeked ereater than 40 . A shift superviser is a salaried worker. In addinise so a salary, the shit vepervisor eams a yearly bonus when his or her shitt mects production pouls. Creace a class called shits supervisur that is derived froen the Worker. The ShiftSuperviser class shell have a member variable that holds the anmual salary and a member variatle that helds the ansual persbection benus that a shift superviser has carned. Creale one of mote coostrictors and the appropriate accessor and mutator functions for the class. Create a functien called "cakolutifay that will calculate and return the lotal paymest of the superviser payment (aluriod + beous eamed. Write a driver peogeram that will implemeat the thee chases mentioned above. Ask the user how many wokken to inpun (ar least foun). Makesp all the apor values. Your program should use the Java Amay List class to create an object of Werken. Using the loop cencept reiterates through the Arraylist of objects and prints each worker's ieformution. Print the result in a readable format so that readers will understand what they are reading about. Name Worker number Worker type (Production Worker of Stifsepervise) The worker's payment Your program should offer the user to observe the reaul in two ways: a) Displays the result on the exnsole. b) Save the resalt inte a file. Requed the aser to inpot the fike name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

denigration of emotional outbursts; being reserved;

Answered: 1 week ago