#ifndef ORIGINAL_H #define ORIGINAL_H #include #include #include #include "New1.h" #include "New2.h" #include "New3.h" /* this class is the restructured version of the original class based on our new cohesion metric and restructuring technique Author: Mehmet KAYA */ using namespace std; class Class1 { private: New1* n1; New2* n2; New3* n3; void ErrorInSizeFunInvok() { n2->fun2_1(); } void ErrorInSize() { n1->fun1_1(); } public: Class1(int left=0,int up=0, int right=0,int bottom=0) { n1=new New1(); n2=new New2(); n3=new New3(left,up,right,bottom); } ~Class1() {} int Height() { n2->fun2_2(); return n3->fun3_1(); } int Width() { n2->fun2_3(); return n3->fun3_2(); } int Area() { n2->fun2_4(); return n3->fun3_3(); } int Perimeter() { n2->fun2_5(); return n3->fun3_4(); } void Clear() { n2->fun2_6(); n1->fun1_2(); } void printAllInvoks() { n2->fun2_7(); } void PushFunInvok(std::string str) { n2->fun2_8(str); } void Push(int i) { n2->fun2_9(); n1->fun1_3(i); } int Pop() { n2->fun2_10(); return n1->fun1_4(); } int Size() { n2->fun2_11(); return n1->fun1_5(); } }; #endif