Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
import javautilScanner class VehicleManufacturer int sNo String vehicleType VehicleManufacturerint sNo String vehicleType thissNo sNo thisvehicleType ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started