write the code in C++ in essence, you are coding a class named Color with 3 data items 2 constructors setters and getters display Edit in the given C++ code--> _________________________________________ class Color { private: // data items three private data items - int pointers named red, green, and blue public: // constructors Color(int); the int is assigned to all three color data items Color(int r, int g, int b); the 3 ints are assigned to the corresponding data items r into red, g into green, b into blue // destructor ~Color(); // setters // getters void display(); blank line Red is "the red data item" Green is "the Green data item" Blue is "the Blue data item" blank line }; // constructors // destructor // display function
write the code in C++
in essence, you are coding a class named Color with 3 data items
2 constructors
setters and getters
display
Edit in the given C++ code-->
_________________________________________
class Color
{
private:
// data items
three private data items -
int pointers named red, green, and blue
public:
// constructors
Color(int);
the int is assigned to all three color data items
Color(int r, int g, int b);
the 3 ints are assigned to the corresponding data items
r into red, g into green, b into blue
// destructor
~Color();
// setters
// getters
void display();
blank line
Red is "the red data item"
Green is "the Green data item"
Blue is "the Blue data item"
blank line
};
// constructors
// destructor
// display function
Step by step
Solved in 5 steps with 1 images