NewsObject-oriented programming Assignment Help

April 23, 2022by Dennis kimotho0

Hits: 0

Object-oriented programming Topic 10: Apply and test your knowledge of the current and previous topics by attempting the questions below. Completing these questions will help you to succeed in your subject. Complete workshop-10 activities and submit your work during the workshop session. Workshop Questions Object-oriented programming Project Help 1. Employee data a) Write a Python class called Employee that maintains some employee data: employee ID, employee name, employee worked hours and employee pay rate. Pay rate values and worked hours are a float number with two decimal points. You need to create accessors methods for employee ID, employee name, employee worked hours and  .Object-oriented programming Project Help employee pay rate. Do not create any mutators methods for this question. Object-oriented programming Project Help b) Create a method get_total_pay that calculates and returns the total pay of an employee. Total pay = worked hours x pay rate. c) Create an __str__ method representing an employee data in this format: Name: Thair Dalain, Worked hours: 30, Pay rate: $100, Total pay: $300. .Object-oriented programming Project Help d) In your main() function, instantiate the employee class for two different employees with some dummy data and print out those instances using print() calls. .Object-oriented programming Project Help 2. Book objects a) Create a Book class that holds these attributes: ISBN, title, author, publish year, book status. Since books can have a different status, the book status should be a list of strings, for example [‘Available’, ‘Reserved’, ‘Borrowed’, ‘Damaged’]. b) Create accessor methods for all attributes and create a mutator to update the book title. c) Create another program and import the Book class to it. This program creates one or more book objects with any sample data and then prints out those instances using accessor methods. d) Create another program and import the Book class to it. This program creates one or more book objects with any sample data and then prints out those instances using accessor methods. For Object-oriented programming Project Help please click here

Leave a Reply

Your email address will not be published. Required fields are marked *