Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A program is needed to manage sales of Super Bowl souvenir t-shirts. There are three types of shirts that we are selling: Chiefs t-shirts Eagles

A program is needed to manage sales of Super Bowl souvenir t-shirts. There are three types of shirts that we are selling: Chiefs t-shirts Eagles t-shirts Super Bowl t-shirts The t-shirts are all priced at $40 each without any customization. Input: Your program is to display a menu listing each type of shirt. It should then prompt the user for the number of Chiefs t-shirts they would like to order. After the number of Chiefs t-shirts has been entered (which may be 0), if the number was greater than 0, we will ask if they need to add lettering to the shirt (costs 1 dollar per printed letter) the program should continue displaying a prompt and reading the number to order for the other two types of t-shirts in the same way. The program also needs to keep track of the customer name and mailing address. Prompt and read the customers name, street address, city, state, and zip code. Output: See the following sample run for the format that needs to be used. 1 Sample Run: (bold items are user input) Super Bowl T-Shirts Chiefs T-shirts Eagles T-shirts Super Bowl T-shirts $40.00 $40.00 $40.00 Enter the number of Chiefs T-Shirts to purchase: 1 Would you like to customize (y/n): y What do you want to print on the back of shirt 1: John Doe Enter the number of Eagles T-Shirts to purchase: 1 Would you like to customize (y/n): n Enter the number of Super-Bowl T-Shirts to purchase: 2 Would you like to customize (y/n): y What do you want to print on the back of shirt 1: John Doe What do you want to print on the back of shirt 2: Jenny Doe Please enter shipping information: Enter first name: John Enter last name: Doe Enter street address: 123 Main St Enter city: Normal Enter state: IL Enter zip code: 61761 Order Summary Chiefs T-shirts 1 Chiefs Printed letters 7 Eagles T-shirts 1 Eagles Printed letters 0 Super Bowl T-shirts 2 Super Bowl Printed letters 15 Subtotal Tax Shipping Cost Total $182.00 $18.20 $9.10 $209.30 This order will be shipped to: John Doe 123 Main St Normal, IL 61761 2 Design: You will need to use the following class for your program: TShirtOrder class It should include the following in the main method: Constants o Use constants for the sales tax rate (currently %10), the shipping cost of %5, and the shirt price. Variables o Three variables to keep track of how many shirts are ordered for each type o One variable to keep track of the number of characters to be printed. This variable only counts printed characters. Spaces are not counted. o Variables for first and last names, street address, city, state, and zip code. Scanner to read the input Statements to display the menu to the user similar to the above sample run. Prompts for the user to display output similar to the above sample run. Calculations for the subtotal, tax, shipping and total. Statements to display the order summary similar to the above sample run. Loops and conditions to perform the required operations in the most efficient way. Notes: o You should format your output similar to the sample output including but not limited to: currency formatting, spaces, displaying the prompt and letting the user enter the input in the same line...etc o We only charge and count printed characters when a shirt is customized. Submission: Zip your .java into a file with your initials and Program 3. o Example format: CJH-Program3.zip Upload your zip file with your code to ReggieNet Concepts covered: Chapters 2, 3, 5, and 6 Scanner and Scanner methods DecimalFormat and the format method String variables and String methods Java arithmetic If statements and conditionals While or for Loops 3

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions