Module 5: Classes - Enum, Static Members, Operator Overloading | CMSC 240 Software Systems Development - Fall 2024

Module 5: Classes - Enum, Static Members, Operator Overloading

Class implementation:

Start with the class that you wrote in module 4. Add all of the code from module 4 to this module 5 GitHub repository. Then edit the c++ code to complete the following exercises.

Exercise 1 - Enumeration (enum)

1. Add an enum to your class code to enumerate a set of values where appropriate.
2. Explain your design decision.

Exercise 2 - Static member variable

1. Add a static member to your class code.
2. Explain your design decision.

Exercise 3 - Static member functions

1. Add static member function to your class code to interact with your static member variable.
2. Explain your design decision.

Exercise 4 - Operator overloading

1. Overload an operator in your class code where appropriate.
2. Explain your design decision.

Note: Your code should compile and be well documented with code comments. But it does not have to be completely implemented such that everything operates fully. In other words, some methods may be “stubbed” out to only print out (cout) “in method X”. This is an exercise to get comfortable with the C++ class syntax.