Write a progra m that creates two objects

Assignment Help Python Programming
Reference no: EM132112817

Python. Please include comments where needed to explain code and include a screenshot of output.

The goal of this project is to give you more experience on the use of:

• classes

• inheritance

• turtle graphics

• files

• lists of lists Project

Problem 1: Employee

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

• Employee name

• Employee number

Next, write two class es named ProductionWorker and ShiftSupervisor that are subclass es of the Employee class. ProductionWorker Class The P roductionWorker class should keep data attributes for the following information:

• Shift number (an integer, such as 1, 2, or 3)

• Hourly pay rate

Shift attribute will hold an integer value representing the shift that the employee w orks. The day shift is shift 1 and the night shift is shift 2.

ShiftSupervisor Class

In a particular factory, a shift supervisor is a salaried empl oyee who supervises a shift. In addition to a salary, the shift supervisor earns a yearly bo nus when his or her shift meets production goals. The ShiftSupervisor class should keep a data attribute for the :

• Annual salary

• Annual production bonus that a shift supervisor has earned.

Write the appropriate accessor and mutator methods for each class.

Once you have written the classes, write a progra m that creates two objects, object of the ProductionWorker class and an object of ShiftSupervisor r 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.

Reference no: EM132112817

Questions Cloud

Print the following table to display the sin and cos value : Print the following table to display the sin value and cos value of degrees from 0 to 360 with increments of 10 degrees round the value to keep four digits.
Foreign direct investment and comparative advantage : Is there a relationship between foreign direct investment and comparative advantage? What is it and Why would that be so?
Briefly summarize the arguments of warren buffett : Briefly summarize the arguments of Warren Buffett and Greg Mankiw with respect to the U.S. trade deficit. Who is right in your opinion?
What is the elasticity of demand : They sold 500,000 units (30-day supplies) that year. In 2016, they experimented with lowering the price to $15 per 30-day supply.
Write a progra m that creates two objects : Write a progra m that creates two objects, object of the ProductionWorker class and an object of ShiftSupervisor r class.
What are the total number of babies born in texas : What are the total number of babies born in Texas in 2012? What are the total number of babies born in Texas with your name since 1910?
Human factor in network designing and analysis : BN321 - Advanced Network Design - Human Factor in Network Designing and Analysis - Apply concepts and theories of human factors as related to network design
Equipment to agree to a voluntary export restraint agreement : Congress could impose a specific tariff or persuade foreign producers of agricultural equipment to agree to a voluntary export restraint agreement.
Write a function named twowords that gets and returns : This problem provides practice using a while True loop. Write a function named twoWords that gets and returns two words from a user.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a function named digit_count that takes one parameter

Write a function named digit_count that takes one parameter that is a number (int or float) and returns a count of even digits, a count of odd digits.

  Calculate the cost of that order and add

A good friend of yours is managing a fund raiser for a football team. He needs a program to calculate the total amount of candy sold at a football game.

  Write another python program to decode the encoded message

Write another Python program to decode the encoded message according to the "circular Caesar cipher" problem presented in Programming Exercises 7 and 8 of Book Chapter 5.

  Programming in Python Project - Word Cookies Game

CE 364 Programming in Python Project - Word Cookies Game. Create a test file from the sample input tiles provided. Your code should be robust and resilient

  Write a function that takes as input an image object

Write a function that takes as input an image object, crops it to make it a square, and returns the resulting object. You must write a function to accomplish this.

  What prompted the authors to try and address

What is the question that this study is trying to answer and what prompted the authors to try and address this question?

  Develop and test a python program

Develop and test a Python program that displays the day of the week that the following holidays fall on for a year entered by the user New Year's Eve

  Segment that prompts the user for an arithmetic operator

The variables x and y refer to numbers. Write a code segment that prompts the user for an arithmetic operator and prints the value abtained by appying that operator to x and y.

  Write a program that does simple packet routing

Write a program that does simple packet routing and your program will take three command-line arguments:

  Write a python program that generates a small web site

Choose a sport or club, and get some suitable input data.. If you play a sport yourself, see if you can get some data files for your sport.

  Creating a web application for an on-line videogame shop

CE219 Assignment - Creating a 3-tier web application for an on-line videogame shop. The application must be implemented in Python

  Write a program in python that asks the user to input

Write a program in Python that asks the user to input a) The number of gallons of gas in the tank.

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