Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

please use python to solve it. Vehicle class. Represents selected information about a vehicle. Class variables base sale price = 0 Instance variables Attributes: wheels:

image text in transcribed

please use python to solve it.

Vehicle class. Represents selected information about a vehicle. Class variables base sale price = 0 Instance variables Attributes: wheels: An integer representing the number of wheels the car has. miles: The integral number of miles driven on the vehicle. make: The make of the vehicle as a string. model: The model of the vehicle as a string. year: The integral year the vehicle was built. sold on: The date the vehicle was sold. Constructor Vehicle arguments: wheels, miles, make, model, year, sold on State change: A new object of type Car is created. Return: That newly created Car object. Methods sale_price No arguments Return: If the date is not none, Return the sale price for this vehicle by an agent as a float amount. Assume the sale price is $6000 per wheels purchase price No arguments. Return: Return the price for which agent would pay to purchase the vehicle. The vehicle would be purchased by an agent for base sale price - (.10 miles) Now create a Car subclass and Truck subclass for Vehicle parent class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions