- Criteria:
- 1. Add menu items that allow the user to request saving and loading
-
- 2. Add member functions to allow saving and separate ones for loading (fixed file name)
-
- 3. Object-oriented approach; it must contain only member functions
-
- 4. main() which should do no more than create the first object
-
- 5. All members must be private
-
- 6. Document properly the code you add, with neat structure
-
- Hints:
- 1. Decide on the classes you need, include a set of classes that implement the functionality of the code in such a way that they could be used by other developers
-
- 2. To establish suitable member functions, take into account the responsibilities of each class; for example, which class should perform the filtering operation?
-
- 3. Encapsulation dictates that, as far as possible, an object should be responsible for its own data
-
- 4. Use polymorphism only as appropriate. The general rule is that if an inbuilt operator matches the purpose of a member function then it should be overloaded.
-
- 5. Use inheritance only where necessary. Only if you can reasonable say that object A is a type of object B should A inherit from B. For example, a car is a type of vehicle, but a table isn’t a type of elephant (even if both normally have four legs).