CompSci 6- Review - Feb. 16, 2010
Main Topics Covered
- Assigned Reading on the calendar
- data types: int, double, boolean
- String class - member functions
indexOf, length, substring, concatenation, toCharArray, charAt
collections for loop accessing characters from a string
- Conditional (if), Loops (for, while), Collections for loop
- Class - parts
Fill in parts of a new class
- arrays
- ArrayList - create, add element to, access element, change element
add, set, size, get
- Reading from a file, Scanner class
next, nextLine, nextInt, nextDouble, hasNext
- Graphics - drawing a circle with a pen, Pixmap
- Generate Random numbers
Many of these topics are in the APTs and assignments you did. Study
those too!
Logistics
- Just need pen or pencil
- Closed book, closed notes, closed neighbor
- No electronic devices (no cellphones, calculates, computers, etc.)
- No paper - exam will have lots of white space
- will provide Java classes that you may need for the exam (similar
to old tests) such as String, ArrayList, Scanner, File
How to Study
- Review classwork, APTs, lecture notes, assignments
practice writing code on paper
- Old tests - see "Old Tests" link on CompSci 6 Web page under Resources.
NOTE we have not covered loop invariants and inheritance (when one Class
extends another Class) which may appear on some tests1.
Today we will go over the solutions for old tests