CS 2102: Object-Oriented Design Concepts
Midterm Exam Preparation
What Should You Expect?
- The exam is pencil-and-paper. You may not use a computer.
- The exam will be self-contained. You will not be asked to recall any specific problem from homework or labs.
- You will not be expected to write lots of code on the exam. You may be asked to write interfaces and (abstract/concrete) classes (fields and constructors). You may be asked to write a method given its signature and purpose.
- You will not be graded on the details of Java syntax. You should know what information goes where (i.e., where fields go, what goes into each of interfaces and classes, how to distinguish abstract classes from non-abstract classes). You will not lose points for a missing semicolon, unbalanced braces, or other minor details as long as indentation/punctuation makes it clear what goes where. You don't have to provide any import statments.
What You Can Bring
- You may bring a single sheet of paper with whatever notes, examples, comments, etc that you wish. You may use both sides of the paper. Typeset or handwritten is fine. The exam is otherwise closed-book, closed-notes.
- Although you may work with others on creating your sheet of notes, you may not share notes with others during the exam (each student must have their own copy of the notes).
What You are Expected to Know
The exam will focus on the higher-level concepts we have covered so far, such as how to organize and plan programs in Java. The exam will cover all material through lecture on Friday, November 10. Specifically, you are expected to know:
- The difference between classes and objects
- When to create each of classes, abstract classes, and interfaces
- The differences between classes, abstract classes, and interfaces
- The differences between overriding and overloading
- When you create nested objects and associate names with objects, how many objects exist "under the hood" and how are they connected (through fields and known names)
- How to write programs that process lists
- How to identify the (sub)tasks in a programming problem, and how to use those tasks to plan out a program
- How to write examples of data and test cases for methods
Sample Exam
Here is an exam that was given in a previous offering of the course. I don't provide answers to sample exams - here's why.
Literal Instructions from First Page of Exam
The front page of the exam will contain the following information. I suggest you read it now so you don't have to take time to read it the day of the exam:
"If a problem asks you to create a class hierarchy, we are looking for the interfaces, classes, and abstract classes that you would create for the problem. In particular,
- Include implements and extends statements
- Include field names and types
- Include method headers (names, return type, and input parameter types)
- Share code where feasible
- Full credit requires that all types and implements/extends relationships are clear. Be sure your work is clear if you use UML diagrams instead of Java syntax.
- You may omit constructors
- You may omit method bodies (put {...} where the body of a method would go)
- You may omit the Examples class (examples of data and test cases) unless a question asks otherwise"