WED CompSci 2/25
Exam Overview
The exam is scheduled for tomorrow during the lab session.
Duration: Two hours to complete the exam.
Format: It will be a paper-based exam, similar to in-class assignments, utilizing Scantron for multiple-choice questions.
It will include short answer questions in a separate packet.
Exam Content
Topics Covered: Everything learned so far except linked lists.
Key Topics To Study:
1. Enumerated Types
Ability to write an enumerated type.
Understand the following methods:
values(): retrieves all iterator values.
equals(): checks for object equality.
toString(): returns string representation.
ordinal(): retrieves position of the enum constant.
2. Arrays
Proficiency in manipulating arrays, especially:
Two-dimensional arrays.
Jagged arrays.
Ability to trace methods and write small methods, similar to in-class assignments and maze game methods.
3. Big O Notation
Understand the formula to estimate run time based on input size.
Formula:
Ability to estimate time complexities based on given values:
Example Calculation:
Suppose
andwith.For complexity, the calculation becomes:
Know how to analyze method complexity based on loops and iterations.
Understand common complexities (e.g., linear, quadratic, cubic).
4. Exceptions
Familiarity with try-catch blocks and their structures.
Distinction between checked and unchecked exceptions:
Checked: Must be handled or declared to be thrown.
Unchecked: Generally runtime exceptions, can be handled but not required.
Review the inheritance tree of exceptions to determine their types.
5. Object Class
Understand the significance of the
Objectclass as the superclass of all classes.Familiarity with inherited methods, specifically:
clone()method, its implications regarding shallow vs deep clones.
Recognition of quality reference equality vs content equality.
6. Data Structures (Array Bags)
Knowledge of underlying designs for
IntArrayBagandDoubleArraySeq.Ability to interpret internal structures and behaviors after calls to methods like
addorremove:Understand what the underlying array looks like after certain operations.
7. Inheritance
Comprehension of superclass, subclass relationships.
Ability to interpret UML diagrams representing class relationships.
Knowledge of how casting operates within inheritance.
Widening and Narrowing:
Widening: Assigning a subclass object to a superclass (e.g., Teacher to Person).
Narrowing: Assigning a superclass object to a subclass (with potential casting).
Exam Preparation Tips
Review previously graded homework and quizzes.
Focus on homework questions similar to expected exam questions.
Utilize the study materials and the dedicated exam section on the As You Learn platform.
Cheat Sheet Allowed: One 8.5 x 11-inch paper, front and back, allowed for the exam. Material may include formulas, notes on exception types, and any relevant code snippets.
Additional Points
No GUI content will be tested; focus on foundational programming concepts.
Final preparations should include clarifying any remaining doubts with the instructor.
Engaging resources include class slides and practical assignments to consolidate learning.
Be familiar with handling exceptions and the use of instance checking within the context of casting objects.
Review all relevant class structures and inheritance thoroughly for a firm examination readiness.