addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding?...

14
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”

Transcript of addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding?...

Page 1: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.

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

Page 2: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.

Comparison Operations:

Type Conversion:

Page 3: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.

Variables

Page 4: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 5: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 6: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 7: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 8: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 9: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 10: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.

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}

Page 11: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.

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.

Page 12: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.

Constructors.

Instance methods.

Classes.

Page 13: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.
Page 14: addcsummer2013.files.wordpress.com€¦  · Web viewWhat are the main components of coding? Different data types! int numbers without decimal. Ex. 10 . double numbers with decimal.