CptS 122 – Data Structures
Exam 2 Review
Guide
This document will
serve as a guide to help you prepare for the second midterm exam in CptS 122. You will find information about the exam format
and topics you are expected to review within this guide.
What to Bring?
Your WSU ID |
|
|
Two sharp pencils |
|
Calculators and
notes can not be used during the exam! |
Exam Timeframe
Please be aware
that, because you will be taking the exam during a normal lecture period, time
will be extremely tight for the exam. You will be allowed to start the exam
at 12:10 pm sharp. If you show up late to class, you will
have less time to take the exam. You must hand your exam in by
Exam Format
Expect the exam to
look like an hour version of quizzes, with a few more involved problems that
are more in the spirit of a lab exercise. The exam will consist of some
concepts questions and programming problems. For the concept section of the
exam, expect true-false, fill-in-the-blank, multiple-choice, and/or
short-answer questions similar to those found on the quizzes. Some of these may
be similar to the questions found at the end of chapters in your textbook! For
the programming problem section of the exam, I will present you with
programming problems, and you will be expected to write syntactically-correct
C++ code solutions that exercise good design. Note that your solutions do not
have to be documented!
Exam Coverage
The exam covers the
second five weeks of the semester, chapters 15 - 22 and chapter 24 of the Deitel
and Deitel C How to Program textbook.
Chapter 15: Introduction to C++ and
Object-Oriented Technology and Terminology
o Wrapping of attributes and operations into
objects
o Implementation details are hidden within
objects
o Allows for functions with the same name to
be defined. The key is the functions must have different parameters (number,
type, order)
Chapters 16 & 17: Introduction to
Classes and Objects & Classes: A Deeper Look, Part 1
o What are some advantages to using classes?
o These include private, protected, and public
o We
generally assume an object contains data and operations…However, each instance
of an object uses the same copy of the member functions, which is separate from
the object size
o Sizeof
reports only the number of bytes required for a class’s data members
o Rule of thumb in C++: should define
destructor, copy constructor, and overloaded assignment operator
Chapter 18: Classes: A Deeper Look, Part 2
o Recall: a friend class has access to private
members
o Recall: represents a “has-a” relationship
Chapter 19: Operator Overloading
o Recall: precedence, associativity,
and number of operands (arity) for an operator may
not be changed
Chapter 20: Object-Oriented Programming:
Inheritance
o Recall inheritance applies a “is-a”
relationship
o Other terms include: subclass, superclass,
Chapter 21: Object-Oriented Programming:
Polymorphism
Chapter 22: Templates
Chapter 24: Exception Handling
Recommended
Strategy for Preparing for the Exam
I recommend that you use the following activities and materials to prepare for
the exam:
|
Review quizzes and lab exercises: These may well be your best resource. An
excellent learning activity would be to retake the quizzes and review the lab
exercises. |
|
Lecture slides and example code: Study the lecture slides and example
code. |
|
Read the textbook: Read or re-read chapters 15 - 22 and chapter 24 in your
textbook. |