Question: If you can please don't use these: Stringstream objects, Vectors, Global Variables, Pointers, References IN C++ Create a Product class, with separate interface file (Product.h)

If you can please don't use these: Stringstream objects, Vectors, Global Variables, Pointers, References

IN C++

If you can please don't use these: Stringstream objects, Vectors, Global Variables,

Create a Product class, with separate interface file (Product.h) and implementation file (Product.cpp), comprised of the following attributes: Data members (private): string: name Name of the product double: price Price of the product string: category Category the product falls under Member functions (public): Sets name and category to empty strings, and Default constructor price to 0.0. Parameterized Takes three arguments for initializing name, price and category, in this order constructor Returns name as a string (void) Assigns name the value of the input string getName() setName(string) getPricel) setPrice(double) getCategory setCategory(string) Returns price as a double (void) Assigns price the value of the input double Returns category as a string (void) Assigns category the value of the input string The zip submission should have three files for this problem: Product h, Product.cpp, and a driver called productDriver.cpp, with a main function to test your member functions. In the main() function of your driver file productDriver.cpp, the test cases should include the creation of class objects with both the default and parameterized constructors. You must also test each of the getter and setter member functions by creating and manipulating class objects and displaying output to verify that things are working properly. Refer to cityDriver.cpp to see how to appropriately test your class in this way

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!