containment versus inheritanceThis section examines the development of Triangle, Tetrahedra and associated classes such as Point and Line. The Tetrahedra class is developed using the two different approaches of containment and inheritance. However, before we examine containment versus inheritance, let's first discuss the Vector3D, Point and Line classes used in the design of the Triangle and Tetrahedra classes. The Vector3D class used below is identical to the Vector3D class declared and implemented in VEC3D.H/.CPP. The Point class is similar to that of POINT.H/.CPP, but does add some extra operations:
đang được dịch, vui lòng đợi..
