SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 09 Nov 2017 My Price 10.00

Company has a fleet of taxis and they want to determine the energy

Hi, I need help with my COBOL program! I have quite a bit of it already completed; my code thus far is attached.

 

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)

Attachments:

Answers

(5)
Status NEW Posted 09 Nov 2017 01:11 PM My Price 10.00

----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y

Not Rated(0)