Question: I need this program in C++ language --------------------------------------------------------------- arrayNormal + arrayNormal(int) + ~ arrayNormal () + createandDisplay(): void #numbers: int* #size:int -create() : void -display()
I need this program in C++ language
---------------------------------------------------------------
arrayNormal
+ arrayNormal(int)
+ ~ arrayNormal ()
+ createandDisplay(): void
#numbers: int*
#size:int
-create() : void
-display() : void
-----------------------------------------------------------------------------
arrayPrime : public arrayNormal
+ ArrayPrime(int)
- create(): void
----------------------------------------------------------------------------
arrayEven : public arrayNormal
+ arrayEven(int)
- create(): void
------------------------------------------------------------------------------
arrayOdd : public arrayNormal
+ arrayOdd(int)
- create(): void
-----------------------------------------------------------------------------------
SAMPLE PROGRAM
Size of normal array: 3
Size of prime array: 5
Size of even array: 4
Size of odd aray: 5
Normal array: 58 -> 64 -> 41
Prime array : 17 -> 97 -> 13 -> 2 -> 11
Even array : 24 -> 98 -> 2 -> 10
Odd array : 23 -> 69 -> 31 -> 29
-------------------------------------------------------------------------------------------
arrayNormal ,arrayPrime, arrayEven and arrayOdd are classes. arrayPrime, arrayEven and arrayOdd
are subclasses of arrayNormal.
The constructors need to take sizes as integer values and start numbers with
amount integers dynamically. create() functions need to complete the arrays according to their type(normal,even,prime or odd).
display() functions need to display the array on the screen. The createandDisplay() function calls both create() and display() functions at the same time.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
