Object-Oriented Programming Assignment Help

Object Oriented Programming Assignment Help Academic Writing

Object-Oriented Programming Assignment
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 workshop10 activities and submit your work during the workshop session.

Workshop Questions

1. Employee data
Object-Oriented Programming Assignment Help
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 employee pay rate. Do not create
any mutators methods for this question.

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. Python
Object-Oriented Programming Assignment 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. Click here for assistance

2. Book objects
Object-Oriented Programming Assignment Help
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

For Object-Oriented Programming Assignment Help please click here

Hits : 1

Leave a Comment

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

Message Us