Can each class be done please I am not sure how to do each one. In java Make a program with classes named Vehicle, LandVehicle, AirVehicle, Car, Truck, Glider, Balloon, VehicleFactoryMain, MyFileManager. The Vehicle Inheritance looks like this: Note: Vehicle should also have a range. Make sure to override the toString() method for returning a String that includes all the information about an instance of a vehicle. VehicleFactoryMain will use these classes to make a random number and assortment of vehicle types. For example: Car - red, 526Km,1524Kg, 1988Kg, 1001Kg, gas, 4-wheels, 2-doors, fastback. Balloon - orange, 234Km,320Kg, 423Kg, 256Kg, gas, 950m, hot air. For the various ranges, altitudes, and weights set a max and min value and r

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Can each class be done please I am not sure how to do each one.

In java Make a program with classes named Vehicle, LandVehicle, AirVehicle, Car, Truck, Glider, Balloon, VehicleFactoryMain, MyFileManager.

The Vehicle Inheritance looks like this:

Note: Vehicle should also have a range.

 

Make sure to override the toString() method for returning a String that includes all the information about an instance of a vehicle.

 

VehicleFactoryMain will use these classes to make a random number and assortment of vehicle types.

For example:

Car - red, 526Km,1524Kg, 1988Kg, 1001Kg, gas, 4-wheels, 2-doors, fastback.

Balloon - orange, 234Km,320Kg, 423Kg, 256Kg, gas,  950m, hot air.

 

For the various ranges, altitudes, and weights set a max and min value and randomly choose between those.

For values that have types (hot-air, hydrogen, helium or gas, electric, diesel, kerosene, methane,none) make a static array in the class and randomly choose one of the values.

Have the factory select a random number between 2-5 inclusive for each type of vehicle. 

It will then generate that many randomized versions of one of the types of vehicles.

Repeat this process for all 4 types of vehicles and store all of them in an ArrayList.

-----------------------------------------------------------------------------------------------------------------------------------------

The MyFileManager class will have three methods:

   clearFile(String fileName)

When this method is called, if the file with fileName exists, this method erases all text in the file.

 


   appendLine(String lineToPrint, String fileName)

   appendArray(ArrayList<Vehicle> v, String fileName)

Anytime one of these methods is called, the file manager will check to see if the file exists. If it does, the String or array is appended to the list.

If the file does not exist, the MyFileManager creates it and writes to it.

 

All paths use just the file name so that the system will store and read/write them from the default path.

--------------------------------------------------------------------------------------------------------------------------------------------

After generating an array full of random vehicles, use your MyFileManager class to make a file named "VehicleProductionInventory.txt"

The text file will contain a header with the number of vehicles produced and the current date and time (ISO 8601 format).

Use metric measurements for all values

 

1st pic is an idea of how it should work below. and 2nd is what the output should generally be

Number of vehicles produced <insert number here>
Date of production <insert current date and time>
Car - red, gas, 450Km, 1524kg, 4 wheels, 2-doors, fastback.
Balloon - orange, propane, 75km, 320Kg, 950m, hot air.
<and the rest of the list of all vehicles produced>
etc
Transcribed Image Text:Number of vehicles produced <insert number here> Date of production <insert current date and time> Car - red, gas, 450Km, 1524kg, 4 wheels, 2-doors, fastback. Balloon - orange, propane, 75km, 320Kg, 950m, hot air. <and the rest of the list of all vehicles produced> etc
Vehicle
color
weight
maxWeight
minWeight
fuelType
Canimal-powered,
gas, electric,
diesel, kerosene,
nethane)
LandVehicle
numWheels
AirVehicle
maxAltitude
numDoors
Car
Truck
Balloon
buoyantGas
Chot-air, helium,
hydrogen)
Glider
bodyType
(sedan, fastBack,
cargoSize
wingSpan
maxSize
coupe, convertable,
hatchBack)
minSize
cargoType
(openBed, BoxTruck,
van, ninivan, dunpTruck)
Transcribed Image Text:Vehicle color weight maxWeight minWeight fuelType Canimal-powered, gas, electric, diesel, kerosene, nethane) LandVehicle numWheels AirVehicle maxAltitude numDoors Car Truck Balloon buoyantGas Chot-air, helium, hydrogen) Glider bodyType (sedan, fastBack, cargoSize wingSpan maxSize coupe, convertable, hatchBack) minSize cargoType (openBed, BoxTruck, van, ninivan, dunpTruck)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY