This assignment is a project in C++ for my class OOP with Embedded Systems, it has for theme a Magical word. My assignment was : Your first assignment is to write a single body of code example that integrates and demonstrates the following aspects of OOP in C++:
- Inheritance through the use of multiple classes. This should include multiple inheritance as one example, which does not have to make perfect sense in the real-world. (Please note Point 2.)
- Separate compilation with all classes in your assignment (i.e., all classes should have .cpp and .h files).
- One abstract class with an abstract method that is implemented in a child class. This should be integrated into your code in Point 1.
- Correct and appropriate use of the access specifiers public, private, and protected with your classes.
- Passing an object to a function by value and by reference. Demonstrate the impact of the change on the states of your object.
- Calling a method on an object that is const qualified and passing the same object to a function by constant reference.
- Correct use of new and delete for the allocation of an object/objects, with operations on the object using pointers.
- Create an array of pointers to objects (minimum 3 elements) of one of your classes and pass this array to a function that displays all elements.
- A simple destructor with some basic functionality in one of your classes. Demonstrate two examples of how it can be called.
- Use of dynamic binding with virtual & non-virtual methods. Demonstrate the impact.
- Correct use of three overloaded operators (e.g., +, = and ==) for one of your classes.
- Implement a non-member operator in one of your classes.
- Write code to demonstrate an object passing itself to a function (that is not part of a class), which modifies the state of that object.
- A class with a modified copy constructor and demonstrate the effect of this on pass-by-value and pass-by-reference calls.
- Use of two different C++ explicit style casts.
- Implement static states and methods in one of your classes and show example usage and impact.
- Demonstrates the difference between a C++ class and a C++ struct.
- Write a straightforward example class template using the examples in the notes.
- Use of the vector container to contain a number of objects of one of your classes using the examples in the notes. 20.Use of an algorithm on your container using the examples in the notes.