Review Sheet for Exam 1
Exam 1 will cover the material presented in lecture and the following portions of your text:
- Chapter 1 (all)
- Chapter 2 (all)
- Chapter 3 (except for 3.2 and 3.11)
- Chapter 4 (except for 4.4, 4.5, 4.9, and 4.10)
Use the topics below as a GUIDE in studying for the exam. Sample questions
will be posted soon.
- The concept of object-oriented programming
- Features and advantages of object-oriented programming (why do it?)
- Procedural vs. object-oriented programming
- C++ file naming conventions
- How one approaches problem solving
- The concept of abstraction vs. implementation
- How to write a class definition given a specification written in English
- How to instantiate an object and access its members
- How to declare a pointer to an object and access the object's members
- How to code a member function
- What a constructor is used for and how to code one
- What a default constructor is and why it is typically good to include one in a class
- Passing by value vs. passing by reference (address) -- syntax and what happens in RAM
- How to declare and use reference variables
- Why one would choose to use an inline function and the syntax of an inline function
- The use of command-line arguments
- Understand the syntax of the Account, Vector, and Fraction class examples
- What function overloading is, why it is useful, and the syntax
- What operator overloading is, why it is useful, and the syntax
- The basic use of cin, cout, and I/O streams (fstream class)
- How one should handle execution errors
- What is meant by scope and the different types of scope in C++
- How to use optional function arguments and why it is useful to do so
- What a function signature is and how it is related to function overloading
- How function calls are resolved in the case of an overloaded function
- When type promotion and conversion can occur and problems associated with implicit conversion
- Why one would choose to do an explicit type cast and how to do it
- What a read-only parameter (const) is and why one would choose to use one
- How to use new and delete
- How to declare, initialize, and use arrays
- How to declare, initialize, and use pointers
- What the relationship between arrays and pointers is
- What the legal pointer operations are and how to use them
- How to pass a pointer as an argument and to return a pointer
- How to dynamically allocate an array and the advantages of doing so
- Why one would use an array of pointers and the syntax for doing so
- The concept of a linear linked list and how to implement one (Project 1) -- create and fill a node, add a node, delete a node, print the contents of a node, print the list, search the list
Terminology:
- abstraction, abstract data type (ADT), encapsulation, method, attribute, public, private, object, instance, instantiation, scope resolution operator, promotion, conversion, type casting, lvalue, NULL pointer