Design a class OddEven to arrange two single dimensional arrays into one single
  dimensional array, such that the odd numbers from both the arrays are at the beginning
  followed by the even numbers.
  Example:    Array 1: { 2, 13, 6, 19, 26, 11, 4 }
  Array 2: { 7, 22, 4, 17, 12, 45 }
  Arranged Array = { 13, 19 11, 7, 17, 45, 2, 6, 26, 4, 22, 4, 12 }
  Some of the members of the class are given below:
  Class name : OddEven
  Data members/instance variables:
  a[ ] : to store integers in the array
  m : integer to store the size of the array
  Methods / Member functions:
  OddEven(int mm) : parameterised constructor to initialize the data member m=mm
  void fillarray( ) : to enter integer elements in the array   
  OddEven arrange(OddEven P, OddEven Q ) : stores the odd numbers from both the parameterized object arrays followed by the even numbers from both the arrays and returns the object with the arranged array
  void display( ) : displays the elements of the arranged array
  Specify the class OddEven giving details of the constructor( ), void fillarray( ),
  OddEven arrange(OddEven, OddEven) and void display( ). Define a main( ) function to
  create objects and call the functions accordingly to enable the task.
        
Solution:
,,,
 
undefined                                                                  


                                            



Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com