General Information
- Date: Wed, July 23, 2025
- Time/Location: Your exam will take place in IRB 0324 (NOTE: NOT SAME ROOM AS EXAM 1)
- Duration: 1 hour and 20 minutes
- Closed-book, Closed-notebooks, No Computers/Calculators.
- Use a pencil/mechanical pencil (no pen) to answer the exam.
- Bring a good eraser
- Posting any information in Piazza about the exam after taking it
is considered an academic integrity violation.
- Do not separate the pages of the exam (e.g., remove the staple).This
will interfere with the scanning process.
-
You need to bring your student id to the exam.
-
We provide space in the exam to be used as scratch area (you cannot
bring your own scratch paper).
Exam Structure
- Short answer questions: This includes for example, multiple
choice, true/false, and fill-in-the-blank type questions.
- Code analysis questions: We will give a short segment of code and
you may be asked to identify syntax and logical errors, generate code
output, etc.
- Code Writing: Write a program/code snippets to solve a given
problem. You should be prepared to give a complete program/class, but we may also
ask you to provide just a single method or a code fragment.
Topics
The exam will include all the material covered during Week 1 to Week 7 (with major focus on Week 5 to Week 7) in discussion session (lab),
lecture, and projects, including the following topics:
- Object-Oriented Programming Principles (Abstraction, Encapsulation,
etc.)
- ADT: List, Stack, Queue, Deque, Set, Maps
- Data Structures: Array-Based and Linked List (know pros and cons of each), Hash Tables
- Algorithmic complexity and working with Big O notation
- Levels of Copying
- Linear and Binary Search, Selection, Insertion, and Bubble Sort
- Be able to write both iterative and recursive code
- Specific Java Topics
- Definition and use of classes in inheritance relationships
- Concepts related to class design: this, super, overload, override, polymorphism (early vs. late binding), 4 visibility modifiers, equals, toString
- Definition and use of Java Interfaces
- Abstract Classes
- Arrays: 1 and 2D
- From the JCF: Collection, List, ArrayList, LinkedList, Vectors, Stack, Queue, and Deque, the 3 sets, the 3 maps, and the Collections Class
- Strings, StringBuffer and StringBuilder (be familiar with the append method that takes a string
as a parameter and
the constructor that takes a String as parameter)
- Iterable Interface and for each loops
- Iterators (Be able to write code to make one with a next() and hasNext())
- Comparable Interface
- Comparator Interface
- Enumerated types
- Exceptions: Checked and Unchecked
- The 4 types of nested types: inner, local, anonymous, and static nested
- Lambda Expressions (from lab)
- Defining Generic Classes and methods with unbounded and bounded types (e.g. using extends)
- Wildcards and bounded wildcards with extends and super keywords
- Autoboxing and Unboxing
- clone method
- Recursive Linked List Methods
- Hashing- both open addressing and separate chaining
- Java HashCode Contract
- Sets and Maps - know the 3 types of JCF sets and 3 types of JCF maps
- Power of 2 up to 2^16 and log rules (from lab) - no calculators
- Terms and concepts associated with graphs, free trees, rooted trees, and binary trees
- All CMSC 131 topics
- All Week 1 to Week 7 CMSC 132 topics
The exam will NOT cover the following topics:
- Binary search trees, Text or Binary Files
Practice Material
Here are actual exams and quizzes from the past: PreviousExamsP2.zip. I am just making this available for extra practice, but remember the coverage and questions on your exam in Summer 25 will be different than what we did in the past. Do not try to learn by pattern recognition and memorization. Learn to make algorithms and apply concepts! Just looking at the solutions will do nothing to help you improve. Print out the blanks and actually take the exams under the time limit, then check your answers using the solutions. Reminder you have a 1 hour and 20 min exam, and therefore you exam will be longer than these 50 min exams. Also, go back and look at the previous exams posted for Exam 1. Some of the old exam 2s had question not covered on your exam 1, but they will covered in your exam 2.