Question: Create an abstract class called Auto in Auto.java that contains the following data and methods: a ) Private Class Data i ) string brandName ii
Create an abstract class called Auto in Auto.java that contains the following data and methods:
a Private Class Data
i string brandName
ii float milesPerGallon
iii string color
b Public Class Methods
i Autostring name, float string color
ii string getBrandName
iii void setBrandNamestring name
iv float getMilesPerGallon
v void setMilesPerGallonfloat
vi string getColor
vii void setColorstring color
viii abstract string printStats
Create a specialization class called Truck in Truck.java that extends the Auto class and contains the following data and methods:
a Private Class Data
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
