OverviewFor this assignment, each student will write two programs to do the same thing. One program will interact with the user using pop-up windows, and the other program will interact with the user using the console window. DetailsA 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 two programs 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 first program should be written in a class called Lab2GUI and should interact with the user using pop-up windows (JOptionPane). The second program should be written in a class called Lab2Console and should interact with the user using the console window. A sample program interaction for the console version 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
Both programs must be created in a package named the same as your MSOE username (e.g., mine is taylor). If you do not remember how to create a project, package, or class, please ask your instructor. Lab DeliverablesDemonstration (due at the end of week 3 lab)Each student must demostrate compiling and running the pop-up window version of their program to their instructor. Submission (due at 11pm the day of week 3 lab)Each student must submit both programs. Each program must contain comments at the beginning of each file that includes: Course name, Quarter, Assignment name, Author's name, and date (see here). Student's must use the electronic submission form to submit their code. Enter your MSOE username for the username, select "Lab 2" for the assignment, select your Lab2GUI.java implementation for the report file name and Lab2Console.java for the support file name. AcknowledgmentThis laboratory assignment was developed by Dr. Chris Taylor. |