Menu

[Solved]Lab 111 Gauge Class Problem 1 Implement Class Gauge Design Details Design Gauge Class Gaug Q37045001

Lab 11.1 Gauge Class Problem 1: Implement Class Gauge Design Details: Design a Gauge class. A Gauge is a type of counter thatPlease Write a C++ program

Lab 11.1 Gauge Class Problem 1: Implement Class Gauge Design Details: Design a Gauge class. A Gauge is a type of counter that specifies a positive value up to a certain gauge maximum. Gauge is always positive. More specifically, Gauge belongs to the range between 0 and the largest integer possible on your operating system (i.e. use the climit library). Your Gauge class must have two data attributes 1. counter value 2. max value The operations that you need to perform on the Gauge are: 1. Default constructor: sets the gauge’s counter to O and max to max integer value 2. Class constructor: sets the gauge’s counter and maximum value (validate the counter and max values) . Increment: increase the gauge’s counter by a user-specified value. (Note: counter cannot exceed the max) 4. Decrement: decrease the gauge’s counter by a user-specified value. (Note: counter cannot exceed the max) 5. Set: sets the gauge’s counter to a user-specified value 6. Get: returns gauge’s counter value. 7. setMax: sets the gauge’s maximum value to a user-specified value. (Note: value should be larger or equal to the current gauge value) 8. getMax: returns gauge’s maximum value. Class Demonstration: Write a main program that demonstrates the uses of your class, create atleast one Gauge object and make atleast one call to each of the functions described above Show transcribed image text Lab 11.1 Gauge Class Problem 1: Implement Class Gauge Design Details: Design a Gauge class. A Gauge is a type of counter that specifies a positive value up to a certain gauge maximum. Gauge is always positive. More specifically, Gauge belongs to the range between 0 and the largest integer possible on your operating system (i.e. use the climit library). Your Gauge class must have two data attributes 1. counter value 2. max value The operations that you need to perform on the Gauge are: 1. Default constructor: sets the gauge’s counter to O and max to max integer value 2. Class constructor: sets the gauge’s counter and maximum value (validate the counter and max values) . Increment: increase the gauge’s counter by a user-specified value. (Note: counter cannot exceed the max) 4. Decrement: decrease the gauge’s counter by a user-specified value. (Note: counter cannot exceed the max) 5. Set: sets the gauge’s counter to a user-specified value 6. Get: returns gauge’s counter value. 7. setMax: sets the gauge’s maximum value to a user-specified value. (Note: value should be larger or equal to the current gauge value) 8. getMax: returns gauge’s maximum value. Class Demonstration: Write a main program that demonstrates the uses of your class, create atleast one Gauge object and make atleast one call to each of the functions described above

Expert Answer


Answer to Lab 11.1 Gauge Class Problem 1: Implement Class Gauge Design Details: Design a Gauge class. A Gauge is a type of counter… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *