Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB 04 - PHOTO ORDER In this assignment, we'll add efficiency to the program you created in Lab 01. Using Lab 01 as a guide,

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

LAB 04 - PHOTO ORDER In this assignment, we'll add efficiency to the program you created in Lab 01. Using Lab 01 as a guide, implement the following concepts into the program: - Get user input for today's date and the customer's first name, last name, phone number - Use a loop to display the photo packages available and keep a running total of the purchases. The loop will continue until user chooses to order individual items. - Use a different type of loop to display the individual items available and keep a running total of the purchases. The loop will continue until user chooses to process the order. - Get current time for the order using code given in the textbook - Display the output as noted in the sample input below - In addition: - Use augmented assignment operators when concatenating strings and summing and use double quotes for inches. If user enters an invalid menu number, display an error message to try again. Dollar amounts are formatted to 2 decimal places and use a comma to separate thousands. Use Google for comma separation. Sample output also includes a field of 6 , but that is optional. On display, convert month, first name, last name, and the list of items to all uppercase characters. If no items were purchased, display a message and that no items were purchased and contact information (see 2nd run of sample output). Notice that the order total is not displayed. *NOTE: for those already familiar with Java programming, please keep this simple: no methods, no arrays, nothing fancy. You must use only the concepts discussed through Chapter 5 and concepts presented in the jar files up to this point. Before starting this lab, be sure to refer to the "How to Submit Assignments" document in elearn for proper documentation, indention, naming conventions, etc. Points may be deducted if submitted incorrectly. REMINDER: Any sources used besides the textbook or the instructor must be documented in your program with details such as URL. Required project name: LastnameFirstname04 Required package name: chap 5 Required class name: Demoloops Here are 2 sample runs of the program. Your program should display something similar. User input is green text. Today's date: September 19 First name: Ms. Josephine Last name: Davidson Phone: 937-234-5678 Packages available: Picture Packet includes 4"x6", 5"x7", 8 " 10 prints. 1. Picture Packet \& Photo Button $24.99 2. Picture Packet \& Photo Magnet $25.99 3. Picture Packet, Button, Magnet $29.99 4. Calculate subtotal 5. Proceed to order individual items Enter the menu item: Invalid choice. Please try again. Picture Packet includes 4"x6", 5"x7", 8"x10" prints. 1. Picture Packet \& Photo Button $24.99 2. Picture Packet \& Photo Magnet $25.99 3. Picture Packet, Button, Magnet $29.99 4. Calculate subtotal 5. Proceed to order individual items Enter the menu item: 1 Packages available: Picture Packet includes 46,57,810 prints. 1. Picture Packet \& Photo Button $24.99 2. Picture Packet \& Photo Magnet $25.99 3. Picture Packet, Button, Magnet $29.99 4. Calculate subtotal 5. Proceed to order individual items Enter the menu item: 3 Packages available: Picture Packet includes 46,57", 8"10 prints. 1. Picture Packet \& Photo Button $24.99 2. Picture Packet \& Photo Magnet $25.99 3. Picture Packet, Button, Magnet $29.99 4. Calculate subtotal 5. Proceed to order individual items Enter the menu item: 4 Your subtotal is $54.98 Packages available: Picture Packet includes 4"x6", 5" 7",8 " 10 prints. 1. Picture Packet \& Photo Button $24.99 2. Picture Packet \& Photo Magnet $25.99 3. Picture Packet, Button, Magnet $29.99 4. Calculate subtotal 5. Proceed to order individual items Enter the menu item: 5 Individual items available: 1. 4"x6" Print $5.00 2. 57 Print $7.50 3. 810 Print $10.00 4. 3" Button $7.50 5. 3" 3 Magnet $8.00 6. Add'l Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 6 Invalid choice. Please try again. Individual items available: 1. 4" x6 " Print $5.00 2. 57 Print $7.50 3. 8 "x10" Print $10.00 4. 3" Button \$7.50 5. 3" 3 Magnet $8.00 6. Add'l Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 2 Individual items available: 1. 4" x6 Print $5.00 2. 57 Print $7.50 3. 8"x10" Print $10.00 4. 3" Button $7.50 5. 3"x3" Magnet $8.00 6. Add'1 Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 3 Individual items available: 1. 4"x6" Print \$5.00 2. 57 Print $7.50 3. 8 "x10" Print $10.00 4. 3" Button $7.50 5. 3"x3" Magnet $8.00 6. Add'1 Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 7 Your subtotal is $72.48 Individual items available: 1. 4"x6" Print $5.00 2. 57 Print $7.50 3. 8"x10" Print $10.00 4. 3" Button $7.50 5. 3" 3 " Magnet $8.00 6. Add'1 Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 1 Individual items available: 1. 4"x6" Print \$5.00 2. 57 Print $7.50 3. 8"x10" Print $10.00 4. 3" Button $7.50 5. 3"x3" Magnet $8.00 6. Add'1 Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 8 SCC Photography ...keeping memories alive Order date/time: SEPTEMBER 19 16:2:57 GMT Order for MS. JOSEPHINE DAVIDSON Phone: 937-234-5678 Payment due at pickup: \$77.48 Items purchased: PICTURE PACKET \& BUTTON PICTURE PACKET, BUTTON, MAGNET 57PRINT8"10"PRINT4"6"PRINT Thank you for using our services! Today's date: September 18 First name: mr. mark Last name: carson Phone: 937-987-6543 Packages available: Picture Packet includes 4"x6", 5"x7", 8 "x10" prints. 1. Picture Packet \& Photo Button $24.99 2. Picture Packet \& Photo Magnet $25.99 3. Picture Packet, Button, Magnet $29.99 4. Calculate subtotal 5. Proceed to order individual items Enter the menu item: 5 Individual items available: 1. 4"x6" Print $5.00 2. 57 Print $7.50 3. 8 "x10" Print $10.00 4. 3" Button $7.50 5. 3" 3 " Magnet $8.00 6. Add'l Picture Packet $15.00 7. Calculate subtotal 8. Process the order Enter the menu item: 8 SCC Photography . keeping memories alive Order date/time: SEPTEMBER 1816:17:18 GMT Order for MR. MARK CARSON Phone: 9379876543 No items were purchased Please call us at 9374567890 if you have any questions. Helpful Notes: Project, package, and class should be named as required. - Be sure to follow standard Java coding and naming conventions (variable names, indentation, comments, etc.). - It's critical to include your name, date, etc. at the top of your program, along with other requirements noted in How to Submit Assignments in elearn Course Overview. Always include comments! Do not use wildcard * to import the Scanner class. Wildcards use too many resources. - For line breaks, use escape character +n instead of an extra line of code for an empty sysout. Also, when lining up dollar amounts, it may be more efficient to use tabs instead of spaces. Be sure to implement two different types of loops. - Confirm double quotes display correctly, as in 4 "x6". - Reread the assignment and run the sample output (as well as your own test cases) to confirm all requirements have been met

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 9th International Conference Dasfaa 2004 Jeju Island Korea March 2004 Proceedings Lncs 2973

Authors: YoonJoon Lee ,Jianzhong Li ,Kyu-Young Whang

2004th Edition

3540210474, 978-3540210474

More Books

Students also viewed these Databases questions