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) Auto(string name, float mpg, string color)
ii) string getBrandName0
iii) void setBrandName(string name)
iv) float getMilesPerGallon0
v) void setMilesPerGallon(float mpg)
vi) string getColor0
vii) void setColor(string 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
 Create an abstract class called Auto in Auto.java that contains the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!