Question
I am needing to transform my code to have multiple classes utilizing inheritance & polymorphism but a little stuck on how to proceed: - Deleting
I am needing to transform my code to have multiple classes utilizing inheritance & polymorphism but a little stuck on how to proceed:
- Deleting user manually entering in the items (transforming case 1 of inventory manager to viewing inventory) - Hard coded: item, description, price, quantity ie banana, yellow, $2.00, 40
Example:
banana {
// price
// description
// cost
// quantity
}
Further detail: Item extends Banana (
}
Shopping Cart extends or implements Item {
}
I still need the ability to add/remove/purchase items with it showing the details of purchase
Current code:
https://wtools.io/paste-code/bA4q
The actual items that I will be utilizing has nothing to do with food items, and will be re-oriented since I will be needing 5 items to choose from so this will not be copy and pasted as a solution Requested information with multiple classes:
- Initialization of the Store inventory (should be invoked when the Store Front starts up).
- Removing a Salable Product from Store inventory (should be invoked when a Salable Product is purchased).
- Adding a Salable Product to Store inventory (should be invoked when a Salable Product purchase is canceled).
- Return the entire inventory.
- Integration of this class with the Store Front application.
- Initialization of the Shopping Cart (should be invoked when the Store Front starts up).
- Adding a Salable Product to the Shopping Cart (should be invoked when a Salable Product is purchased).
- Removing a Salable Product from the Shopping Cart (should be invoked when a Salable Product purchase is canceled).
- Return the contents of the Shopping Cart.
- Empty the contents of the Shopping Cart.
- Integration w/ Store Front App
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Answer To proceed with transforming your code to utilize inheritance and polymorphism you can start by creating classes for the different entities inv...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