240 likes | 426 Views
COP3502: Introduction to CIS I. Lecture 3. +. +. -. -. C-. B / B-. A- / B+ / B. A. A+. --, ++. +. +. -. -. 6. 7. 4. 8. 5. -- (2), ++ (10). 681-800 A 641-680 A- 591-640 B+ 541-590 B 501-540 B- 461-500 C+ 421-460 C 381-420 C- < 380 E. discussions.
E N D
COP3502: Introduction to CIS I Lecture 3
+ + - - C- B / B- A- / B+ / B A A+ --, ++
+ + - - 6 7 4 8 5 --(2), ++(10)
681-800 A 641-680 A- 591-640 B+ 541-590 B 501-540 B- 461-500 C+ 421-460 C 381-420 C- < 380 E
Scratch Meets Java System.out.println(“Hello, World!”)
Scratch Meets Java (1 < 2) (x > 5) (x < y && x > z)
Scratch Meets Java if (x < 5) { **Do something** } else { *Do something else** }
Scratch Meets Java for (inti = 0; i < 10; i++) { **Do something** }
Scratch Meets Java while (true) { **Do something** }
variables type, name, value
variables type, name, value declaration: inti;
i int
variables type, name, value initialization/assignment: i = 0;
0 i int
variables type, name, value declaration + initialization: inti = 0;
1.25 n 0 i int double
types • byte • short • int • long • float • double • boolean • char
types • byte = 8-bits • short = 16-bits • int = 32-bits • long = 64-bits • float = 32-bits • double = 64-bits • boolean = not well defined • char = 16-bits
types • byte • short • int (integer numbers) • long • float • double (decimal point numbers) • boolean (true or false) • char (letters, punctuation, symbols)