Question
This part of the assignment will give you practice writing Java classes to a provided API and using Collections. You are to write a set
This part of the assignment will give you practice writing Java classes to a provided API and using Collections. You are to write a set of supporting classes for a simple shopping cart. The instructor has provided the Graphical User Interface (GUI) that will provide the "front end" or "view" to your program. You are to write the back end (what is often referred to as the "domain specific code" or the model). Prices are expressed as real numbers and quantities are expressed as integers (i.e., you cant buy 2.345 units of something). Notice that some of the items have a discount when you buy more. For example, Silly Putty normally costs $4.41 per unit, but you can buy 6 for $10.04. These items have, in effect, two prices: a single item price and a bulk item price for a bulk quantity. The bulk quantity discount is only used if the membership checkbox at the bottom of the GUI is selected. When computing the total with the bulk item discount, apply as many of the bulk quantity as you can and then use the single item price for any leftovers. For example, the user is ordering 12 buttons that cost $0.95 each but can be bought in bulk at 10 for $5.00. The first 10 are sold at that bulk price ($5.00) and the two extras are charged at the single item price ($0.95 each) for a total of $6.90. If the user were ordering 22 buttons, the total would be $11.90 (two bulk quantities plus two extras). At the bottom of the GUI there is a checkbox for a discount for customers who have a store membership. If this box is checked, the bulk pricing discount is applied to any items with bulk pricing as described above. Implementation Guidelines: Your task is to implement the three classes that are used to make this code work: Item ItemOrder Cart
UW Bookstore Tacoma Seattle Bothell order total: $1,374.87 7 UW Note pad, $4.41 (6 for $10.04) 'Java Rules!' button, $0.95 (10 for $5.00 ) 'Java Rules!' bumper sticker, $0.99 (20 for $8.95 ) Computer science pen, $2.00 13 Ring Binder, $9.99 2 Effective Java 3rd Ed, \$18.01 Core Java Vol I 11th Ed, $54.99 Ipad, $349.95 Surface Pro, $399.00 Chromebook, $399.00 1 Macbook Pro, \$1,297.99 Clear customer has store membershipStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started