Question: Now that you have the basics, try to implement your own C++ class! Let's say we're building an e-commerce site and you are tasked with

Now that you have the basics, try to implement your own C++ class!

Let's say we're building an e-commerce site and you are tasked with implementing a single-item order in a shopping cart.

Your class should be named ShopItemOrder

.

The item order shall store the following information:

item name;

item unit price;

number of items ordered.

There will be access methods allowing to:

get and set all of the above information;

get the total price for the order;

print the order in a user-friendly way.

You can take any approach to calculating the total price.

class ShopItemOrder

{

// Write your code here

};

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!