Module 4: Classes - Abstraction and Encapsulation | CMSC 240 Software Systems Development - Fall 2024

Module 4: Classes - Abstraction and Encapsulation

Class implementation:

Implement the class that you designed in the breakout activity during lecture.

Create a .h header file for your class. In your header file declare the class.

You should include the following:

Next create a .cpp code file where you will implement the member functions that you declared in your class.

Remember to:

Example of the include guard:

#ifndef MY_CLASS_H
#define MY_CLASS_H

// Declare your class here...




#endif

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.