Day 1 - We talked about what Java is and how to start programming with an IDE. I introduced all of you to IntelliJ, which you can find the installation steps + guides to some helpful features (also in the drive folder) here: https://docs.google.com/document/d/1dSAYlCZ0JEceOC5ZkxHKdmDbXCzaImh9ztS0lGBX5lc/edit?usp=drive_link
Day 2 - We talked about basic primitive types, and how to print variables using System.out.println() and System.out.print(). The difference between these two is the println() goes to the next line, while print() does not. We went over Java naming conventions, arithmetic expressions, and shorthand operators.
Day 3 - We went over String concatenation, implicit & explicit casting, standard Math functions, and the mod operator. We did important practice using Math functions to create code that calculates several common problems.
Day 4 - We went over using the Scanner class to take in input to our code, practicing various ways of taking in input.. Scanners have different methods to take in different types: String (only one word/token) - sc.next();
int - sc.nextInt();
double - sc.nextDouble();
(all other primitive types use sc.nextTYPE(); )
An entire line as a string - sc.nextLine();
Day 5 (Review Day) - We did a thorough review of the topics from the past 4 weeks.
Day 6 - We talked about the difference between characters and strings.
Characters are any typeable character (surrounded by ' '), encoded into the computer as an integer (ASCII Table) and can be added/subtracted/multiplied/divided.
Strings are a sequence of characters (surrounded by " "). They are zero-indexed, meaning their index starts from 0 and ends at length() - 1.
We also talked about many string functions - length(), charAt(), substring(), indexOf(), lastIndexOf()
Common mistake: substring() function has 2 variants:
Variant 1: only one parameter substring(x) - takes the substring of the main string FROM (including) index x to the end
Variant 2: two parameter substring(x,y) - takes substring of main string from (including) index x to index y (EXCLUDING). Remember the second index is EXCLUDED!
Day 7
Continuation of string functions - contains(), equals(), equalsIgnoreCase() compareToIgnoreCase(), trim(), toUpperCase(), toLowerCase()
Did Kahoots/practice of these functions. For examples of codes using these functions, refer to https://www.codiva.io/p/c0202730-89fd-49aa-95cf-80558cede564 (includes helpful explanation comments)
Day 8
We discussed flow control structures, boolean operators, truth tables, and if/else if/else statements.
FOR ALL MATERIALS (SLIDES/RECORDINGS): https://drive.google.com/drive/folders/1dY_nmHZqfedv-Be86mvNavp8quNvjAwP
After every class, please fill out the class feedback form: https://forms.gle/L3PVjyzWxtEuL6q67
For any questions, please reply to this post!
Please submit your homework answers here!
Please ignore the scanner functions being blue, the website thinks they are links.