Some announcements
I won't be able to hold office hours today. If you want to meet with me, please send me an e-mail. I will be available after 1:p.m. On Wednesday and all day on Thursday.
The final exam is on Tuesday, December 9th from 6:00 p.m. till 9:00 p.m.. Please take a look at the final exam schedule for the location of the exam.
In the Final Exam
- Binary numbers ( BInary to Decimal, Decimal To Binary)
- Primitive Types:
int
, boolean
, String
, double
- Type casting
- Operations:
+
, -
, *
, /
, ++
, --
, +=
, -=
, %
- Boolean Logic: AND, OR, NOT (
&&
, ||
, !
)
- Comparisons:
>
, >=
, <
, <=
, ==
, !=
- Conditional Statements:
if
, else if
, else
- Loops:
for
and while
- Arrays
- Methods, Passing variables to methods: Primitive types, and reference types ( Arrays, Objects )
- Sorting (Bubble Sort, Insertion Sort, and other sorting algorithms)
In the Final Exam
- Data structures
- Node class in LinkedList and doubly LinkedList
- what is a hashing function, what is a collision
- ArrayList and Hashtable, and the reference types ( Integer, String, Double, Character )
- Classes and Objects
- constructors, object methods and variables
- static variables and methods
- public and private variables
- Exceptions
- try, catch, throws
- ArrayIndexOutOfBounds
- NullPointerException
NOT int the Final Exam
- Complexity
- Recursion
- Merge sort
- Advanced topics ( Except for tthe part where we created a Robot object )
How would you know you are prepared for the Final exam?
If you feel comfortable answering all of the questions in all of the Assignments, you are prepared for the final
Mystery methods revealed
mysteryMethod1
: the good old swap
method
mysteryMethod2
: the good old bubbleSort
algorithm
mysteryMethod3
: the previously unknown selectionSort
algorithm
MyMysteryBox
, mysteryMethod4
: Question 15 from the midterm
For the final, you just need to be able to keep track of the state of variable when executing a piece of code line by line
Linked Lists
This is a visual representation of a linked list using int
values
-
How would you write a method that finds the maximum number in a LinkedList?
-
How would you write a method that finds the average of the numbers in a LinkedList?
Exceptions
What type of eception would these pieces of code throw?
Tips for the final
- Study the programming and comprehension questions from all assignments
- Study the explore method from Assignment 4
- Try to write the java code for other sorting algorithms: ShellSort, CocktailSort, GnomeSort, Combsort
- Try to follow by hand the execution of any sorting algorithms
- Practice binary conversions
- Do the MiniString exercise
/