CMPSC 24 Chapter Notes - Chapter 2: Standard Template Library, Local Variable, Binary Function
Document Summary
Chapter 2: abstract data types and c++ classes. Oop = an approach to programming in which data occurs in tidy packages called objects. Member functions are part of the objects and manipulate the object. Class = the mechanism to create objects and member functions. Abstract data type (adt) = a class that is presented with information hiding. A class is a data type and is a collection of data. Member functions are incorporated into class"s definition and are designed specifically to manipulate the class. Class head = consists of the c++ keyword class, followed by the name of the new class. Member list = the rest of the definition, from opening bracket to closing semicolon. Public section = begins with the c++ keyword public followed by a colon and a list of items. Items are available to anyone who uses the new data type. Modification member functions = can change the value of an object.