Question: Task2: CarDemo Application Create a Java application CarDemo . Create a Car class with the fields for year , make , model , price ,
Task2: CarDemo Application
Create a Java application CarDemo.
Create a Car class with the fields for year, make, model, price, and speed.
Create a default and parameterized constructors. The parameterized constructor should have 5 parameters to assign values to the attributes (fields).
Demonstrate the class by creating 1 car object using the default constructor and 2 car objects using the parameterized constructor.
Display the values of the attributes (or fields).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
