Details

A small mail order company has contacted you and asked you to write a program to help them determine the cost of each order. The company sells only sweaters and windbreakers. All items cost $25.00. Orders are shipped in one of three boxes: large (holds 10 items), medium (holds 5 items), and small (holds 1 item). It costs $3.32 to ship a small box, $7.28 to ship a medium box, and $9.17 to ship a large box. Your job is to write a program that determines the minimum number of boxes needed and the total cost of the order. Due to an irrational fear developed during childhood by one of the owners, your program must calculate shipping for full boxes only. I.e., you may not ship 3 items in a medium size box. You must ship three small boxes instead.

The program should use console input and output to interact with the user. A sample program interaction is shown below:


Enter the number of sweaters ordered: 3
Enter the number of windbreakers ordered: 4

Your order will be shipped as follows:
     0 Large boxes  ($9.17 each)
     1 Medium boxes ($7.28 each)
     2 Small boxes  ($3.32 each)

Product subtotal: $175.00
Shipping subtotal: $13.92

Your total cost is: $188.92

Lab report (due 11:00pm, the day prior to week 5 lab)

Each student should indicate how much time you spend on this assignment in the FAST system. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent on this assignment before the due date given above. All time spent on this assignment should be entered into the week 4 column (even if you worked on it in week 5).

This XML template should be used as a starting point for your report.

Each student should submit a lab report. Your report should include:

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost.

If you have any questions, consult your instructor.

Acknowledgment

This laboratory assignment was developed by Dr. Chris Taylor.