subject
Computers and Technology, 03.08.2021 22:20 miya763

Write a program that will create two classes; Services and Supplies. Class Services should have two private attributes numberOfHours and ratePerHour of type float. Class Supplies should also have two private attributes numberOfItems and pricePerItem of type float. For each class, provide its getter and setter functions, and a constructor that will take the two of its private attributes. Create method calculateSales() for each class that will calculate the cost accrued. For example, the cost accrued for the Services class is computed as numberOfHours times ratePerHour, and for the Supplies class the cost will be numberOfItems times pricePerItem. Each class should have a function __str__() that will return all the required information. Write a main() program that applies Python list to store at least two objects of each class mentioned above. Implement all available functions to demonstrate your understanding of applying those methods in your program. Make up your own data when creating each object and print out each object information accordingly. Please submit your UML diagram. Your code is expected to be commented and user-friendly.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 16:00, AM28
Does read theory have answers keys ?
Answers: 1
image
Computers and Technology, 24.06.2019 08:00, nataliamontirl4230
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, wwwcarolynzouowficz
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
image
Computers and Technology, 24.06.2019 20:30, jalenevoyles
Which key should you press to leave the cell as it originally was? a. delete b. cancel c. backspace d. enter
Answers: 1
You know the right answer?
Write a program that will create two classes; Services and Supplies. Class Services should have two...

Questions in other subjects:

Konu
Mathematics, 02.12.2020 21:10
Konu
Mathematics, 02.12.2020 21:10
Konu
Computers and Technology, 02.12.2020 21:10