Question: Write a java program using multi level inheritance with three classes 1. Vehicle Manufacturer - Attributes : int sNo; String vehicleType; (parent) 2. Car
Write a java program using multi level inheritance with three classes 1. Vehicle Manufacturer - Attributes : int sNo; String vehicleType; (parent) 2. Car Manufacturer - Attributes: String carBrand; (child/parent) 3. Car - Attributes: String carType; int seatingCapacity; (child) In the main method, create an array of objects. Take input, and display the details of the requested object. ** Use next method to scan "String" and nextInt method to scan "int". For example: Input 3 1 Car Honda Hatchback 4 2 Car Suzuki SUV 7 3 Car Kia Sedan 5 1 Result Honda Hatchback is a 4 seater Car.
Step by Step Solution
There are 3 Steps involved in it
import javautilScanner class VehicleManufacturer int sNo String vehicleType VehicleManufacturerint sNo String vehicleType thissNo sNo thisvehicleType ... View full answer
Get step-by-step solutions from verified subject matter experts
