Notes
A minimal example of using markdown with fastpages.
List of Vocab
- Casting, specifically for Division
- Casting, specifically for Truncating or Rounding
- Wrapper Classes, why wrap int, double. Show examples
- Concatenation, explain or illustrate rules on mixed type Concatenation
- Math class, specifically Random usage
-
Compound Boolean Expression
- Truth Tables
- De Morgan’s Law
- Comparing Numbers
- Comparing Strings
- Comparing Objects
- for loop, enhanced for loop
- while loop versus do while loop
- nested loops
- Creating a Class, describe Naming Conventions
- Constructor, describe why there is no return
- Accessor methods, relationship to getter
- Mutator methods, relationship to setter, describe void return type
- Static variables, Class variables, show use case in code
- Show use case of access modifiers: Public, Private, Protected
- Static methods, Class methods
- this Keyword
- main method, tester methods
- Inheritance, extends
- Subclass constructor, super Keyword
- Overloading a method, same name different parameters
- Overriding a method, same signature of a method
- Abstract Class, Abstract Method
- Standard methods: toString(), equals(), hashCode()
- Late binding of object, referencing superclass object, ie Animal a = new Chicken(); Animal b = new Goat();
- Polymorphism: any of overloading, overriding, late binding
- Big O notation for Hash map, Binary Search, Single loop, Nested Loop
Unit 1
- casting is when you assign a value of one primitive data type to another type. In integer division, the decimal is truncated. You need to use a double in order to keep the decimal
- casting rounds down while Math.round rounds to the nearest int
int, boolean, char, and double are primitives Strings and other classes are objects Compare primitives with == and objects with .equals() Objects have properties while primitives do not
Unit 2
- Wrapper classes allow you to use primatives as objects. One use case would be in arraylists, where only objects are stored. Ex: ArrayList
myNumbers = new ArrayList (); - Concatanation is when you combine primatives together. For example, you would use the .append for combining two strings. You could use “+” to add together integers and doubles. You can concatanate a string with an integer through “+”.
- Math.round rounds to the nearest int
- Math.random gives a random number between two numbers
Objects are instances Methods have to specify return type which can be void, or nothing Static methods tied with the class and defined once across all instances Method overloading is when multiple methods with the same name have different parameters
Unit 3
- Compound boolean values uses logical operators AND and OR to evaulate an expression as true or false
Unit 4
While loops run when conditional is true For loops defines a variable that changes every loop and runs when the conditional is true Nested iteration can be good in situations Enhanced for loops can loop through all elements in an array but the array cannot be modified when it is looping
Unit 5
Classes have properties and methods Properties store information about each object private and public Methods runs code Getter and setter methods are coded to modify private attributes
Unit 6
Arrays are objects defined by type[] name = new type[size] or initialized with elements using type[] name = new type[]{a,b,c,…} Loops an enhanced can iterate through arrays Index goes from 0 to size-1 Algorithms can be used to modify or get info about arrays
Unit 7
- Wrapper class stores prim in objects
- make sure to specify the data type
- return arraylist using the return command
- traverse arraylist through for loops and while loops
- get() to get an element
- size() to get size