Question: PLEASE i need the solve within 1 hour with java language Given the following UML diagram: Part 1: Implement the following classes: Check the notes
PLEASE i need the solve within 1 hour with java language



Given the following UML diagram: Part 1: Implement the following classes: Check the notes below before you start: Accident Report - date: Date - involvement: Vehicle[] - nbOfVehicle: int + AccidentReport () + getDate():Date + addNewVehicle(v: Vehicle): void + cruiser Motolnvolved():boolean + countAutomaticCars():int + displayOwners(): void Vehicle - owner:String - matriculation: String - model: String + Vehicle (----All Parameters----) + setters/getters + toString(): String 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 Notes: 1. The Vehicle class: (10pts) a. The ToString method should return a String similar to : Model: BMW, Owner: Ali Moussa, Matriculation: 51234 2. The car class: (10pts) a. The ToString method should return a String similar to : Car : BMW, Owner: Ali Moussa, Matriculation: S1234, Automatic, 255 hp OR Car: BMW, Owner: Ali Moussa, Matriculation: S1234, Manual, 255 hp 3. _The motorcycle class: (10pts) a._The toString method should return a String similar to: Sport Motorcycle: BMW, Owner: Ali Moussa, Matriculation: S1234, 50 N 4._The AccidentReport class: : (50pts) a._The involvement array can have at most 10 elements. b. The date data field should include the current date (exact date of object creation) c. The nbOfVehicle should register the real number of involved Vehicle (how many elements has been added to the array). d. The AccidentReport () constructor will create an object with the current date, involvement array of size 10 and nbOfVehicle equal to zero. e. addNewVehicle(v: Vehicle) adds new Vehicle to the array (if the array is not full) f. cruiserMotolnvolved() returns true if a Motorcycle of type Cruiser has been involved in the accident. And false otherwise.(by searching the involvement array) g. countAutomaticCars() returns the number of automatic cars that has been involved in this accident. .(by searching the involvement array) h. displayOwners(): Display the names of owners of all involved Vehicles. 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
