REVIEW FOR FINAL EXAM

The exam will be comprehensive.  You should know all the programming constructs from the early part of the course.  The objective questions (definitions, true false, etc.) will be primarily, but not completely, from the last 1/3 of the course (since test 2)

 

Material Covered Since Test 2:

Ch. 10 – simple data types

Ch. 11 – structs (syntax of) and classes; objects, multi-file programs

Ch. 12 – two-dimension arrays

Ch. 15 – pointers and dynamic data (a little)
Also, more about functions: parameters, calls, etc.

 

 

Chapter 10

Operator precedence and associativity

Character sets.

Printable versus nonprintable characters and escape sequences

Floating point representation: sign bit, exp sign bit, exponent, fraction (mantissa)

                Exponent controls range of values

                Fraction (mantissa) controls precision (Precision – the maximum number of significant digits)

Representational error/comparing floating point numbers/underflow and overflow

User-defined types with enum

Quick Check #3, 4, 5

Exam Prep #  4, 8, 12,

Programming Warm-Up # 5, 10, 13, 14

 

Chapter 11

Know how to define, declare, use structs, classes and objects at the level you used them in your programs; e.g.,

  • If I give you the specification of a class, be able to write one of the implementation functions, or a client program.  Be able to declare class variables (objects) and use them in statements.
  • Be able to define a struct to satisfy a given specification and be able to manipulate arrays of structs.

Know the terminology: member variables, member functions, Abstract Data Type, etc.

Quick Check #3, 4, 12

Exam Prep Questions # 4, 5, 8, 11, 13,

Programming Warm-Up Exercises #1, 2

 

Chapter 12

In addition to having a thorough understanding of one-dimensional arrays, you should also know something about 2-D arrays:

Rows versus columns.

Notation for two-d arrays: array_name[row][col]

Examples of array processing

Quick Check #2, 10, 11,

Exam Prep Questions #6, 15, 21

 

Chapter 14: Object-Oriented Software Development

Review the handout; be able to discuss/recognize differences between structured (procedural) programming (and  design) and object-oriented programming (and design).

Know the terminology in the chart.

Be able to state the three features of OO programming languages

Be able to define data abstraction  and inheritance.

 

Chapter 15 – Pointers, Dynamic Data, and Reference Types

What kind of value does a pointer variable contain? (an address)

How do you declare a pointer variable?

Three ways to assign a value (address) to a pointer variable:

  1. assign the null pointer
  2. assign the address of a variable that has already been declared (use  address-of operator)
  3. use the new operator – which also causes a new variable to be created dynamically on the heap.

Be able to dereference a pointer (to access the variable being pointed to)

Define dynamic variable, automatic variable, static variable (automatic and static defined in chapter 8)

Understand operations and figures on page 796-797

Programming Warm-Up Exercises #1

 

Things To Review From The Early Part Of The Course:

 

Functions: void and value returning

Parameters: reference and value

                What kinds of arguments can be passed to each type of parameter

                How are arrays specified as parameters, and as arguments?

Scope and lifetime rules

Declarations, operators, and precedence rules

If statements, switch statements (know the syntax!), nested ifs

For, while, do-while: syntax, terminology, when to use each type of loop

                Sentinel loops, end-of-file loops

Enumerated types

I/O problems: insufficient input, too much input, wrong kind of input: how does C++ react in each case?

 

Be sure to go over your homeworks, quizzes, and earlier tests.