I simply hate programming, but this is one of the 2 programing subject I have to do to graduate...could u plz give me a hand with this...?
and email me back on email@example.com
Declare a structure of type "Car" to represent a motor car including the elements:
(a) make (string)
(b) model (string)
(c) odometer (int)
(d) manufactureDate (Date - see below)
(e) purchaseDate (Date - see below)
(f) petrolTank, capacity and current level (Tank - see below)
You will need to also declare a structure of type "Date" to represent the:
(a) day (int)
(b) month (int)
(c) year (int)
You will need to also declare a structure of type "Tank" to represent the:
(a) capacity (double)
(b) currentLevel (double)
(That is, you will have structures nested inside structures.)
Write a program that reads (from the user or a file) the car information for a fleet of cars. Put this in an array called "Fleet" that can hold up to 10 cars. (The user and file input must be able to handle less than 10 cars as well.) The program is then to give the user the option of either displaying the fleet on the screen or saving it to a file.
Write the following input functions: "getFleet", "getCar", "getDate", "getTank" (which gets the information from the user) and "readFleet" (which reads the information from a file).
Write the following output functions: "showFleet", "showCar", "showDate", "showTank" (which prints the information to the screen) and "saveFleet" (which saves the information to a file).
Your program is to have appropriate error checking for user input and file I/O.