GitHub / bell-kevin / FleetInventoryProject
SDEV 2210 Project. This project simulates the inventory for a fleet of cars. The fleet is an array of Car objects. A Car has a name and an ArrayList of Miles Per Gallon (MPG) objects. An MPG object has variables for miles, gallons, and miles per gallon, which is calculated in the constructor. The driver class will instantiate 3 Car objects and store them in an array, then add anonymous MPG objects to the ArrayList of MPG objects for each Car. This will be coded directly in the driver, no user input at this point. Using a For-Each loop, the project displays the name of the car, its total MPG and a count of the number of trips for each car. Next, the program asks the user if they want to see the MPG for the individual trips for a single car. If the answer is yes, the user enters any part of the name of the car of interest. Using another For-Each loop, the program goes through the cars to see if the input string appears anywhere in the name of the car, and when it is found, displays each of the MPG objects for that car. You may use any car names you want, and any number of trips for each car. Make sure there are different numbers of trips – look at the example, where it shows 5, 3, and 4 trips. You must have 2 classes and the driver class. Be sure to use For-Each loops to list the fleet inventory, to find the specific car, and to print the individual trips. The miles and gallons must be added to the MPG array list using anonymous objects. Run the project and take a screenshot.
JSON API: http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FFleetInventoryProject
Fork of jcboydsd/FleetInventory
Stars: 0
Forks: 0
Open issues: 0
License: None
Language: Java
Size: 16.6 KB
Dependencies parsed at: Pending
Created at: almost 3 years ago
Updated at: 12 months ago
Pushed at: almost 3 years ago
Last synced at: 12 months ago
Topics: datc, davis-tech, davis-technical-college, object-oriented-programming, sdev
Funding Links https://github.com/sponsors/bell-kevin