Class: Write A Java To Represent A Vehicle Type
Class: Write A Java To Represent A Vehicle Type
1. Create a new Java class named Vehicle that has the following fields
o yearModel- The yearModel field is an int that holds a Vehicle's
yearModel model (e.g. 2010)
o make - The make field is a String object that holds the make of
the Vehicle (e.g. "Porsche")
o speed - The speed field is an double that holds a Vehicle's
current speed (e.g. 25.0)
o VINNumber- The VINNumber field is a string object that holds a
Vehicle's VINNumber (17 digit number)
2. In addition, the Vehicle class should have the following methods.
Constructor :