Question: ASSIGNMENT #7 Due: 4/14 This assignment demonstrates array of STRUCT (structures), two dimensional arrays and the use of index sorting routine. The problem: A trucking

ASSIGNMENT #7 Due: 4/14

This assignment demonstrates array of STRUCT (structures), two dimensional arrays and the use of index sorting routine.

The problem:

A trucking company charges the customers a fixed amount per pound, based on the following (Zone-Area) table.

Area code Area code Area code

Zone 1 2 3

code

1 .40 .55 .68

2 .60 .70 .85

3 .75 .79 .96

4 .90 1.05 1.10

5 .99 1.08 1.15

Write a program which will read in the above table into a two dimensional array. The array will be used to calculate the shipping cost. Your program will read in the name of the customer, the zone-area code, and the weight of the item shipped. The zone-area code consists of two digits, the first one indicates the zone, and the second indicates the area.

Assume there are less than 20 records for one truckload.

Print all customers information and their shipping charges in a report form. The end of the report must contain the total of all of the customers weight and a total of all the shipping charges.

Reproduce the above report in alphabetical order by customers name

Reproduce the above report sorted by weight.

Produce a report of all the companies in area code number two.

Your test data will be similar to the following:

3

Chevrolet 23 750

Zapata Co. 53 385

Schlumberger 51 1104

The first line of the data file will contain a header record indicating how many customer records are to follow.

The actual test data will be stored under DATA7.txt

The Zone-Area table will be stored under TABLE7.txt

Submit your source code in blackboard and demonstrate your program in lab.

Documentation will be 20% of your grade.

Your source code must contain the following documentation.

Header information: (Source Code and Output)

Your Name, course & section number, assignment number and due date.

A brief description of your assignment.

Variable dictionary: A brief description of every variable used in your program.

Comments related to input and output of data and all formulas used in your code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!