Here's what I have to do:
The URNext Taxi Company has a fleet of taxis and they want to determine the energy efficiency of each taxi in the fleet as well as that of the entire fleet. Code an interactive COBOL program that accepts the fleet information from the user and generates a report file that indicates the miles per gallon for each taxi, as well as for the fleet as a whole. The program requirements are as follows:
1. Use extended ACCEPT and DISPLAY statements or SCREEN SECTION to capture input from the user. Input consists of records with the following format:
a. Vehicle Identification (10 Alphanumeric characters)
b. Vehicle Description (10 Alphanumeric characters)
c. Miles traveled (4 Numeric digits)
d. Number of gallons of gas used (4 Numeric digits with 2 decimals - 99V99)
2. Energy efficiency (i.e., miles per gallon) is calculated as miles traveled divided by the number of gallons of gas used. For example, if Taxi X traveled 200 miles and used 20 gallons of gas, then its energy efficiency or MPG equals 20 (200 / 20).
3. The expected report format is as follows:
a. Header with the company name and current date.
b. Record header
i. Vehicle ID
ii. Vehicle Desc
iii. Travel Miles
iv. # of Gallons
c. Data record for each vehicle entered (multiple lines expected)
d. Total header
i. Fleet Size
ii. Fleet MPG
e. Total data record for the fleet
4. The program shall continue accepting data from the user until the user indicates that there is no more data.
Raw Data entered by the user:
YLZ563 Taxi X 300 17.5
TXK34ID Taxi Y 350 21.25
EKDIEUI Taxi Z 425 25
Expected Outcome (report):
URNext Taxi Company 07/02/2017
Vehicle ID Vehicle Desc Travel Miles # of Gallons MPG
YLZ563 Taxi X 300 17.5 17.14
TXK34ID Taxi Y 350 21.25 16.47
EKDIEUI Taxi Z 425 25 17.00
Fleet Size Fleet MPG
The fleet size is based on the number of records entered by the user. The fleet MPG is calculated as follows:
1. Add-up the travel miles for each taxi (300 + 350 + 425 = 1075).
2. Add-up the # of gallons used by each taxi (17.5 + 21.25 + 25 = 63.75).
3. Divide the first value by the second one (1075 / 63.75 = 16.86)
This question was answered on: Apr 19, 2020Buy this answer for only: $15
This attachment is locked
Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
About this QuestionSTATUS
Apr 19, 2020EXPERT
YES, THIS IS LEGAL
You can also use these solutions:
- As a reference for in-depth understanding of the subject.
- As a source of ideas / reasoning for your own research (if properly referenced)
NEW ASSIGNMENT HELP?
Order New Solution. Quick Turnaround
WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.