Question: Need help with C++ programming and creating a map class. There are many functions I will need done but I need help figuring out what
Need help with C++ programming and creating a map class. There are many functions I will need done but I need help figuring out what map declaration of objects I need. These are the four functions ill be dealing with.
gram must have a Catalog class with the indicated functions:
AddCategory: Given a category number and name, add it to the catalog. It will have an empty product list. Return false if the category number already exists in the catalog, true otherwise.
AddProduct: Given a category number, a product number, and a product name, add the product to the catalog. Return false if the category number doesnt exist in the catalog or if the product number already exists within the category, true otherwise.
GetCategoryCount: Return the number of categories in the catalog.
GetProductCount: Given a category number, return the number of products in the category; return -1 if the category doesnt exist.
So how do i declare objects such as Product name, product name etc. I was thinking like - map
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
