Käynnissä

C Billing Report

Directions:

A bus line called the World's Longest Street Bus Line, wants you to write a program that produces a billing report based on passenger trips and cost of trips. The company has a large fleet of buses that run between towns, on different parts of Yonge Street from Toronto to Barrie. Yonge Street is over 700 miles long and is the longest street in the world. The buses can stop at many towns between Toronto and Barrie.

These buses are equipped with the latest satellite technology that can tell where all buses are located. In order for a passenger to use the bus they need a credit card. When the passenger gets on the bus they slide their credit card into a machine. The machine reads the credit card number and sends a message containing the credit card number and the location where the passenger got onto the bus to the satellite. The satellite then sends the message to the head office of the bus line. When the passenger gets off the bus, they insert their credit card again and the same process occurs.

The program will read two files: [url removed, login to view] (containing data about prices and cities), and [url removed, login to view] (containing all the trips taken in a single day). The program will process these files and produce a file: [url removed, login to view] (containing billing information), and also will print summary information on the screen...

Example of How Program Should Work:

NOTE: There are no specific test dialog examples, but a general description how the program should run. Please read this section very carefully to help plan, write and test out your solution.

The [url removed, login to view] file contains one record (line) for each town with a town ID and a town price. The towns are listed, starting at Toronto. An example of 5 towns is:

7 0.00

15 5.00

22 10.00

3 15.50

40 25.00

The first town (Toronto) has an ID of 7 and a price of $0.00. The second town has an ID of 15 with a price of $5.00, etc. The cost of a trip from the 2nd town to the 4th town is $15.50 - $5.00 = $10.50.

The cost of a trip from the 5th town to the 2nd town is $25.00 - $5.00 = $20.00.

The [url removed, login to view] file contains one record for each passenger trip on a single day with an entry town ID, exit town ID and credit card number. A credit card number consists of 11 characters. An example of 6 trips is:

7 15 MC123456789

3 15 AE111222333

3 99 AB432344655

40 40 VZ333222111

40 7 VI010101010

7 40 VI010101010

Your program must write one record to the [url removed, login to view] file for each trip containing the credit card number, entry town ID, exit town ID and trip cost. If either the entry or exit town ID is not found in the prices file, or if the entry town equals the exit town, then the record must indicate an error and show the town IDs. The data must be neatly aligned. An example, based on the above files is:

--- BILLING REPORT ---

MC123456789 7 15 $ 5.00

AE111222333 3 15 $10.50

** INVALID TOWN DATA: 3 99 *

** INVALID TOWN DATA: 40 40 *

VI010101010 40 7 $25.00

VI010101010 7 40 $25.00

--- END OF BILLING REPORT ---

NOTE: Summary lines are to be printed on the screen showing the number of valid and invalid trips, and the total cost of all trips. For example:

Number of valid trips processed: 4

Number of invalid trips processed: 2

Total trip revenue: $65.50

Additional Considerations:

Because your program must search the price data for each trip, it is efficient to first load the town and price data into arrays. However, because of the possible size of the trip file you should not load the trip data into an array.

For each trip your program must search for the trip's entry town and exit town, so you must code and use this function:

int search( int data[ ], double value[ ], int size, int key, double *pkeyValue)

that will sequentially search the dataarray (containing size number of items) for the value of the parameter key. If the key is found then set the last parameter to the value of the corresponding item from the value array, and return 1 (true). Return 0 (false) if the value is not found.

Taidot: C-ohjelmointi

Näytä lisää: program billing, billing report, billing program, program example billing, pkeyvalue programming, rpt test, report how to write, parts town, out of office message, on line data entry test, n equals, line card examples, int size c, how you write report, how write report, how to write report, how to write a summary report, how to write a report for work, how to run an office, how can write report, how can write a report, how can one write a report, how 2 write a report, fleet one, dialog information technology

About the Employer:
( 7 reviews ) Stouffville, Canada

Projektin tunnus: #412982

Myönnetty käyttäjälle:

malsaid

Hello.. Please, check PMB...

30 $ USD 1 päivässä
(2 arvostelua)
1.8

17 freelanceria on tarjonnut keskimäärin 38 $ tähän työhön

WhizPool

C/C++ program within 3 hours of accepting bid will be provided to you with full reliability and quality. Thanks.

100 $ USD 0 päivässä
(7 arvostelua)
5.8
fstudio

Dear sir, I can do it for you, Could you see PMB for more details? Thanks. Best Regards.

30 $ USD 1 päivässä
(55 arvostelua)
5.6
muhmuuh

Hello! Please check PM for details. Thanks

30 $ USD 1 päivässä
(19 arvostelua)
4.3
azksoft

Hi, please check PMB. Thanks.

30 $ USD 1 päivässä
(13 arvostelua)
4.0
moments

Greetings! Please see PMB. Thank you.

50 $ USD 1 päivässä
(1 arvostelu)
3.6
abhipsb

Hi, Please check PMB. Regards Abhi

30 $ USD 0 päivässä
(1 arvostelu)
2.6
theonejb

I have experience with these kinds of projects that have simple text file parsing and data searching. I will be able to deliver the completed software within a day and the end result shall meet your expectations entire Lisää

40 $ USD 1 päivässä
(1 arvostelu)
0.0
shvepsa

Dear Anile8er, I am a senior C/C++ developer with 4 years of professional programming experience. Please check [url removed, login to view] for details about my background. The project is interesting and I would b Lisää

30 $ USD 1 päivässä
(0 arvostelua)
0.0
devalot

Please, check your PM

30 $ USD 1 päivässä
(0 arvostelua)
0.0
pagx

It is an easy job.

30 $ USD 1 päivässä
(0 arvostelua)
0.0
som4tress

Waiting for your go ahead.....

30 $ USD 1 päivässä
(0 arvostelua)
0.0
kkiranhcu

will do it for free. But it is being my first project. Want nominal amount.

30 $ USD 2 päivässä
(1 arvostelu)
0.0
nserv

Hi, This can be done in a few hours. Please check PM. cheers.

30 $ USD 0 päivässä
(0 arvostelua)
0.0
fatima786

i am interested in developing the project.

35 $ USD 1 päivässä
(0 arvostelua)
0.0
mugiltsr

I could do this project with great ease.

60 $ USD 1 päivässä
(0 arvostelua)
0.0
lavansri

Hi, I will finish this project in few hours, if interested please contact me. Please check your PM

30 $ USD 0 päivässä
(0 arvostelua)
0.0