Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a class called Employee with attributes for name, hours worked, and pay rate. Make a constructor that takes name, hours worked and pay

Make a class called Employee with attributes for name, hours worked, and pay rate. Make a constructor that

Make a class called Employee with attributes for name, hours worked, and pay rate. Make a constructor that takes name, hours worked and pay rate as initializing parameters. Make a function in the class that will calculate their gross pay (multiply number of hours worked by pay rate). Make a function in the class called printit that prints out the name, hours worked and pay rate. Output a greeting to the user and then Prompt user to enter name, number of hours worked and pay rate. Make an instance of the employee class with the data they input. Now call the gross pay function to get the gross pay and print that out, Next call the printit function to print out the data in the instance (name, number of hours worked and pay rate)

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

Heres a Python class called Employee that fulfills your requirements class Employee def initself nam... 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

Modern Systems Analysis And Design

Authors: Joseph Valacich, Joey George

8th Edition

0134204921, 978-0134204925

More Books

Students also viewed these Programming questions

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago