[SOLVED] Vehicle Console application

20.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Create a “Vehicle” class the has the private variables “registationNumber” (int) and “owner” (String).

Then, create a subclass Of the vehicle class called ” Car”. The car the following public variables:
brand, and maxSpeed (String, int, int). When you create a car, you should be able to set all three parameters and the two parameters of the superclass “Vehicle”.

Finally, create a “Roster’ class which should have as a variable an Arraylist of Cars, When you create a object, the arraylist should be empty. In the class, create a method that adds cars to the roster and a method that finds how many cars have n doors, with n as an input.

Then, in your program, create 3-5 cars and a new Roster. Add the cars in the Roster. Then, search the Roster to find how many cars have 5 doors. Finally, find the person who owns a Suzuki. (one of the cars you create should be a Suzuki for this)

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.