Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that you are developing a billing software for a departmental store which sells electronic appliances, clothing, and toys. The store offers discounts on a

Assume that you are developing a billing software for a departmental store which sells electronic appliances, clothing, and toys. The store offers discounts on a festival occasion as below:

  1. a) 20 % discount on electronic appliances whose prices are greater than or equal to $100

  2. b) 30 % discount on clothing if the price of a clothing item is greater than or equal to $50

  3. c) All the toys greater than or equal to $20 are subject to 10% discount.

All goods except toys are taxed at 8.5% of its price. Assume that the person at the checkout counter will be running your application. It has to take details of each item one by one until the check-out employee completes entering all the items in a customers cart. The employee enters the following data for each item:

  1. item code (int)

  2. item name (String)

  3. quantity (int)

  4. price (double)

  5. Category (1. Electronics, 2. Clothing, 3. Toys)

Write a Java program to print itemized receipt along with total bill amount, taxes and savings. The output for the following test input is given below. Use the input to test code. Enter No of Items in the Cart: 3

Enter the item category as: 1. Electronics, 2. Clothing, 3. Toys: Enter the item code: 1 Enter the item Name:

Toaster Enter the item price: 100 Enter the item Quantity: 1 Enter the item Category: 1 Toaster Item code : 1 qty :1 Price/unit : 100.0 Item discount : 20.0 Item total : 80.0 Enter the item code: 2 Enter the item Name: Jeans

Enter the item price: 55 Enter the item Quantity: 1

Enter the item Category: 2 Jeans Item code : 2

qty :1 Price/unit : 55.0 Item discount : 16.5 Item total : 38.5 Enter the item code: 3 Enter the item Name: Softtoy Enter the item price: 20 Enter the item Quantity: 1 Enter the item Category: 3 Softtoy Item code : 3 qty :1 Price/unit : 20.0 Item discount : 2.0

Item total Order Total

: 18.0 : 136.5

Sales Tax Total Bill amount : 146.5725 Total savings : 38.5

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

Students also viewed these Databases questions