Order ready-to-submit essays. No Plagiarism Guarantee!
Note: Our papers are 100% human-written, not AI-generated.
We Write Essays for Students
Tell us about your assignment and we will find the best writer for your paper
Get Help Now!
mplement the class structure
that represents a shopping cart
for an online shop
and items that
can be put in
the shopping cart
.
Create the following classes
. Use appropriate access modifiers
(
member
variables should be private!)
and data types for each.
Don’t forget to add
getter
and
setter functions
for each member variable.
•
Item
: This class has the
member variable
s
called
title
,
description
, and
price
.
It has a
pure
virtual
function
called print
(
void print() = 0;
)
that prints the type and description of
the current object to the console. This function is NOT
implemented in this class but
must be implemented/overridden in the three subclasses below.
o
Book
:
This class inherit
s
from Item. It has an
instance variable called pageCount.
o
Movie
:
This class inherits from Item. It has an instance variable called length.
o
CD
:
This class inherits from Item. It has an instance variable called trackCount.
•
ShoppingCart
:
This class
keeps track of items that were bought
.
It
has
a single
constructor which expects the maximum number of items that can be placed in the cart.
It must
have a dynamically allocated array of pointer
s
to an item object
(
Item
*
* array
;
)
which is initialized in the
constructor
(
array =
new Item*[size]
).
The cart
must have
functions to add an item
object to the
cart
and
the items c
urre
ntly in the cart to
the console by calling each o
bject’s
()
function.
can anyone do this assignment for me plagiarism free in c++
Welcome to originalessaywriters.com, our friendly and experienced essay writers are available 24/7 to complete all your assignments. We offer high-quality academic essays written from scratch to guarantee top grades to all students. All our papers are 100% plagiarism-free and come with a plagiarism report, upon request
Tell Us “Write My Essay for Me” and Relax! You will get an original essay well before your submission deadline.
