Task Online Shopping System Using classes and arrays, the team will develop a set of functions for an online shopping system. The system is represented by the following structure 1- Class Item having...


Task
Online Shopping System
Using classes and arrays, the team will develop a set of functions for an online
shopping system. The system is represented by the following structure


1- Class Item having the following private attributes: (ID, name, quantity, price) and
the following public methods:
- Constructors (default, parameterized, and copy)
- Setters & Getters
- Operator overloading for the ==, +=,-=, >> and <>
Note that the ID member variable is not entered or read from the user. It is
automatically set by the class as a serial ID starting with the first item of ID 1 and
incrementing with every new object.
2- Class Seller having the following private attributes: (name, email, items,maxItems),
where items is a dynamic array of objects of type Item with the size maxItems. The
class has the following public methods:
- Constructor (parameterized)
- Operator overloading for the insertion <>
- Add An Item.
- This will take an Item object as a parameter:
- If the item already exists in the seller's items you will increase the item’s
quantity by the quantity of the parameter item using the (+=) in Item class,
and the price of the parameter object will be ignored. Use the == operator
for this where an item is equal to another if they have the same name.
- Else you will add it to the seller’s items.
- The member function should return a boolean that indicates the successful
addition of item, which will succeed if there is a place in the array and fail
otherwise.


- Sell An Item.
- This will take an item name and a quantity as parameters
- If the quantity is <= item’s="" quantity="" you="" will="" decrease="" it="" from="" item="">
the (-=) in Item class.
- Else you will print him “There is only {quantity} left for this item”.
- The member function should return a boolean which is true if the item was
found, false otherwise.
- Print Items.
- This will print all the item information for the seller.
- You will print each item using the (<)>


- Find an Item by ID
- This returns an Item object (or a pointer to Item) with the specified ID if
there is an item with such ID.
- Destructor
3- In the main function,
● First you’ll ask the seller to input his details.
● Then you’ll ask him for his store capacity (maxNumberOfItems).
● Then you will show him a menu to choose from which have the following
options:
1. Print My Info.
a. This will print the seller info using the (<) operator="" in="" seller="">
2. Add An Item.
3. Sell An Item.
4. Print Items.
5. Find an Item by ID
6. Exit


14 - C++ - OOP - Operator X<br>Content<br>Bb 4794307<br>9 SCS213-Assignment 2-0OP x<br>* Settings - Passwords<br>b Password Reset | bartleby<br>O File | C:/Users/hanyo/Downloads/SCS213-Assignment%202-0OP(3).pdf<br>H<br>Find an Item by ID<br>This returns an Item object (or a pointer to Item) with the specified ID if<br>there is an item with such ID.<br>Destructor<br>3- In the main function,<br>First you'll ask the seller to input his details.<br>Then you'll ask him for his store capacity (maxNumberOfltems).<br>Then you will show him a menu to choose from which have the following<br>options:<br>1. Print My Info.<br>a. This will print the seller info using the (<<) operator in Seller class.<br>2. Add An Item.<br>3. Sell An Item.<br>4. Print Items.<br>5. Find an Item by ID<br>6. Exit<br>Writing Good Quality Code<br>No program stays the same. It will need to change to fix bugs, add new features, etc.<br>So,<br>It is very important to write high quality readable code, so that you or other developers<br>can be able to review and modify this code in the future. In this task, you<br>will:<br>am saving who the author is the nurnose of the<br>Add a header to vour<br>11:17 PM<br>IA<br>ENG<br>令)<br>12/5/2021<br>...<br>

Extracted text: 14 - C++ - OOP - Operator X Content Bb 4794307 9 SCS213-Assignment 2-0OP x * Settings - Passwords b Password Reset | bartleby O File | C:/Users/hanyo/Downloads/SCS213-Assignment%202-0OP(3).pdf H Find an Item by ID This returns an Item object (or a pointer to Item) with the specified ID if there is an item with such ID. Destructor 3- In the main function, First you'll ask the seller to input his details. Then you'll ask him for his store capacity (maxNumberOfltems). Then you will show him a menu to choose from which have the following options: 1. Print My Info. a. This will print the seller info using the (<) operator="" in="" seller="" class.="" 2.="" add="" an="" item.="" 3.="" sell="" an="" item.="" 4.="" print="" items.="" 5.="" find="" an="" item="" by="" id="" 6.="" exit="" writing="" good="" quality="" code="" no="" program="" stays="" the="" same.="" it="" will="" need="" to="" change="" to="" fix="" bugs,="" add="" new="" features,="" etc.="" so,="" it="" is="" very="" important="" to="" write="" high="" quality="" readable="" code,="" so="" that="" you="" or="" other="" developers="" can="" be="" able="" to="" review="" and="" modify="" this="" code="" in="" the="" future.="" in="" this="" task,="" you="" will:="" am="" saving="" who="" the="" author="" is="" the="" nurnose="" of="" the="" add="" a="" header="" to="" vour="" 11:17="" pm="" ia="" eng="" 令)="" 12/5/2021="">
14 - C++ - OOP - Operator X<br>Content<br>Bb 4794307<br>9 SCS213-Assignment 2-0OP x<br>O Settings - Passwords<br>b Password Reset | bartleby<br>O File | C:/Users/hanyo/Downloads/SCS213-Assignment%202-0OP(3).pdf<br>H<br>1- Class Item having the following private attributes: (ID, name, quantity, price) and<br>the following public methods:<br>Constructors (default, parameterized, and copy)<br>Setters & Getters<br>Operator overloading for the ==, +=,-=,>> and << operators<br>Note that the ID member variable is not entered or read from the user. It is<br>automatically set by the class as a serial ID starting with the first item of ID 1 and<br>incrementing with every new object.<br>2- Class Seller having the following private attributes: (name, email, items,maxItems),<br>where items is a dynamic array of objects of type Item with the size maxItems. The<br>class has the following public methods:<br>Constructor (parameterized)<br>Operator overloading for the insertion << operators<br>Add An Item.<br>- This will take an Item object as a parameter:<br>- If the item already exists in the seller's items you will increase the item's<br>quantity by the quantity of the parameter item using the (+=) in Item class,<br>and the price of the parameter object will be ignored. Use the == operator<br>for this where an item is equal to another if they have the same name.<br>Else you will add it to the seller's items.<br>The member function should return a boolean that indicates the successful<br>addition of item, which will succeed if there is a place in the array and fail<br>otherwise.<br>Sell An Item.<br>- This will take an item name and a quantity as parameters<br>- If the quantity is <= item's quantity you will decrease it from item Using<br>the (-=) in Item class.<br>- Else you will print him “There is only {quantity} left for this item

Extracted text: 14 - C++ - OOP - Operator X Content Bb 4794307 9 SCS213-Assignment 2-0OP x O Settings - Passwords b Password Reset | bartleby O File | C:/Users/hanyo/Downloads/SCS213-Assignment%202-0OP(3).pdf H 1- Class Item having the following private attributes: (ID, name, quantity, price) and the following public methods: Constructors (default, parameterized, and copy) Setters & Getters Operator overloading for the ==, +=,-=,>> and < operators="" note="" that="" the="" id="" member="" variable="" is="" not="" entered="" or="" read="" from="" the="" user.="" it="" is="" automatically="" set="" by="" the="" class="" as="" a="" serial="" id="" starting="" with="" the="" first="" item="" of="" id="" 1="" and="" incrementing="" with="" every="" new="" object.="" 2-="" class="" seller="" having="" the="" following="" private="" attributes:="" (name,="" email,="" items,maxitems),="" where="" items="" is="" a="" dynamic="" array="" of="" objects="" of="" type="" item="" with="" the="" size="" maxitems.="" the="" class="" has="" the="" following="" public="" methods:="" constructor="" (parameterized)="" operator="" overloading="" for="" the="" insertion="">< operators="" add="" an="" item.="" -="" this="" will="" take="" an="" item="" object="" as="" a="" parameter:="" -="" if="" the="" item="" already="" exists="" in="" the="" seller's="" items="" you="" will="" increase="" the="" item's="" quantity="" by="" the="" quantity="" of="" the="" parameter="" item="" using="" the="" (+=")" in="" item="" class,="" and="" the="" price="" of="" the="" parameter="" object="" will="" be="" ignored.="" use="" the="=" operator="" for="" this="" where="" an="" item="" is="" equal="" to="" another="" if="" they="" have="" the="" same="" name.="" else="" you="" will="" add="" it="" to="" the="" seller's="" items.="" the="" member="" function="" should="" return="" a="" boolean="" that="" indicates="" the="" successful="" addition="" of="" item,="" which="" will="" succeed="" if="" there="" is="" a="" place="" in="" the="" array="" and="" fail="" otherwise.="" sell="" an="" item.="" -="" this="" will="" take="" an="" item="" name="" and="" a="" quantity="" as="" parameters="" -="" if="" the="" quantity="" is=""><= item's="" quantity="" you="" will="" decrease="" it="" from="" item="" using="" the="" (-=")" in="" item="" class.="" -="" else="" you="" will="" print="" him="" “there="" is="" only="" {quantity}="" left="" for="" this="" item".="" the="" member="" function="" should="" return="" a="" boolean="" which="" is="" true="" if="" the="" item="" was="" found,="" false="" otherwise.="" print="" items.="" this="" will="" print="" all="" the="" item="" information="" for="" the="" seller.="" you="" will="" print="" each="" item="" using="" the=""><) operator. 11:17 pm ia eng 12/5/2021 ... operator.="" 11:17="" pm="" ia="" eng="" 12/5/2021="">
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here