Question: Consider a class IntType with an array data member: value[200]. The size of this array is fixed. The IntType class has 7 member functions as
![Consider a class IntType with an array data member: value[200]. The](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f54078182d9_85566f54077ab104.jpg)
Consider a class IntType with an array data member: value[200]. The size of this array is fixed. The IntType class has 7 member functions as follows: Int Type(): A default constructor that sets the each element of value array to zero. IntType(int x[]): A parameterized constructor that has one input parameter, a integer array. The content of this x() should be copied to value array. Assume the length of the x array is also 200. Operator=(IntType dy): An overloaded operator = for this IntType class. IntType(const intType &x): A copy constructor that has one input parameter of type IntType. bool operator --(IntType &y); // if any array element is different, retum 1 false; otherwise, return true. IntType& operator ++O: pre-fix ++, which increments each array element by 1 before the assignment operation. IntType operator ++(int): post-fix ++, which increments each array element by 1 after the assignment operation. Class IntType 8 { public: IntType(); IntType(int x[]); operator=(IntType &y); IntType(const int Type &x); bool operator= IntType &y): IntType& operator +-0: pre-fix +- IntType operator ++(int); //post-fix +- private: int value[200]: } Write the implementation (i.e., the detailed definition of all six member functions (7 marks) Draw a UML class diagram for this class (3 marks). Consider a class IntType with an array data member: value[200]. The size of this array is fixed. The IntType class has 7 member functions as follows: Int Type(): A default constructor that sets the each element of value array to zero. IntType(int x[]): A parameterized constructor that has one input parameter, a integer array. The content of this x() should be copied to value array. Assume the length of the x array is also 200. Operator=(IntType dy): An overloaded operator = for this IntType class. IntType(const intType &x): A copy constructor that has one input parameter of type IntType. bool operator --(IntType &y); // if any array element is different, retum 1 false; otherwise, return true. IntType& operator ++O: pre-fix ++, which increments each array element by 1 before the assignment operation. IntType operator ++(int): post-fix ++, which increments each array element by 1 after the assignment operation. Class IntType 8 { public: IntType(); IntType(int x[]); operator=(IntType &y); IntType(const int Type &x); bool operator= IntType &y): IntType& operator +-0: pre-fix +- IntType operator ++(int); //post-fix +- private: int value[200]: } Write the implementation (i.e., the detailed definition of all six member functions (7 marks) Draw a UML class diagram for this class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
