CS112: Exam 2 :: Coverage and Format
Date and Topics
The second CS112 exam will be held in class on Thursday,
April 7. The exam will be an open book exam, so you can
refer to the text or any of your lecture or lab handouts, notes, assignments and
solutions during the exam. The exam will focus on the following topics:
- user-defined functions
- input and output parameters for functions
- using
nargin with optional inputs
- single and nested
for loops
-
while loops
- using
break to terminate loops
-
if statements using elseif clauses
- structures
- managing files and folders (
load, save, xlsread, pwd, filesep, dir, mkdir)
There will not be any questions on GUIs, properties, strings, cell arrays,
or text files.
There will be a review for the exam during lab on Wednesday, April 6.
Material to review
The following reading, handouts and course work will be most relevant for
preparing for the exam:
- Gilat text (fourth edition): pages 185-186, 190-200, 219-229
(third edition: pages 155-165, 204-205, 208-218)
- Lecture handouts for Lectures #8, 10, 11, 12 and 15
- Lab handouts for Labs #6, 7 and 10
- Assignments #4 and 5, and solutions
Types of problems
The following is a list of some of the kinds of problems that may appear on the exam:
- Given some MATLAB code, hand simulate the execution of the code, showing all of the
values that are returned by the code statements
- Given MATLAB code that embodies one solution strategy, rewrite the code using a
different approach that will be described explicitly
- Given a short description of a task, write code to perform this task (this may
involve writing an extended loop or function, for example)
- Given some buggy code, locate and describe the errors and suggest a way to fix the errors.