Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The service.py program, given below, creates vehicle maintenance service calls and display their details. A service call may be a request to maintain a truck

The service.py program, given below, creates vehicle maintenance service calls and display their details.  A service call may be a request to maintain a truck (represented by the class TruckService) or a car (CarService). Write the missing code (#TODO) in the classes TruckService and CarService for the program execution to display created service calls and their details, as shown below.

The submitted solutions must not make any changes to service.py except for the bodies (indicated by #TODO) of the classes CarService and TruckService.

Note:  Since the values for VIN, cost, occupancy and payload are randomly generated, they are expected to be different for every execution instance of the program.

image text in transcribed image text in transcribedimage text in transcribed  

Output: 2023-07-19 07:00:00 CarService [occupancy: 2, cost: $409, VIN: TE70X1011SS075020] 2023-07-19 23:00:00 CarService [occupancy: 2, cost: $381, VIN: QYOTF07YOKB901514] 2023-07-20 15:00:00 TruckService [payload: 21549, cost: $643, VIN: OL7QI88V0JN485842] 2023-07-21 07:00:00 CarService [occupancy: 3, cost: $653, VIN: TZ7AA57A8XN425453] 2023-07-21 23:00:00 CarService [occupancy: 3, cost: $776, VIN: IS4YY69P2NI686634] 2023-07-22 15:00:00 TruckService [payload: 12196, cost: $764, VIN: YZ2RP22H1UC615754] 2023-07-23 07:00:00 CarService [occupancy: 4, cost: $754, VIN: JL3AN62V20T038627] 2023-07-23 23:00:00 CarService [occupancy: 2, cost: $649, VIN: HK1TU17B9SP027601] 2023-07-24 15:00:00 TruckService [payload: 11987, cost: $576, VIN: SF60T11A9DG802861]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Below is the completed code for the classes CarService and TruckService to display vehicle maintenan... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

How can artificial intelligence enhance the control process?

Answered: 1 week ago

Question

Define Heideggers terms throwness, Mitwelt, and Umwelt.

Answered: 1 week ago