Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ QUESTION!!! SHOW THAT YOUR CODE WORKS WITH THE GIVEN QUESTION!!! Problem 1 (10 points) Design an ADT Buzzer. The Buzzer is a device with
C++ QUESTION!!!
SHOW THAT YOUR CODE WORKS WITH THE GIVEN QUESTION!!!
Problem 1 (10 points) Design an ADT "Buzzer". The Buzzer is a device with two buttons, green and red, that can be configured with respective "shout" strings. Imagine the Buzzer being used in a game by the audience to "Buzz" for or against a team. When a person pushes the green button on the Buzzer, it can shout (i.e. display), for example, "go spurs"; when the red button is pushed, it can shout "boooo". What it shouts should be configurable Support the following operations on the buzzer: (1) a default constructor to "initialize" the buzzer to some safe shout strings for the red and green buttons (e.g. "configure me before using!"], (2) a parameterized constructor that initializes the red and green buttons to user-specified strings, (3) a destructor, (4) a copy constructor, (5) a config_red function-to configure the string for the red button, (6) a config_green function-to configure the string for the green button, (7) a push_red button function that displays the string configured for the red button, (8) a push_green button function that display the string configured for the green button, (9) use the keyword "const" to label const functions and const object inputs, (10) a static function to display the number of buzzer objects currently alive in memory Demonstrate that your code works using a main functionStep 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