Course Info Slides ( Also posted to the left)
Aspirations in Computing Award (for women, genderqueer, or non-binary students with strong interests in computer technology)
CodeHS Gitbook (Specifically the "Classes & OOP" and "Data Structures" units)
In "Classes & OOP", the last 4 lessons (Starting w/ Inheritance) are held off until CS3.
In "Data Structures", the last 2 lessons (Starting w/ 2D Arrays) are held off until CS3
CSAwesome (Specifically units 5-7)
Princeton's Interdisciplinary Approach to Computer Science
Think Java Textbook HTML Version PDF Version
Study Material: Library Fiveable
Slides - CS Careers
Vocab - Virginia CS101 Vocab
PracticeIt - CS Washington (Specifically Chapters 7-10, 12-13)
Downloads: Eclipse Java Developer Download JDK Download
Online Java Compiler (Code in browser) - Online GDB Â Â CodeHS
Skim through CSAwesome's first 4 units to ensure you're familiar with:
Java Variables & Data Types
Java syntax
If Statements & Boolean Logic
Loops
Functions
String Functions & Manipulation
Random Number Generation
Check out the "Java Review" unit overview.
Review Program - Basics (Similar to the code in "Java Review", but with some differences that might be worth exploring)
Scanning is not part of the AP CS A topic list and therefore is not required knowledge for this class. We may cover the topic, or we may skip it altogether.
Run through the "File Scanning Unit Overview" to get a good idea of how to scan files. This unit isn't as critical as other unit's we'll cover this semester, but can make testing code loads easier.
Also, view the Build Java Programs Chapter 6 Slides:
Even Numbers (This is the same problem as "NumbersData")
Run through the "Arrays Unit Overview" to get a good idea of how arrays work. This is crucial to programming. So much of what we've done in the past becomes easier when you can process more data and store multiple values within a single variable.
No Looping
Swap Ends (Graded)
Tortoise Racing (Graded)
Looping
SmallEnough (Graded)
Average (Graded)
For additional problems: CodeWars Labs 12-15 (plus unorganized problems)
Searching:
Binary Search (Graded)
Selection Sort Worksheet from Sorting Worksheets pg1
Insertion Sort Worksheet from Sorting Worksheets pg2
Coded Sort (Graded)
I think it's important to understant how the String's compareTo function works.
Students don't need to know how to calculate the numeric values, just be able to identify whether the result will be negative, positive, or 0.
Typical scenario (character difference): In most cases the words are completely different (i.e. "elephant".compareTo("banana"), or "help".compareTo("hemp")), and in all these conditions the returned value will be the ASCII difference between the first letter difference found (i.e. 'e' vs 'b' when comparing elephant to banana, and 'l' vs 'm' when comparing help and hemp).Â
Special scenario (length difference): When 1 word is identical to the start of another word (i.e. "Sam".compareTo("Samantha")), it returns the difference of the String lengths (Sam - Samantha --> 3 - 8 = -5). This is also when it finds that 2 words are identical and returns 0 (i.e. "Sam".compareTo("Sam") reaches the end of the first String, so it returns 3-3 --> 0)Â
If you were to code a compareTo function on your own, the pseudo code would be something like:
function compareTo(String s1, String s2)
    loop as long as you haven't reached the end of s1 and you haven't reached the end of s2:
        letter1 = letter from s1 (based on loop count)
        letter2 = letter from s2 (based on loop count)
        if letter1 != letter2:
            //if you get here, it means you found a difference between 2 letters
            return ASCII(letter1)-ASCII(letter2)
    //if you get here, it means one of the Strings didn't have any more letters to check.
    return len(s1)-len(s2)
CS Awesome - Writing Classes
Playlist - Physical Memory Models
Anatomy
Instance variables (a.k.a member data) - What the object IS (what data makes up this object)
Constructors (Default, no parameters, parameterized, fully parameterized) - Setup the object
Getters (a.k.a Accessors) - Give access to Instance Variables
Setters (a.k.a Modifiers) - Change Instance Variables
toString - String representation of the object
Helpers - any additional functions that are not listed above
Calculators
Specialty Modifiers/manipulators
Extras
equals - see the implementation of the String Equals function
compareTo - See Barldung's Guide to Implementing the compareTo Method
Program - Basics
Program - Rectangle
Pragram - Circle
Program - Warrior Object
DrawingPanel - Download and drag the file into eclipse.
Many programming challenges ask students to sort objects. When objects have multiple values in them, there could be multiple ways to sort the information.
Using a basic sorting algorithm (suggestion: selection or insertion sort for simplicity), try to complete the following task:
make an Ingredient object that stores a name, quantity, category (dairy, vegetable, fruit, etc.), and orderValue (representing its order in relation to when other ingredients are added to a recipe)
Include a function that orders based on the name of the ingredient
Include a function that orders based on the orderValue
Include a function that orders based on quantity
Include a function that orders based on category. When 2 items share the same category, order them by name.
FRQ - StringFormatter
Remove Even Length Strings - Removing due to suspect of students cheating
The main topics we've covered this year are:
Defining new Objects & using them
Creating, accessing, and modifying Arrays
Creating, accessing, and modifying ArrayLists
+ All CS1 topics (variables, Math, Scanner, Strings, conditionals, For Loops, While Loops, Function use, Function definition)
The following assignments are graded and are meant to help prepare you for the Final (Or will actually be the final...). Do them in the order provided below. Consider viewing the Hints at the bottom of the webpage to see suggestions on solving these problems.
Objects
ArrayLists
There will also be a final multiple choice test (Closed Notes, no access to eclipse projects). That will be provided the day of finals.