Write an employee class that keeps data attributes

Assignment Help Programming Languages
Reference no: EM131658204

Programming Assignment

Write an Employee class that keeps data attributes for the following pieces of information:

• Employee Name
• Employee Number

Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information:

• Shift Number (an integer 1 or 2)
• Hourly Pay Rate

The workday is divided into two shifts: day and night. The shift attribute will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write the appropriate accessor and mutator methods for each class.

Once you have written the classes, write a program that creates an object of the ProductionWorker class and prompts the user to enter data for each of the object's data attributes. Store the data in the object and then use the object's accessor methods to retrieve it and display it on the screen.

Program Description: You write a short description of what the program will do

Add an __str__ method to the ProductionWorkerclass that will print the attributes from both classes in a readable format. In the main part of the program, create one more ProductionWorker object, assign values to the attributes and print both objects using the print statement.

Reference no: EM131658204

Questions Cloud

Write the pseudocode that prompts the user : 1. PSEUDOCODE: Write the pseudocode that prompts the user to enter a person's age. Then display the person's age group as follows:
Find a microbe that has been in the news : BIO221 MICROBIOLOGY INFECTIOUS DISEASE PRESENTATION. Find a microbe that has been in the news since the current semester started
Transition to adulthood-emerging adults : Read and summarize a scholarly journal article (published since 2008) with a focus on transition to adulthood.
How would you harden a database to prevent hacking : How would you harden a database to prevent hacking? How would you harden a webserver from SQL injection?
Write an employee class that keeps data attributes : Write an Employee class that keeps data attributes for the following pieces of information: Employee Name and Employee Number.
Define the clinical topic nurse turnover : Discuss how a qualitative design might address the clinical topic Nurse Turnover
What defenses might the defendant driver raise in lawsuit : Corinna sued the driver of the car for negligence. What defenses might the defendant driver raise in this lawsuit? Discuss fully.
Solid set of business processes : Bradford (2008) writes, "Since ERP systems are based on a solid set of business processes, an ERP implementation often serves as the catalyst for a BPR effort".
Explore some basic concepts regarding the financial concerns : Explore some basic concepts regarding the financial concerns of the CIO. I have a number of very short headlines from the IT consulting firm, Apptio.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd