Skip to content
This repository was archived by the owner on Mar 30, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
aa478b0
Initial Commit.
Oct 5, 2017
e70e345
Delete README.md
Oct 5, 2017
2052e8b
Initial Commmit 2. after fetch to prevent "rejected non-fast-forward"
Oct 5, 2017
9270181
Merge remote-tracking branch 'origin/master'
Oct 5, 2017
229a4dc
Last commit and push was sucessful. Was able to push it to git.
Oct 5, 2017
7f7765b
Added ignore for bin (Classes)
Oct 5, 2017
348ca91
Finished WhileLoops2
Oct 6, 2017
8d7a50d
changed text.java to test pull on home eclipes
Oct 6, 2017
15bcd29
changed text.java to test pull on eclipse. TEST #2, test#1 was sucessful
Oct 6, 2017
e61b1f7
initial commit
Oct 9, 2017
7bac20a
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive
Oct 9, 2017
d067e53
testing commit at school
Oct 9, 2017
032e660
Added Lesson18
Oct 9, 2017
589b002
intital commit home
Oct 10, 2017
aa9c25d
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive
Oct 10, 2017
6cb0d19
home commit?
Oct 11, 2017
f46ba96
inital commit
Oct 11, 2017
0387f59
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Oct 11, 2017
0d61770
Added Lesson19
Oct 11, 2017
e5c6a78
change test.java
Oct 11, 2017
8b448b4
remove test.java from package
Oct 11, 2017
53eef37
update .gitignore to include setting, bin, classpath, project
Oct 11, 2017
043518c
edit lesson19 template
Oct 11, 2017
9101b4b
initial commit, blank
Oct 11, 2017
6a5f0b2
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive
Oct 11, 2017
82e0a42
test
Oct 11, 2017
6827263
test pull at school
Oct 11, 2017
370e092
test
Oct 11, 2017
23a3589
test
Oct 12, 2017
67b143d
test
Oct 12, 2017
57eefd3
test
Oct 12, 2017
4b99ac8
updated .gitignore to not include .project and .classpath
Oct 12, 2017
ce486ef
Finished APCSQuiz3_Pratice, answers on paper
Oct 12, 2017
d81eabd
added Lesson 20
Oct 12, 2017
a1a3656
Delete .gitignore
Oct 12, 2017
e7b5a80
test
Oct 13, 2017
2681eca
test
Oct 13, 2017
f9aad6e
rename _class_work
Oct 13, 2017
c7fe460
Finished Lesson 20
Oct 13, 2017
505042a
Complete Assignment "Crack the code"
Oct 15, 2017
6084975
Added Lesson21 and Lesson22
Oct 15, 2017
c0889d8
corrected Lesson21 and Lesson22's no activity statement
Oct 15, 2017
6b7fcdc
corrected Lesson21 and Lesson22's no activity statement
Oct 15, 2017
29c186d
test
Oct 15, 2017
82dacbd
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Oct 15, 2017
5800808
rename assignments
Oct 15, 2017
f8fd3d0
added Assignment 4, not done
Oct 15, 2017
cbe47ea
lskf
Oct 16, 2017
ebdaaf3
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive
Oct 16, 2017
83c46ba
assignment 4, not done
Oct 17, 2017
33bc889
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Oct 17, 2017
63bc88a
asdjfkl;
Oct 17, 2017
292b2ed
asdf
Oct 17, 2017
55e746f
asdf
Oct 17, 2017
7281f23
school
Oct 17, 2017
4c921d5
Added Assignment 4, using only Main method, got 100% on Edhesive.
Oct 18, 2017
e2d0763
Flash Cards
Oct 18, 2017
f01519a
asd
Oct 18, 2017
38c66b2
flash card
Oct 19, 2017
244967e
asdf
Oct 19, 2017
bf27a41
school
Oct 19, 2017
0d58ae9
indexed interfaces
Oct 20, 2017
74e529e
edhsive, interfance, test
Oct 22, 2017
13e128c
Added Lesson27 and graphics under _Home_Projects (renamed from
Oct 23, 2017
2245b65
Changed graphics
Oct 24, 2017
1985618
added lesson 28
Oct 26, 2017
e04bdaa
added Lessons 28 and 29
Oct 27, 2017
eeea182
added restoom_log project
Oct 27, 2017
816add2
autoBart CLassWork
Oct 27, 2017
778c8ab
start lesson 29 act one
Oct 30, 2017
6727478
finished Lesson 29
Oct 31, 2017
2b3bdc6
initial commit
Nov 1, 2017
2b3f1c1
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 1, 2017
1f37eca
Lesson30
Nov 1, 2017
872c83d
Finished Lesson30
Nov 2, 2017
7ed609b
Create README.md
Nov 2, 2017
d0cb447
deleted restroom logs, moved to SchoolProjects repo
Nov 2, 2017
cacd657
more commits
Nov 2, 2017
85353bb
Delete README.md
Nov 3, 2017
3a9707a
Create README.md
Nov 3, 2017
b7fb911
Update auto bar and java test
Nov 3, 2017
231c44c
added Lesson 1001 (after lesson 30), started assignment Names Merge (num
Nov 6, 2017
da7d00a
bin
Nov 6, 2017
f644483
redo at school, initial commit
Nov 6, 2017
6ef1405
name merge
Nov 6, 2017
be6bd08
initial commit
Nov 11, 2017
80976db
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 11, 2017
5457331
initial commit
Nov 11, 2017
aeb5dc8
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 11, 2017
07546d6
inital commit
Nov 11, 2017
609607f
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 11, 2017
b30f8d6
remove APCS and ACPS >:(
Nov 11, 2017
505267f
initial commit
Nov 11, 2017
2cfb168
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 11, 2017
14bc988
removed restroomlogs
Nov 11, 2017
fc52953
moved home project files to the home project repo
Nov 11, 2017
808b5c1
initial commit
Nov 13, 2017
50d8ce6
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 13, 2017
d2b2c45
worked on lesson 31 and 32
Nov 14, 2017
2b7fc11
started Lesson 33, not done
Nov 14, 2017
08edd63
initial commit
Nov 16, 2017
0d225fc
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 16, 2017
7926b73
arrayFun
Nov 16, 2017
cf1c0cc
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 16, 2017
30f9c80
wroekd on lesson33
Nov 16, 2017
3e22be7
almost done is Lesson33, need to finish act 5
Nov 17, 2017
7c44914
Lesson34, two not done
Nov 17, 2017
98eefe1
finished Leson34 act 6. and submitted.
Nov 18, 2017
2e76d4f
working on assignment 6
Nov 18, 2017
5a016cb
name merge
Nov 18, 2017
54367c3
edhesive: no next line err
Nov 19, 2017
22e2e36
updated arrayOdd to be scanable
Nov 27, 2017
1fc7bfc
name merge
Nov 27, 2017
1f42156
recursion methods
Nov 28, 2017
85106a7
worked on lesson 35 and 36
Nov 29, 2017
948654d
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Nov 29, 2017
eef116b
worked with recursion and removed the NO_ACTIVITY java files
Nov 29, 2017
39c4a52
test
Dec 4, 2017
2aacaa7
reworked file system to allows for different terms
Dec 5, 2017
848f668
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Dec 5, 2017
8fc00bc
Lesson1 (TERM TWO!!)
Dec 5, 2017
8bff788
worked on an interface for arrayList
Dec 5, 2017
a438778
fixed errors
Dec 5, 2017
1f41e21
remvoed static of scan
Dec 6, 2017
4c00e32
moved scanner
Dec 6, 2017
53e7e93
worked on name merge
Dec 7, 2017
b064a3b
worked on lesson 1
Dec 11, 2017
d8dcaf9
finished lesson1 and started lesson2
Dec 11, 2017
3968dc0
finished lesson3, working on lesson4 coding act.
Dec 12, 2017
576910c
worked on lesson4, moved location of interfaces and test files
Dec 12, 2017
998b9d7
tested
Dec 13, 2017
0987add
finished lesson4
Dec 14, 2017
e435b02
updated name merge array list, still not working
Dec 15, 2017
66bca7b
sorted arrayOne and arrayTwo
Dec 15, 2017
ae8db2b
added Magpie and Lesson 5 runners
Dec 31, 2017
5812267
added Magpie Guide PDFs
Dec 31, 2017
24df0c3
added Magpie 2 and 3
Dec 31, 2017
2bd524d
added a folder for each activity and created a JavaDoc for act. 3
Dec 31, 2017
5373609
magpie 4 complete, need to answer questions
Jan 3, 2018
53239cc
added worksheet
Jan 4, 2018
8d38e37
finished Magpie
Jan 4, 2018
4ab5910
moved Magpie directory in Labs, added Lesson 6 files, but still need to
Jan 5, 2018
0a07dc6
fixed location of Magpie pdf and word doc
Jan 5, 2018
9295e29
added Boxcar file, untouched. No changes made... yet
Jan 5, 2018
6243790
started boxcar
Jan 5, 2018
210db3e
renamed src and interface sec_folder/package
Jan 6, 2018
5878a6a
finished Boxcar and watched Lesson 6
Jan 6, 2018
6f0dfe4
renamed magpie and boxcar
Jan 6, 2018
29ac635
removed existing files from renaming magpie
Jan 6, 2018
8db5862
added FreightTrain (untouched) and renamed package
Jan 6, 2018
3385a78
started on FreightTrain
Jan 6, 2018
f22a91f
finished FreightTrain
Jan 6, 2018
c8371e9
moved boxcar and freightTrain to Assignment.
Jan 9, 2018
ffb7fed
tested in java_Test
Jan 10, 2018
0793213
added Lesson 8, still need to watch video
Jan 11, 2018
d8beca4
reminder to watch the video
Jan 11, 2018
ce1744c
apcs test prep
Jan 26, 2018
687e614
Worked on Lessons 8-12
Jan 30, 2018
7e19711
finished warmup
Feb 1, 2018
90c53d2
finished lesson 13
Feb 2, 2018
256a29d
finished Lesson 14
Feb 6, 2018
55d6b23
hello
Feb 8, 2018
161ee7d
worked on lesson 15 and 16
Feb 12, 2018
c5f90fd
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Feb 12, 2018
470006d
worked on ultimate frisbee
Feb 13, 2018
190434a
finished up ultimate player, but not working in Edhesive
Feb 14, 2018
59205de
worked on Ultimate Frisbee
Feb 15, 2018
48e7320
finished frisbee
Feb 15, 2018
c7f447f
added ONE \n to the players print line
Feb 15, 2018
949ba36
finished Lesson 16 with a semi-working insertion sort
Feb 18, 2018
172977a
finished Lesson 17 and 18
Feb 26, 2018
6ea563b
gamewheel
Feb 26, 2018
346f644
dcon form reminder
Feb 28, 2018
174b720
removed old outdated reminder
Mar 6, 2018
0a46521
worked on gamewheel
Mar 8, 2018
7f2fe38
finished Search and Sort Lab
Mar 11, 2018
8686f49
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive.git
Mar 11, 2018
58329b0
added zip file for turning in
Mar 11, 2018
4112561
finished lesson 19 and 20
Mar 22, 2018
682cd4a
late commit of lesson20
Mar 23, 2018
8c228f7
watched & finished Lesson 21
Mar 23, 2018
4ae5681
finished Diagnostics test
Mar 23, 2018
16cbda8
frq 2018
May 23, 2018
a78a6e8
Merge branch 'master' of https://github.com/garytou2/APCS-Edhesive
May 23, 2018
9571b90
It now generates 40 too.
rpanthee9417 Sep 6, 2018
095b830
Merge branch 'master' into patch-1
rpanthee9417 Sep 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="Term1"/>
<classpathentry kind="src" path="Term2"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="Exam"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.settings/
/bin/
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>APCS</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
27 changes: 27 additions & 0 deletions Exam/frq2017/Digits.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package frq2017;

import java.util.ArrayList;

public class Digits {
private ArrayList<Integer> digitList;

public static void main(String[] args) {
Digits d1 = new Digits(15704);

}

public Digits(int num) {
int length = Integer.toString(num).length();
for(int i = 0; i < length; i++) {
digitList.add(0, num%10);
num/=10;
}
System.out.print(num);
}

public boolean isStriclyIncreasing() {
return false;
}


}
103 changes: 103 additions & 0 deletions Exam/frq2018/Answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
GARY TOU - 6th Period
May 28th, 2018
---------------------

//QUESTION 1
//a
public boolean simulate(){
int distance = 0;
for(int i = 0; i < maxHops; i++){
distance += hopeDistance();
if(distance < 0){
return false;
} else if(distance >= goalDistance){
return true;
}
}
return false;
}

//b
public double runSimulation(int num){
int wins = 0;
for(int i = 0; i < num; i++){
if(simulate()){
wins++;
}
}
return (double)wins/num;
}

//QUESTION 2
//a
/**
* constructor
*/
public WordPairList(String[] words){
for(int i = 0; i < words.length-1; i++){
for(int k = i+1; k < words.length; k++){
allPairs.add(new WordPair(words[i], words[k]);
}
}
}
//b
public int numMatches(){
int matches = 0;
for(wordPair p : allPairs){
if(p.getFirst().equals(p.getSecond())){
matches++;
}
}
return matches;
}

//QUESTION 3
//a
public class CodeWordChecker impliments StringChecker{
int start;
int end;
String value;

public CodeWordChecker(String value){
StringChecker(6, 20, value);
}
public CodeWordChecker(int start, int end, String value){
this.start = start;
this.end = end;
this.value = value;
}
boolean isValid(String str){
if(str.length > end || str.length < start){
return false;
} else if (str.contains(value)){
return false;
}
return true;
}
}

//QUESTION 4
//a
public static int[] getColumn(int[][] arr2D, int c){
int[] arr = new int[arr2D.length];

for(int i = 0; i < arr2D.length; i++){
arr[i] = arr2D[i][c];
}
}
//b
public static boolean isLatin(int[][] square(){
if(containsDuplicates(square[0])){
return false;
}
for(int i = 0; i < square.length; i++){
if(! hasAllValues(square[0], square[i])){
return false;
}
for(int i = 0; i < square.length[0]; i++){
if(! hasAllValues(square[0], getColumn[i])){
return false;
}
return true;
}

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions ExamPrep/DiagnosticExam/url.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Check your answers:

https://docs.google.com/forms/d/e/1FAIpQLSfmo3CJPxiKcyTku930wv8lc-SVHP_dE7wEqVhdLQFW9-lU2Q/viewform
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# APCS Edhesive
Hello! My name is Gary Tou, a student who took the Edhesive AP Computer Science Course in 2017-2018. As of September 2018, I had decided to remove my solutions due to the increase attention this repository has been recieving. I hope you would learn how to solve them yourself!

Expand All @@ -13,3 +14,4 @@ If you every have any questions about Java or programming in general, feel free
Good luck on the AP Exam,
Gary Tou


75 changes: 75 additions & 0 deletions Term1/Assignments/Alien_Message_Board_4.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package Assignments;
import java.util.Scanner;


public class Alien_Message_Board_4 {

static int swear1 = 0, swear2 = 0, swear3 = 0; //swear1 = ^^, swear2 = QEY, swear3 = $
static boolean swear = false;

static Scanner scan = new Scanner (System.in);
static String input = scan.nextLine();

static String username = input.substring(0, input.indexOf(' '));
static String message = (input.substring(input.indexOf(' ') + 3)).toUpperCase();



public static void main(String[] args) {
String splitString = message;

if(splitString.indexOf(' ') > -1) {

while (splitString.indexOf(' ') > -1) {
String currentWord = splitString.substring(0, splitString.indexOf(' '));
checkSwear(currentWord);

splitString = splitString.substring(splitString.indexOf(' ')+1);
}

checkSwear(splitString);

}
else {
checkSwear(splitString);
}



printStats();
}


public static void checkSwear(String checkSwearMessage) {
//System.out.println(checkSwearMessage);
if ((checkSwearMessage.compareTo("^^")) == 0) {
swear1++;
swear = true;
}
if ((checkSwearMessage.compareTo("QEY") == 0)) {
swear2++;
swear = true;
}
if ((checkSwearMessage.compareTo("$")) == 0) {
swear3++;
swear = true;
}


}

public static void printStats() {
if(!swear) {
System.out.println("Results:\nCLEAN");
}
else {
System.out.println("Results:\nBAD");
System.out.println(username);

System.out.println("^^: " + swear1);
System.out.println("qey: " + swear2);
System.out.println("$: " + swear3);

}
}
}
89 changes: 89 additions & 0 deletions Term1/Assignments/Alien_Message_Board_4_ONE_METHOD.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package Assignments;
import java.util.Scanner;


public class Alien_Message_Board_4_ONE_METHOD {

public static void main(String[] args) {

int swear1 = 0, swear2 = 0, swear3 = 0; //swear1 = ^^, swear2 = QEY, swear3 = $
boolean swear = false;

Scanner scan = new Scanner (System.in);
String input = scan.nextLine();

String username = input.substring(0, input.indexOf(' '));
String message = (input.substring(input.indexOf(' ') + 3)).toUpperCase();


String splitString = message;
//System.out.println("start");
if(splitString.indexOf(' ') > -1) {
//System.out.println("in if");
while (splitString.indexOf(' ') > -1) {
String currentWord = splitString.substring(0, splitString.indexOf(' '));
//System.out.println(currentWord);
if ((currentWord.compareTo("^^")) == 0) {
swear1++;
swear = true;
}
if ((currentWord.compareTo("QEY") == 0)) {
swear2++;
swear = true;
}
if ((currentWord.compareTo("$")) == 0) {
swear3++;
swear = true;
}

splitString = splitString.substring(splitString.indexOf(' ')+1);
}

if ((splitString.compareTo("^^")) == 0) {
swear1++;
swear = true;
}
if ((splitString.compareTo("QEY") == 0)) {
swear2++;
swear = true;
}
if ((splitString.compareTo("$")) == 0) {
swear3++;
swear = true;

}
}

else {
//System.out.println("in else");
if ((splitString.compareTo("^^")) == 0) {
swear1++;
swear = true;
}
if ((splitString.compareTo("QEY") == 0)) {
swear2++;
swear = true;
}
if ((splitString.compareTo("$")) == 0) {
swear3++;
swear = true;
}
}

//System.out.println("before print");
if(!swear) {
System.out.println("Results:\nCLEAN");
}
else {
System.out.println("Results:\nBAD");
System.out.println(username);

System.out.println("^^: " + swear1);
System.out.println("qey: " + swear2);
System.out.println("$: " + swear3);
}
//System.out.println("end");

scan.close();
}
}
Loading