Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment Part 1 Details Class Design Think of a product that you can buy from a supermarket, like maybe a can of soup or an
Assignment Part Details Class Design
Think of a product that you can buy from a supermarket, like maybe a can of soup or an apple.
Start by listing all the properties of that object that you can think of try to come up with at least ten general
properties of a Product and write these down in your AssignmentPart Microsoft
Word document.
Next, use the process of abstraction to cut the number of properties back to only four key properties write
these down in the next section of your Word document.
Now, fill in the class diagram for your Product class in the Word document. Your product class does not have
CT Programming Fundamentals
Page of
to have any methods ie functions associated with it to perform any actions other than a constructor which
takes and set the four key properties that youve identified.
Next well move on to CheckoutRegister class think about what information the checkout has to keep track
of to allow you to successfully check out of the supermarket. There will only really be three key properties that
the CheckoutRegister cares about, and the CheckoutRegister class should have the following four methods
available:
A default constructor that takes no arguments and initialises a new object and its properties,
acceptpaymentsomeamount
scanitemsomeproduct and
printreceipt
Fill in the class diagram for the CheckoutRegister class in the Word template, and thatsthe first part completed!
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