Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem

A small postal system ships parcels within your state. Acceptance of parcels is subject to the following constraints:

a. Parcels are not to exceed a weight of 50 pounds.

b. Parcels are not to exceed 3 feet in length, width, or depth, and may not have a combined length and girth exceeding 6 feet. (The girth of a parcel is the circumference of the parcel around its two smallest sides; the mathematical formula is

Girth = 2 x (S1 + S2 + S3 - Largest)

where Largest is the largest of the three parcel dimensions, S1, S2, and S3.) Your program should process a transaction file containing one entry for each box mailed during the week. Each entry contains a transaction number followed by the weight of the box and its dimensions (in no particular order). The program should print the transaction number, weight, and postal charge for all accepted parcels, as well as the transaction number and weight for all rejected parcels. At the end of the report, the program must print the number of parcels processed and the number rejected.

Input Parcel post table-

weight and cost (contains 25 pairs of values). Store this table in a one-dimensional array of records. You can then determine the postal cost of each parcel by searching the Weight fields and then using the Cost field. If a parcel weight falls between weight categories in the table, your program should use the cost for the higher weight.

Transaction file-

transaction number, weight, and three dimensions for an arbitrary number of transactions. Assume that all weights are whole numbers, and that all dimensions are given to the nearest inch.

Output First line-appropriate headings.

Next N records-transaction number, whether accepted or rejected, weight, and cost.

Last line-number of parcels processed, number of parcels rejected.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92685723

Have any Question?


Related Questions in Computer Engineering

Question research the recording industry association of

Question : Research the Recording Industry Association of America (RIAA) and the Motion Picture Association of America (MPA), their influence on Federal regulations, and their evolving role in digital media distribution. ...

The freemont automobile factory has discovered that the

The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produce. I need help finding an application that computes and displays a worker's anticipated out ...

Short papercritically analyze current european and united

Short Paper Critically analyze current European and United States industry standards or recommendations for any Information Technology (IT) area or subarea (e.g., intrusion detection, data recovery, data retention, intru ...

Question suppose that we have a computer that can test 240

Question : Suppose that we have a computer that can test 2 40 keys each second. What is the expected time (in years) to find a key by exhaustive search if the keyspace is of size 288? What is the expected time (in years) ...

Can someone help me with the following java question

Can someone help me with the following java question please (a) Implement a recursive search function in Java int terSearch(int arr[], int l, int r, int x) that returns location of x in a given sorted array arr[l...r] is ...

For the following reactionnbsp199nbspgrams ofnbspcarbon

For the following reaction,  19.9  grams of  carbon monoxide  are allowed to react with  14.4  grams of  oxygen gas . Carbon monoxide  ( g ) +  oxygen  ( g )  ------>  carbon dioxide  ( g ) What is the maximum amount of  ...

What is the transmission type transmission form

What is the Transmission Type, Transmission Form, Transmission Speed, Address for Transmission and Collusion for hubs?

Design layout reference mailings review view consolas 105 a

Design Layout Reference Mailings Review View Consolas 10.5 A. A Styles styles H- 1. Report the total payments by date when the total payments are greater than $20,000. 2. List the amount paid by each customer who has pai ...

Statistics students participated in an experiment to test

Statistics students participated in an experiment to test the ability to determine when 1-minute (or 60 seconds) has passed. The results are given below in seconds. Find the range and standard deviation for the given sam ...

You have a deck of magic the gathering cards with 60 cards

You have a deck of Magic the Gathering cards with 60 cards total. In the deck you have 20 Mana cards, 18 Spells, 3 Artifacts, 12 Creatures, 6 Enchantments and 1 Planes Walker. What is the probability that you draw 2 arti ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As