General Information
- Date: Fri., April 5, 2022
- Time/Location: Your exam will take place in lecture.
- Duration: 50 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
For this exam, focus on Weeks 1 to Week 9. A main focus of the exam will be to see if you can design a complete class and work with 1-D arrays. The exam will include all the material covered in discussion session (lab),lecture, quizzes, exams, and projects including the following topics:
- Object-Oriented Terminology
- Java Variables and Types
- Expressions and Side Effects
- Java Numeric/String/Logical Operators
- Assignment Operators
- Short Circuiting
- Scanner Class
- System.out.println()
- Conditional Statements
- Blocks and Scoping
- Constants
- Loops (whiles, do whiles, for loops)- including how break and continue work
- Static methods
- String Class
- Constructors
- Using "this" for classes
- Instance variables
- Static variables
- static and non-static methods
- get/set methods
- toString()
- How to write an equals method for a class
- switch statement
- StringBuffer
- One Dimensional Arrays (of primitives and references)
- Ternary Operator
- Exceptions
- Privacy Leaks
- Copying Objects: Shallow, Reference, Deep Copying
The exam will NOT cover the following topics:
- Eclipse Debugger, Recursion, Two-Dimensional Arrays, Model View Controller,
ArrayList, Javadoc,Interfaces, Polymorphism, Inheritance, Iterators,
JOptionPane Class (methods used for input and output), Computer Organization,
Packages, Junit, Abstractions, Encapsulation, Pseudocode, Wrapper Classes, and Stack ADT.
Practice Material
Here are actual exams from previous terms: PreviousExam2.zip . At the minimum, take the exam from Spring 22 and Spring 23 using a 50 minutes time limit per exam, before you look at the answers. A worksheet made by another instructor can be found at Exam2Worksheet.pdf. This is not specific to the Spring 24 Term. I am just making these old documents available for extra practice, but remember the coverage of your exam in Spring 2024 will be different than what was done in the past.