A class Mixarray contains an array of integer elements along with its capacity (More than or equal to 3). Using the following description, form a new array of integers which will contain only the first 3 elements of the two different arrays one after another.
Example:
Array1: { 78, 90, 100, 45, 67 }
Array2: {10, 67, 200, 90 }
Resultant Array: { 78, 90, 100, 10, 67, 200}
The details of the members of the class are given below:
| Class name | Mixarray |
| Data members/instance variables: |
| arr[] | integer array |
| cap | integer to store the capacity of the array |
| Member functions/methods: |
| Mixarray (int mm ) | to initialize the capacity of the array cap=mm |
| void input( ) | to accept the elements of the array |
| Mixarray mix(Mixarray P, Mixarray Q) | returns the resultant array having the first 3 elements of the array of objects P and Q |
| void display( ) | to display the array with an appropriate message. |
Specify the class Mixarraygiving details of the constructor(int), void input( ), Mixarray mix(Mixarray,Mixarray) and void display( ). Define a main( ) function to create objects and call all the functions accordingly to enable the task.