Question
A typical Car class has the following characteristics: wheels= 4 doors = 4 seats = 5 maxSpeed and following method: run() --> print out the
A typical Car class has the following characteristics:
wheels= 4
doors = 4
seats = 5
maxSpeed
and following method:
run() --> print out the max speed of the car in a loop of 10 times
info() --> list out all the characteristics of the car, for example:
"wheel = 4
doors=4
maxSpeed=...
"
A Toyota car is a car with: maxSpeed = 100
A BMW car is a car with: maxSpeed = 200
Using as many as principles from OOP, please design a program where it creates two car: one from Toyota and one from BMW. Call the run() of the two cars. Please provide the output.
Ask a new question
Step 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