Question
C++ programming Using the attached header file , create the companion . cpp file #pragma once #ifndef CRAYONBOX_H #define CRAYONBOX_H #include using namespace std; class
C++ programming
Using the attached header file, create the companion .cpp file
#pragma once #ifndef CRAYONBOX_H #define CRAYONBOX_H #include using namespace std;
class CrayonBox { private: string brand; int numInBox; static int numBoxes; string * colors; // pointer to dynamically allocated array of size numInBox void setColors(string *, int); // sets up array of colors public: CrayonBox(string, int, string *); ~CrayonBox(); static int getNumBoxes() { return numBoxes; } int getNumInBox() { return numInBox; } string getBrand() { return brand; } void setNumInBox(int); void printBox(); // print brand, numInBox, and colors }; #endif
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started