Determine postal cost of parcel by searching weight fields

Assignment Help Computer Engineering
Reference no: EM131857366

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.

 

Reference no: EM131857366

Questions Cloud

How much more money do you estimate you will spend : As a manager of a software development project, you need to give senior management a report on the status of the project.
How many students took the exam : The correct answers are the first 30 characters; they are followed by an integer number that says how many students took the exam (call it N).
How much interest is earned on this investment : You inherit $50,000 and decide to invest it for 40 days compounded daily at 6% annual interest.
Discuss the concept of the balanced scorecard : Discuss the concept of the balanced scorecard. What are its key benefits and advantages?
Determine postal cost of parcel by searching weight fields : You can then determine the postal cost of each parcel by searching the Weight fields and then using the Cost field.
Certificate of deposit that pays compounded interest : Find the future value of a $18,000 Certificate of Deposit that pays compounded interest every three months at the rate of 7% per year.
What are the risk trade offs in your decision : You are the manager of Strategic Sourcing at Toyota Motor Corp and have just been called by the VP of global sourcing to whom you report.
Calculate the future value of an investment : Calculate the future value of an investment of $8200, after 5 months, earning 6% APR, compounded monthly, by calculate manually.
Compare five major search engines : Compare five major search engines from each continent, based on their local markets, strategies, and national characteristics.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd