To ExamInfo
CSC 212 -- Final Exam Review Guide
To Bring to Midterm
- Two pages (8 1/2 x 11) of notes both sides.
Read in Text Book:
- Read chapters 11, 12 and 14.
To Study for Midterm:
- Review questions at the beginning of lectures.
- Your submissions for projects.
- Examples discussed in class.
Terms and Concepts
- Control Flow (if..else, while, for, switch)
- Logical Operators (&& ||, &, |, ^, !).
- Short circuit vs. complete evaluation.
- Conversion methods (Integer.parseInt, Double.parseDouble,
String.valueOf).
- UML diagrams (Class name, instance variables, methods).
+ means public, - means private.
- Writing classes (instance variables, constructors, methods,
getters, setters, toString, equals, compareTo)
- Classes vs. objects.
- Reference variable declaration vs. object instantiation.
- Camel casing vs. Pascal casing.
- Types of variables (instance, local, parameter (formal parameter),
argument (actual parameter), return value, primitive, reference).
- Current object (this).
- Overloaded constructor, overloaded method, signature.
- Accessibility modifier (public, private).
- Arrays of objects (declaration, memory allocation, array index,
array value, inserting an object, referencing an object).
- Reading from the keyboard, reading from a hard drive file.
- Inheritance, extends keyword, overloading vs. overridding,
virtual methods.
- Abstract class, as a template for derived classes.
- Interfaces, implements keyword, as a contract,
alternative to multiple inheritance, Comparable interface, Arrays class.
- Exceptions, catch, throw, declaring a class as able to throw
an exception, derived from Throwable.
- Recursion, recurrence diagram, sequence of activations, terminations
and outputs, base case.
Builtin Java Classes
- String Methods:
charAt, compareTo, equals, indexOf, lastIndexOf, length,
toString, replace, substring,
toUpperCase, toLowerCase, valueOf.
- StringTokenizer Methods:
nextToken, hasMoreTokens.
- Scanner Methods:
hasNext, hasNextBoolean, hasNextDouble, hasNextInt, hasNextLine,
next, nextBoolean, nextDouble, nextInt, nextLine.
- System.out, PrintWriter Methods:
close, print, printf, println
- Object Methods:
equals, getClass, toString.
Exceptions
- Arithmetic Exception, ArrayIndexOutOfBoundsException,
StringIndexOutOfBoundsException, EOFException,
FileNotFoundException, NumberFormatException,
InputMismatchException, NullPointerException.
Be Able To
- Answer true/false questions. Give a reason to support each
answer.
- Understand projects Proj4, Proj5, Proj6 and Proj7.
- Write a short essay explaining the relationship between
inheritance and interfaces.
- Construct the program trace and predict the
output of a Java program. Traces could involve
static mathods, arrays, or objects. If the program makes recursive
method calls, draw the recurrence diagram (also called the
recursion tree).
- Use the predefined classes to create
objects and use their methods, both static
and object methods.
- Construct the UML diagram for a class,
write the class definition, and a main method
that will test it. Be able to predict the output
from this main method.
- Given a UML class diagram, possibly involving inheritance,
write Java code to implement the classes. Be
able to write these methods or types of methods for a class:
constructor, getters, setters, toString, equals, compareTo
- Write a Java program that will solve a
problem. Be able to obtain inputs from the keyboard or an input
file using the Scanner class.
- Be able to send output to the console or an output file.
- Be able to move data from an input file to an array or
from an array to an output file.
- Explain how to solve the Towers of Hanoi puzzle recursively.
- Know how to compile and run a Java file from the DOS prompt.
- Show the order of visited cells for examples like Maze or
FloodFill.
- Draw the family tree and predict the output for code like
FamilyTree.java