subject

python Design a class named Vehicle that contains A private string data field named make A private string data field named model A private int data field named value A private int data field named mileage A constructor that creates a Vehicle object with the specified make (default "none"), model (default "none"), value (default 20000), mileage (default 0). The accessor and mutator methods for make, model, value, and mileage. A method named milesdriven that adds a specified number of miles to mileage A method name valueloss that subtract a specified value from value A method name vehicleage() that returns the age of the vehicle based on mileage (10,000 miles driven per year) Write a test program that creates a Vehicle object with a make of Ford, model F-150, value of 20000, and mileage of 0. Use the random number generator to generate a number between 0 - 50,000 and use the milesdriven method to update the mileage on the vehicle. Using the same random number that was generated, calculate the depreciation of the car (.1*mileage) and use the valueloss method to update the value of the vehicle. Print out the make, model, mileage, current value, and vehicle age using similar output.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
Whats are the different parts of no verbal comunication, especially body language?
Answers: 3
question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Append and make table queries are called queries. select complex simple action i think action
Answers: 1
You know the right answer?
python Design a class named Vehicle that contains A private string data field named make A private s...
Questions
question
Mathematics, 18.10.2020 02:01
question
English, 18.10.2020 02:01
question
Mathematics, 18.10.2020 02:01
question
Mathematics, 18.10.2020 02:01
Questions on the website: 13722362