Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions