Question: Part II: Update a Car (20 points) Implement the method update.car ) in the Dealership class. The method takes the following arguments, in this order:

 Part II: Update a Car (20 points) Implement the method update.car

Part II: Update a Car (20 points) Implement the method update.car ) in the Dealership class. The method takes the following arguments, in this order: I. id: The ID # of the car to be updated. 2. new.value: A tuple containing the detail to be updated and the corresponding value. The tuple will look similar to this: ('brand', 'Dodge'). Any one of the five details can be modified, as identified by one of these strings: 'brand', 'price', 'paint', 'tires' or 'trim' Your function should update the property of the car that matches the id in the given dealership and return Updated' . If the id doesn't match and car offered for sale by the dealership, return 'Car not found', capitalized exactly as written. Note: no two cars will ever have the same id. Examples: Function Call: dealershipl.update_car (1, ('brand', 'Hyundai' Return Value: "Updated" Updated Dealership: KMac: Car: Hyundai - 23000- Attributes: [Red Rain - Level-1] Car: BMW 46000 Attributes: [Blue Regular-Regular]] Car: Ferrari - 150000- Attributes: [Violet - Regular Level-2] ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!