Vocabulary
- CPU
- Memory
- Secondary storage
- Java compiler
- Java Virtual Machine
- (Java) library package, e.g. see Java API
- source file
- byte code
- class file
- IDE - Integrated Development Enviroment (e.g Netbeans)
- backing up
- syntax
- case sensitive
- block of code
- main method
- statement
- string
- compile time error
- run-time error
- algorithm
- pseudocode
Misc Topics
Vocabulary
Variables:
... variable declaration
... primitive data types (int, float, double, boolean, char)
... identifier, naming, camel case (see p. 37)
... reserved words
... variable initialization
... case sensitive
... literal, String literal
... scope, code block (brackets {...} )
... constants
... magic numbers
Variable Operations:
... variable assignment, assignment statement
... operator
... assignment statement
... binary arithmetic operators: +, -, *, /, %
... unary arithmetic operators: -, ++, --
... Mod function (%)
... integer division
... Math class, Math.PI, Math.random()
... operator precedence
... type conversion, cast operator
Other:
... stepwise refinement
... sytax rules vs convention
... statement vs expression
... programming style, indentation, Netbeans formatting tool
... comments, single line, multi-line, Javadoc
String Variables and Operations:
... String Class
... String operations
... escape sequence and control characters
... String concatenation and the + operator
... dot notation
Keyboard I/O, input/output:
... Scanner class
... Dialog Boxes
... System.out.print, System.out.println
... System.out.printf, format specifier
... console
... standard output/input
Misc Topics
Vocabulary
Object-oriented programming & Class Structure
... Class (user defined type)
... Object (instance of class)
... primitive type vs class type
... Attributes, Fields, or Member variables (data)
... Methods (actions)
Method Structure:
... access specifier or modifier (e.g. public, private)
... method name
... method parameters
... pass by value vs pass by reference
... return type, return value
... variable scope: local vs global, shadowing
Class Structure (more detail):
... Constructors, default constructor
... Public interface
... Private implementation, data hiding
... Mutator methods (setter)
... Accessor methods (getter)
...toString
method
Object Creation and Use
... The keyword:new
... Sending a message, calling a method
... dot notation
... (formal) parameter vs argument (actual parameter)
... parameter passing
... Null pointer and the Null Pointer Exceptions
... Self reference keywordthis
Code Design and Development
... UML Diagram
... Javadoc
... API (Application Programmer Interface)
... Encapsulation, modularization
... stepwise refinement
... reusability
Testing and Debugging
... debugging & testing
... tracing code
... unit testing
Topics
new
and a constructor
null
keyword and Null Pointer Exceptions
this
Rectangle rec1 = new Rectangle(5,6,10,10);
System.out.println("rec1: " + rec1);
Rectangle rec2 = rec1;
rec1.setLocation(100,150);
System.out.println("rec1: " + rec1);
System.out.println("rec2: " + rec2);
rec1 = new Rectangle(50,60,20,20);
System.out.println("rec1: " + rec1);
System.out.println("rec2: " + rec2);
Vocabulary
Types of Decision Structures:
... if statement
... if-else statement
... multi-way if-else
... nested if-else
... switch statements
... indentation conventions
Code blocks & variable scope
Decision Structure Syntax:
... decision logic and flow charts
... condition and body
... boolean value, expression
Random numbers
Building Boolean Expressions:
... relational operator (<, >, <=, >=, ==, !=)
... boolean (logical) operators (!, &&, ||). Examples
... boolean operators precedence (See table)
... truth tables (p. 209)
... De Morgan's Laws (p. 212)
String Comparison
... Lexicographic ordering (of Strings)
... compareTo() and .equals operators
Other (optional)
... The Conditional Operator bool ? val1 : val2 (p. 182)
... Switch statement (p. 195)
Misc Topics
<, >, <=. >=, ==, !=
==
. Instead, use myString1.equals(myString2)
int bigger = (x>y) ? x : y ;