Fall 2006 |
Clay Shields |
Project 1PIE, Inc. Wedding Invitation Cost Calculator
Assigned: September 21 |
Our first project this semester will be to help Pat's Invitation
Emporium, Inc. by writing a program that can help them prepare
bills for orders that they receive. Pie, Inc. prints two different types of invitations. They have 5" x 7" smaller invitations or 7" x 7" larger invitations. Each is available in ivory or white. The smaller invitations are $1.49 each, the larger are $1.79 apiece.
To add color, it is possible to add a backing sheet to each
invitation so that it will show a border of color around the
edge. Colors offered by PIE, Inc. are:
Invitations can also be printed using two different colored inks that match the background colors listed above. The cost for using two different inks is $0.75 per invitation. Finally, the minimum order for invitations is 30, and only in multiples of 10. State law requires that PIE, Inc. charge a 4.75% sales tax on all orders.
Your AssignmentFor this project, you will write a program that takes for input the size of the invitations ordered; whether a backing sheet is chosen or not; whether two ink color printing is chosen or not; and the number of invitations ordered. The output should show the total cost of the order, the amount of tax, and the cost of the order with tax. Below is the output of a program that does this:seva> ./inviteYou can also run a version of a program that does this yourself, by logging onto seva and typing ~clay/invite. This can be helpful in testing your own program.
Part 1 - Design DocumentFor the first part you are to submit a design document showing the algorithm you plan to implement. Write it out neatly using a language which is similar to that from Homework 1 and has the following terms:
statement ... statement end
Part 2 - Program Source CodeImportant: Your output and input should be very similar to that shown in the example program. Please ask for the input in exactly the same order shown and only request the same items shown - do not ask for any other input. This will assist in grading your program.I expect your program to have the following features, similar to the one that you can run to compare your program to:
Include the following header in your source code. // // Project 1 // Name: <your name> // E-mail: <your e-mail address> // COSC 071 // // In accordance with the class policies and Georgetown's Honor Code, // I certify that I have neither given nor received any assistance // on this project with the exceptions of the lecture notes and those // items noted below. // // Description: <Describe your program> //
You will submit your To submit your program, make sure there is a copy of the source code on your account on seva. You may name your program what you like - let's assume that it is called invite.cc. To submit your program electronically, use the submit program like we did in Homework 2, but with the command: submit -a p1 -f invite.cc I will not be enabling the electronic submission until after the design documents are in, so don't try to submit too early. |