Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HuuULU Data UCURESTIUlle On 1.23: LAB* Warm up: Online shopping cart (Part 1) E zyBooks catalog 1.23 LAB*: Warm up: Online shopping cart (Part 1)
HuuULU Data UCURESTIUlle On 1.23: LAB* Warm up: Online shopping cart (Part 1) E zyBooks catalog 1.23 LAB*: Warm up: Online shopping cart (Part 1) (1) Create two files to submit: .ItemToPurchase.java -Class definition Shopping Cart Printer java - Contains main() method Build the ItemToPurchase class with the following specifications: Private fields String itemName - Initialized in default constructor to "none" int itemPrice - Initialized in default constructor to 0 int itemQuantity - Initialized in default constructor to o Default constructor Public member methods (mutators & accessors) setName() & getName() (2 pts) setPricel) & getPrice0 (2 pts) setOuantity & getOuantity (2 pts) (2) in main prompt the user for two items and create two objects of the Item To Purchase class. Before prompting for the second ite! schr.nextLine(); to allow the user to input a new string. (2 pts)
Step 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