CS 211
Final Review
This is not a complete list of topics covered in the course. It is intended
as a study guide but there is no guanrantee that every question on the final
will refer back directly or indirectly to an item on this list.
- Preparing and executing high-level language programs
- editors, compilers, interpreters
- Java
- Java compiler generates JVM isntructions
- Java runtime ("java" and "javaw")
- Basics of Java programs
- class, method, variables, assignment
- basic input/output: System.out.print(ln)(), scanners
- arithmetic
- Strings, concatenation
- Classes, objects, and references
- class defines the form and behavior of objects which
are created by new which returns an address which is a
reference
- an object created using a class is an instance of the class
- careful use of references pointing to objects
- Strings
- as objects
- treated similarly to primitive types
- concatenation
- using '+' as concatenation and as addition
- Random number generators
- Arrays
- Inside classes
- capitalization conventions
- public and private visibility
- fields
- "get and set" methods
- final (constant) fields
- methods
- parameters and return type
- overloading
- local variables
- constructors
- static methods and fields
- Primitive types
- integer types: int, long, short, byte
- real types: float, double
- mixing numeric types in an expression
- char
- boolean
- Control structures
- boolean expressions
- relational operators and their precedence
- boolean operatiors
- if, if ... else
- loops
- nested control structures
- switch
- case labels as entry points to a block of code
- break
- default case
- Inheritance
- terminology: "subclass" = "derived class" = "child class"
- subclasses extending a base class
- inheriting fields and methods
- overriding methods
- class hierarchies
- abstract classes
- assigning a reference to reference higher in the hierarchy
- late binding and polymorphism
- Exceptions
- try-catch-finally blocks
- catching more than one exception after a catch block
- exception propagation (catching an exception in the calling method)
- checked exceptions
- catch or declare method "thows ..."
- Reading and writing files
- reading: FileReader, BufferedReader, Scanner
- writing: PrintWriter
- Inner classes
- fields and methods of outer class visible to inner class
- Interfaces
- Graphical User Interfaces
- basic construction
- JFrame
- setDefaultCloseOperation, pack, setVisible, etc.
- JPanel
- as organizers
- panels inside panels
- extending JPanel
- JLabel
- Events
- listeners (implementing ActionListener)
- actionPerformed: responding to an event
- identifying the source of event
- Objects creating events
- JButton
- JRadioListener
- adding listeners
- layout managers