What are the main components of coding? Different data types!
o int numbers without decimal Ex. 10
o double numbers with decimal Ex. 10.14
o boolean true or false Ex. True
o Char single letters use single letters
o String letters and words Use quotations to represent Ex. “the word”
o Objects data types created by programmer
Comparison Operations:
Type Conversion:
Variables
THINGS o Arrays
systematic arrangement of objects, usually in rows and columns
must declare size begins at [0]
Ex. int[] array = new int[14] int [] array = {10,3,4,5,1,2,3,4}
in order to access specific point object in array int x = array[2]
Recursion: a recursive function is a function which contains one or more calls to itself Like a Russian nesting dolls where one doll holds another, smaller version
of itself inside and that smaller doll has a smaller version of itself inside, and so on
Important parts: o Base case
Terminating condition a condition or rule that will cause the function to stop calling
itself without base case the program will run forever
o Recursive call where you call the function within the function
EXAMPLE!
Open RecursiveSquares:
1. The draw() function, calls Recursion_Art()2. which then calls Recursion_Art() four times3. each of which call Recursion_Art() four times4. each of which call Recursion_Art() four times5. each of which call Recursion_Art() four times6. each of which call Recursion_Art() four times7. each of which call Recursion_Art() four times
Objects:
Creating an object.
Instance variables.
Constructors.
Instance methods.
Classes.
Top Related