In: Computer Science
Use C++ please
Implement the following exercise on Visual Studios and submit
the necessary
(.h and .cpp) files in a .zip folder
1. Create a class NumberType such that it has the following functionality:
The draw function in NumberType only prints 'this is an empty function' message.
Create a class NumberOne (derived from NumberType) which in the
draw function prints the number using a 5(rows)x3(columns)
matrix.
See example at https://www.istockphoto.com/vector/led-numbers-gm805084182-130563203
*
*
*
*
*
Similarly create a class NumberTwo (derived from NumberType)
which draws:
***
*
***
*
***
Similarly create a class NumberThree which draws:
***
*
***
*
***
and so on to 9, and 0.
Then in the main program, create a function which receives a pointer to a NumberType object.
Then, it executes the draw function inside the function.
Try the function using different number objects such as NumberZero, NumberFour, NumberTwo, etc.
To display the appropriate number, the draw function in the base class NumberType must be virtual.