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

  Implement the ransac algorithm for linear regression

You must find the observed data, threshold, also the outliers and remove them from (X,y) How exactly do i do this? please provide the code.

  Create functions and call those functions to display outputs

Create additional functions and call those functions to display outputs. Write code for each function calling functions from step one above to display outputs.

  Write a program that asks for the users age

Write a program that asks for the user's age. Based on their response print "You can vote" (18 years old or older) or "You can't vote" and also whether or not he/she is a senior citizen (over 64). If senior citizen print "You're a Senior Citizen.

  Prepare an original 2d game code in cocos2d python

Project may be completed using Linux, Windows, or OS X. If you use OS X, you may use Spritekit instead of Cocos2D.

  Develop a python program to calculate income tax

Develop a Python program to calculate income tax as described in the above table. For this solution, nest the if-then logic. Do not use elif.

  Solve the puzzle by using breadth-first tree or graph search

CISC 339 Aritificial Intelligence Group Project. Formulate the problem precisely. Solve the puzzle by using breadth-first tree or graph search

  What is complexity in asymptotic notation of your solution

Write a program in Python to draw the following figure: What is the complexity in asymptotic notation of your solution? Return the "centered" average of an array of ints, which we'll say is the mean average of the values.

  Record validation accuracy for each trained neural network

Record validation accuracy for each trained neural network - On the basis of objects detected in the scene, predict the scene

  Assignment work in python

Write a function interleave two pictures take the first 20 pixels from the first picture and then 20 pixels from the second picture and then the next 20 pixels from the first picture and then the next 20 pixels from the second picture and so on till ..

  Create a python script that will implement the given command

Write a python script that will implement the following command: merge sourcedirectory1 sourcedirectory2 destinationdirectory. The merger is a union operation, so that if a file/directory exists in either source directory it is included in the new d..

  Permutation ciphers

Permutation Ciphers (a.k.a. Transposition Ciphers) are another class of simple cryptosystems. For this we use the functions apply(.,.) and inv(.) from Homework 4; copy these two functions into your le as auxiliary functions.

  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.

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