Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need all this in C++ and I need a Product.h file and a Product.cpp file. The Product class stores information relevant to a product.

I need all this in C++ and I need a Product.h file and a Product.cpp file.

The Product class stores information relevant to a product. These include product ID (integer), name, description, model (string), price, quantity, UPC (string), product dimensions (Dimensions object), and brand (Manufacturer object). Brand should be declared as a constant. Also include a static variable productCount. Each time a product is created, the product count should increase by 1.

The Product class should have 3 constructors: (1) a default constructor; (2) a constructor that accepts the product ID, name, description, price, quantity, upc, dimensions and manufacturer, (3) a constructor that accepts the product ID, name, description, model, price, quantity, upc, dimensions and manufacturer.

Create accessor and mutator functions for each of the data members. Also create the following functions: printManufacturerDetails, printProduct, printShortProduct, sellItem, returnItem and getProductCount. The table below describes each function.

This is the table:

Function

Description

printManufacturerDetails

Prints all the details of the manufacturer

printProduct

Prints all the product details

printShortProduct

Prints the short version of the product. Product ID, Name, Manufacturer name, and price should be displayed

sellItem

Selling an item reduces it quantity. This function should return true or false if the sale was successful

returnItem

Returning an item increases the quantity of an item.

getProductCount

Returns the value of the static member variable

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago