Write a program that contains at least two classes, where one class is the child of the other and inherits functionality from the parent in a meaningful manner.
Bonus work - Object-oriented design (extra 5 points)
Write a program that contains at least two classes, where one class is the child of the other and
inherits functionality from the parent in a meaningful manner. The child class must add some
functionality that the parent class did not possess. You can use virtual functions, abstract classes,
etc., but you do not have to. The key is to solve some problems in an object-oriented way, demonstrating
(at least) simple inheritance. Document the design process (problem/task specification,
brainstorming, filtering, scenario exploration, implementation) and provide sufficient
documentation so that a potential user can (re-)use your classes for their purposes. (Obviously, you
may not simply copy the 24-hour vs. 12-hour clock example from the lectures. However, your
program can be as simple as that example, or indeed even simpler.)
In a Word document, include a copy of your program (all parts needed to run it – header files, code
parts – and an appropriate main program). Provide as documentation a brief description of what
problem you were trying to solve, and how you decided to do it. You can write up the “brainstorming,
filtering, scenario exploration” parts as a single unit in terms of the final solution you have come up
with. However, you still need to explain the logic behind your choices and should provide CRC cards
for your classes. Documenting the implementation and providing user documentation can also be
fused into a single unit if you wish. Make sure that a potential user (and indeed the marker)
understands how to deploy your classes/program, and can gain at least a basic idea about how your
software works.
Get Free Quote!
308 Experts Online