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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!