Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Im a little lost on how to do this java code, can anyone help? Objective This homework is designed to practice more on Java basics,

Im a little lost on how to do this java code, can anyone help? image text in transcribed
image text in transcribed
Objective This homework is designed to practice more on Java basics, ie., variables, constants, expressions, math, input/output (printf with format specifiers). Part 1. Programming Assignment (44 points) A campus bookstore sells T-shirt, potato chips, and Coke. The list prices are: $18.95 for T-shirt, $1.79 for a bag of potato chips, and $2.99 for a 12-pack Coke ($1.20 deposit as well). All merchandise except Coke is on sale with 15% off the list price. T-shirt is also charged a 6% Michigan sales tax A customer shops at the store to buy these items. Write a Java program (CashRegister.java) to simulate the shopping process, i.e., interacts with the customer and prints a receipt. Important Notes Please read the instructions carefully and make sure your math (tax, deposit, etc.) is correct in your program. See the helpful sample output on the back of the handout. Please refer to HW1's General Requirements section concerning variables, constants, comments, indentations, output formatting, etc. Your program output should look exactly as in the sample out put. You must use printf method with correct format specifiers. Using only spaces and tabs will receive zero credit. Part 2. MyProgrammingLab Exercises (11 points) ll exercises that are due on 1/31 /2019 from C s What is you ave the following items for sale: T-Shirt $18.95 Chips Coke $1.79 $2.99 15% off 15% off How many T-shirts do you vant? 3 How many bags of potato chips? 4 How many 12-packs of Coke? 2 Your total is $65.69 Please enter your payment: 70 ere is your receipt: item unit price anount cost T-shirt Chips Coke Deposit 18.95 1.79 2.99 56.85 7.16 5.98 2.40 Subtotal Discount Tax 72.39 -9.60 2.90 65.69 Total Payment Your change 70.00 4.31 Thank you. Please come again

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

Students also viewed these Databases questions