Question: with python Write a class ElectricVehicle, it should have attributes for the user to input the values: - max kilowat hours - current kilowat hours
"with python Write a class ElectricVehicle, it should have attributes for the user to input the values:
max kilowat hours
current kilowat hours
color
make
model
kilometers per kilowat hour
add get methods for all the attributes
add set methods if you want
add a charge method which acce a value for kilowat hours to charge
add a drive method which acce a value for kilometers to drive
calculate the number of kilowat hours required and subtract from the current kilowat hours, or raise XT an exception if you don't have enough batter charge
all you need is the class, you can have code that uses it or test code if you want"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
