Imagine you are creating the code for a grocery store self-checkout system. This grocery store is quite small, so they c

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Imagine you are creating the code for a grocery store self-checkout system. This grocery store is quite small, so they c

Post by answerhappygod »

Imagine you are creating the code for a grocery store self-checkout system. This grocery store is quite small, so they currently only have three fruits: Apples (of type ‘green’ and ‘red’), Watermelon (of size “small” and “large”), and Oranges. They also have Vegetables of type ‘tomato’ and ‘corn’. On top of this, they sell tee shirts and gift cards.
Using what you know about inheritance, demonstrate how you would design your java code for this job (JUST the classes, they do not need methods for the self-checkout system yet), assuming that each individual item has its own price. This can either be in the format of Java code or pseudocode. You do not need to fill out every method’s functionality, just provide a comment of that that method should do (and return).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply