TITLE: Terminology for ADT, abstract class, etc PROBLEM: impellus@cs.ucsd.edu (Tom Impelluso) Could someone explain the differences between the terms Class vs. Object vs. Abstract Data Type. RESPONSE: rmartin@rcmcon.com (Robert Martin), 9 Apr 94 There are two definitions of ADT. One has it as a class with nothing but pure virtual functions. The other has it as a data structure with an entorage of associated functions. I prefer the latter. In C++ it corresponds to a class with member functions, none of which are virtual. [ The first is an ABC (abstract base class); the second is an ADT. -adc ] A class is the definition of a data structure and its associated functions. Similar to a 'struct' in C, but with functions associated with it. class complex { public: double Magnitude() {return sqrt(itsReal*itsReal + itsImaginary+itsImaginary);} private: double itsReal; double itsImaginary; }; An object is an instance of a class: complex c; // the class is 'complex', the object is 'c'. RESPONSE: lincmad@netcom.com (Linc Madison) An abstract data type is an encapsulated representation of the data needed to describe some category of objects with the operations that can be performed on those objects. The term for a class which has at least one (not "nothing but" but only "at least one") pure virtual function is an *abstract class*, not an abstract data type. The representation of an ADT in C++ may or may not have virtual member functions; that question is orthogonal.