Question: JAVA. A scanner in the department stores reads in the following string (simulate with file input) 22349999991016183150 Where 1234 (first four digits is the department

JAVA.

A scanner in the department stores reads in the following string (simulate with file input)

22349999991016183150

Where

1234 (first four digits is the department code)

1000-1999 Clothing

2000-2999 Hardware

3000-3999 Food

4000-4999 Toys

5000-5999 Sporting Goods

6000-9999 Misc.

999999 (next 6 digits) are the part number

032018 next 6 digits are the date (mmddyy)

3150 The remaining digits are the price in pennies ($31.50)

Print out the following receipt to screen and data file

ACME STORE October 16, 2018

Hardware Department

Item # 999999

Price $31.50

Discount (10%) $3.15

Tax (6.625%) $1.88

Total $30.23

************************************************************************

Purchasers with a discount card get 10% off (use a Boolean flag and ask users if they have a card).

There is no tax on clothing or food.

Use a switch statement to decode month.

Decimal places line up

Dont print discount or tax line if not applicable

Use printF!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!