Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 1 (10 points) Design an ADT \"Buzze The Buzzer is a device with two butt

ID: 3601293 • Letter: P

Question

Problem 1 (10 points) Design an ADT "Buzze 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 function

Explanation / Answer

#include 02 #include 03 04 int led(int); 05 void main() 06 { 07 int i, x; 08 ADCON1 = 0x0F;          09 TRISB = 0b11111011; 10 TRISE = 0; 11 12 for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote