Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python programming Part I: Add a Car to a Dealership (20 points tmplement the method add.cars () for the Dealership class. The method takes one
Python programming
Part I: Add a Car to a Dealership (20 points tmplement the method add.cars () for the Dealership class. The method takes one argument, cars, which is a list of lists of car details. Each list within the cars list represents the details (properties) for a single car You may assune the entire list is altways valid. A detail order: [id, brand, price, color, tires, trim-lovol]. The id, brand and prico will be Is list for a particular car will always be presented in this will he stored inside a CarAttributes object inside the Car object Your method should creale new Car objects and add them to the car.list glven to you in the Dealership CSE 101-Fall 2017 Lab a8 Page 2 class, Examples: Consider the following lists of lists of car details 111, 'Mercedes'. 40000, Grey'. SnowRegular'1, [12, 'Ford, 20000, RedRain', Level-11, 113. Mercodos 40000, Grey Snow', Regular', 114. 'Mercodos",40000, BlueSnow' Regular 1, [15, ,Mercedes, 40000, "Orange. ,Snow, , , Regular,, Function Call dealorshipl-add cars (pilist) Updated dealershipl.car list: KMac: Car: I BMW 46000 Actributos: [Blue Regular Regularl 1 Car: Mercodes 40000 Actributes: GEeySnow Regular 1 Car: [ Ford-20000 - Attributes; [Red-Rain- Level-1] ] Function Call dealership2.add cara(p2List) Updated deslership2.car list Cars Toyota 26000 -Atributes: IBlackSnow Rogularl 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started