Question Details

(Solved by Expert Tutors) Hi, I need help with my COBOL program! I have quite a bit of it already



PLEASE HELP!


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

v. MPG

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

3 16.86

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)

 


Solution details:

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Apr 19, 2020

EXPERT

Tutor

ANSWER RATING

YES, THIS IS LEGAL

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

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)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now