Question: C++: ///////// thinker.h class thinking_cap { public: void slots(char new_green[ ], char new_red[ ]); void push_green( ) const; void push_red( ) const; private: char green_string[50];

C++:

C++: ///////// thinker.h class thinking_cap { public: void slots(char new_green[ ], char

///////// thinker.h

class thinking_cap

{

public:

void slots(char new_green[ ], char new_red[ ]);

void push_green( ) const;

void push_red( ) const;

private:

char green_string[50];

char red_string[50];

};

//////// thinker.cpp

#include

#include

#include "thinker.h"

int main( )

{

thinking_cap student;

thinking_cap fan;

student.slots( "Hello", "Goodbye");

fan.slots( "Go Cougars!", "Boo!");

student.push_green( );

fan.push_green( );

student.push_red( );

return 0;

}

void thinking_cap::slots(char new_green[ ], char new_red[ ])

{

assert(strlen(new_green)

assert(strlen(new_red)

strcpy(green_string, new_green);

strcpy(red_string, new_red);

}

void thinking_cap::push_green

{

cout

}

void thinking_cap::push_red

{

cout

}

In class, the following two files are used to describe an introductory level object oriented program in C++. However, the files may not be complete. Implement the code as a header file and an implementation file and modify the code, if needed to make it operate as advertised

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!