subject

A car dealership needs a program to store information about the cars for sale. For each car, they want to keep track of the following information number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon. Which of the following is the best design? a. Use classes: Doors, Airconditioning, and MilesPerGallon, each with a subclass Car.
b. Use a class Car, with subclasses of Doors, Airconditioning, and MilesPerGallon.
c. Use a class Car with three subclasses: Doors, Airconditioning, and MilesPerGallon.
d. Use a class Car, with fields: numDoors, hasAir, and milesPerGallon.
e. Use four unrelated classes: Car, Doors, Airconditioning, and MilesPerGallon.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:40
In this lab, you complete a python program that calculates an employee's annual bonus. input is an employee's first name, last name, salary, and numeric performance rating. if the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. if the rating is 4 or higher, the rate is 0. the employee bonus is calculated by multiplying the bonus rate by the annual salary.
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 1
question
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Which type of excel chart should be used to track students’ progress on test grades? line column bar pie
Answers: 2
You know the right answer?
A car dealership needs a program to store information about the cars for sale. For each car, they wa...
Questions
question
History, 13.12.2019 07:31
question
Mathematics, 13.12.2019 07:31
question
Mathematics, 13.12.2019 07:31
question
Mathematics, 13.12.2019 07:31
Questions on the website: 13722363