General Information
- Date: Wednesday, Oct 30, 2019
- 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.
- Please take a look at the general exam rules available at
Exam Rules.
- 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.
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 in discussion session (lab),
lecture, quizzes, exercises, and projects (#1 thru #5) including the following topics:
- Computer Organization
- Object-Oriented Terminology
- Java Variables and Types
- Expressions and Side Effects
- Java Numeric/String/Logical Operators
- Assignment Operators
- Short Circuiting
- Scanner Class
- Random Class
- System.out.println()
- Conditional Statements
- Blocks and Scoping
- Constants
- Loops (whiles, do whiles, for loops)
- String Class
- JOptionPane Class (methods used for input and output)
- Pseudocode
- Memory Maps/Diagrams
- Defining Classes
- equals Method
- Access specifiers (private/public)
- 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
- JUnit Testing (how to define a JUnit test using the assertTrue assertion)
- Ternary Operator (? :)
- Exceptions
- Mutable/Immutable Classes
- Privacy Leaks
The exam will NOT cover the following topics:
- Packages, Eclipse Debugger, Arrays, Javadoc, Reference/Deep/Shallow Copying, Recursion
Practice Material
Previous semesters' exams can be found at PreviousExams.zip.
In the past, we had two midterms instead of three, therefore in previous exams you might
see material you are not responsible for this exam.
The best way to prepare is to practice problems (e.g., previous exams) and problems you can
come up as you study. The more you practice, the better you will do in the exam. If you just
practice one or two exams, that is probably not enough.