Question: solve in java Part 2: Implement a driver class (main class) as follows: (20pts) 1. Create an AccidentReport object. 2. Add to the report object
Part 2: Implement a driver class (main class) as follows: (20pts) 1. Create an AccidentReport object. 2. Add to the report object 2 Cars objects and 1 Motorcycle of your choice. 3. Add to the report object one automatic Car of Model "BMW" horsepower equal to 600 owned by "oussama atwi" and has matriculation nb "S123123". 4. Display the number of automatic cars involved in this report. 5. Display if any cruiser motorcycle has been involved. 6. Display all Owners names. Part 1: Implement the following classes: Check the notes below before you start: Accident Report - date: Date Vehicle - involvement: Vehiclell owner:String - nbofvehicle: int - matriculation: String + Accident Report () + getDate ():Date - model: String + addNewVehicle(v: Vehicle): void + Vehicle ....All Parameters....) + cruiserMotoinvolved():boolean + setters/getters + countAutomaticCars():int + toString(): String + displayOwners(): void Motorcycle - torque: double -type: String // standard, cruiser or sport + Motorcycle (---All Parameters----) + setter/getter +toString(): String Car - horse Power: int - automatic boolean + Car (---All Parameters--- + setter/getter + toString(): String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
