APCS-A SUMMER Homework

Assumes that students have taken and passed CS1 with an A or B.
Most of the work below was part of CS1.
We will hit the ground running on the first week of the Fall semester.
Make sure that you have completed all of the assignments below.

ECLIPSE HW (#1)

Eclipse IDEEclipse Program

NOTE:

Start up Eclipse and paste your folder (path) into the Workspace when prompted.
If the Navigator view is closed on the left, select: Windows -> Show View -> Navigator.

When you run the program (Ctrl+F11), if you get the error: "Could not find or load main class", do this:
1. In the Navigator tab, Right-click on the Project Name (Chapter01) and select Properties.
2. Click on Java Build Path.
3. Click on the Libraries tab.
4. Remove all the libraries in the list.
6. Click the Add Library button.
7. Select/Highlight JRE System Library (at the top). Click the Next button. Then click Finish.

Eclipse IDE Tutorial (on Youtube).
Remember: you are working in the Navigator view, NOT Package Explorer.

Reading: BJP (Building Java Programs)
Textbook 

Table of Assignments


Unit

Topics

BJP Reference

Activities

Assessments

1

Logistics
Programming/Java definition
println
methods

1.1 - 1.2

Logic puzzles and ball parking to introduce computational thinking (30 min in class)

Ch 1, p. 54
Exercises 1-7

2

Flow control
Expressions
Variables
Coding conventions

1.4-1.5, 2.1-2.2

Procedural decomposition problem (ASCII shapes) (2hrs in class)

Ch 1, p. 55
Exercises 8-13
Ch 2, p. 117
self-check problems 1-4, 7-13

Ch 2, p. 124
Exercise 1

3

Definite loops
Nested loops

2.3

Variables and loops practice (1 hr in class)

Ch 2, p. 124
Exercises 2-8, 10, 15, 16

4

Nested loops
Pseudocode
Class constants

2.4-2.5

Complex figures (1hr in class)

Ch 2, p. 121-123
self-check problems 23-28
p. 130, problem 6: Space Needle project

5

Scope
Parameters

3.1 (pp. 132-147)

Parameters practice (2hrs in class)

Ch 3, pp. 177-180
self-check problems 1-3, 7-8

Ch 3, pp. 183-184
Exercises 1-5

7

Interactive programs using Scanner
Packages
Math class
Return statement

3.3, 3.2

Methods that return values;
Math and Scanner practice (2hrs in class)

Ch 3, pp. 177-181
self-check problems 4-6, 9-13

Ch 3, pp. 184
Exercises 6-10

8

Conditionals

3.2, 4.1, 4.4, 4.5

Conditionals and return practice

Ch 4, pp. 289-293, 295-296 
self-check problems 1-11, 22-26
Ch 4, pp. 296-299
Exercises 1-5, 9-12, 16 

9

1. Cumulative algorithms
2. Roundoff Error
3. Do not use == with double / float

4.2

 

Ch 4, pp. 293-295 
self-check problems 12-16
Ch 4, pp. 297-298
Exercises 6-8

10

Strings
-As Objects (a special kind of object, though)
-0-based indexing
-Exceptions
-As ImmutableObjects

Scanner
Text processing
-the char type
-escape sequencecharacters
-char type variables can be used in a switchstatement
-conversion of char toint
-printf()

3.3, 4.3

Strings practice (3hrs in class)

Ch 3, pp. 181-182
self-check problems 14-19
Ch 3, pp. 185
Exercises 11-15
Ch 4, pp. 291-295 
self-check problems 7-11, 17-21
Ch 4, p. 299
Exercises 13-15

In the Ch4 Exercises, do not use a scanner. Instead create string literals containing your test phrases.

______________________________________________________________________________________________________

CodingBat Warm-up Unit #1

Go to Codingbat.com and create an account. 
Your account name should be in the following format: "SUMMER Last, First"
Use the share feature in preferences to link it to my email address srp4379@lausd.net,
so that I can view your work should you have any problems/questions.

CODINGBAT SOLUTIONS and VIDEO HELP (start with videos 3,4 and 5)

CB Videos (accessible at home)
CB1_IntroductionToJavaStrings.mp4
CB2_JavaStringSubstring.mp4
CB3_JavaIfBooleanSolutionCode1.mp4  ***
CB4_JavaIfBooleanSolutionCode2.flv  ***
CB5_IntroductionToModCode.mp4  ***
CB6_IntroductionToMakeBricksCode.mp4
CB7_MakeBricksSolutionCode.mp4
CB8_FizzBuzzPracticeCode.mp4

HELP Documents
If Else Structures
Indentation Rules
Strings PRIMER (Use this for Array-1 as well!)

Warmup-1
01. sleepIn
02. monkeyTrouble
03. sumDouble
04. diff21
06. makes10
07. nearHundred

______________________________________________________________________________________________________

CodingBat Logic-1 Unit #2

CB (Java) Logic-1

01. cigarParty
02. dateFashion SKIP!
03. squirrelPlay (needed for gotAdvisory)
04. caughtSpeeding
05. sortaSum (needed for evenSum)
06. alarmClock SKIP!
07. love6
08. in1To10
09. specialEleven
10. more20
11. old35
12. less20
13. nearTen
14. teenSum
15. answerCell SKIP!
16. teaParty (needed for digitsEqualOrTwice)
17. fizzString SKIP!
18. fizzString2 SKIP!
19. twoAsOne
20. inOrder (needed for consecutiveOrder)
21. inOrderEqual (needed for consecutiveOrder)
22. lastDigit(needed for digitsEqualOrTwice)
23. lessBy10
24. withoutDoubles (needed for diceDoublesOrLucky)
25. maxMod5 SKIP!
26. redTicket SKIP!
27. greenTicket SKIP!
28. blueTicket SKIP!
29. shareDigit (needed for digitsEqualOrTwice)
30. sumLimit SKIP!

CODINGBAT QUIZ 1
Logic-1: http://codingbat.com/home/srp4379@lausd.net/quiz3

Quiz Question. subjectNow

______________________________________________________________________________________________________

CodingBat Array-1 Unit #3

CB (Java) Array-1
Strings-1 PRIMER! (ARRAY Position numbers / formulas are the same as for the String class)

01_firstLast6.java
02_sameFirstLast.java
03_makePi.java
04_commonEnd.java
05_sum3.java
06_rotateLeft3.java
07_reverse3.java
08_maxEnd3.java
09_sum2.java
10_middleWay.java
11_makeEnds.java
12_has23.java
13_no23.java
14_makeLast.java
15_double23.java
16_fix23.java
17_start1.java
18_biggerTwo.java
19_makeMiddle.java
20_plusTwo.java
21_swapEnds.java
22_midThree.java
23_maxTriple.java
24_frontPiece.java
25_unlucky.java
26_make2.java
27_front11.java

CODINGBAT QUIZ 2
Array-1 QUIZ  

______________________________________________________________________________________________________

CodingBat String-1 Unit #4

CB (Java) String-1

Strings-1 PRIMER!

01_helloName.java
02_makeAbba.java
03_makeTags.java
04_makeOutWord.java
05_extraEnd.java 
06_firstTwo.java
07_firstHalf.java
08_withoutEnd.java
09_comboString.java
10_nonStart.java
11_left2.java
12_right2.java
13_theEnd.java
14_withouEnd2.java
15_middleTwo.java
16_endsLy.java
17_nTwice.java
18_twoChar.java
19_middleThree.java
20_hasBad.java
21_atFirst.java
22_lastChars.java
23_conCat.java
24_lastTwo.java
25_seeColor.java
26_frontAgain.java
27_minCat.java
28_extraFront.java
29_without2.java
30_deFront.java
31_startWord.java
32_withoutX.java
33_withoutX2.java

CODINGBAT QUIZ 3
String-1 QUIZ

______________________________________________________________________________________________________


CodingBat Array-2 Unit #5

CB (Java) Array-2 Traversing Arrays using for-Loops.
Array-2 Primer!

01_countEvens.java
02_bigDiff.java
03_centeredAverage.java
04_sum13.java
05_sum67_SKIP.java SKIP!
06_has22.java
07_lucky13.java
08_sum28.java
09_more14.java
10_fizzArray.java
11_only14.java
12_fizzArray2.java
13_no14.java
14_isEverywhere.java
15_either24.java
16_matchUp.java
17_has77.java
18_has12.java
19_modThree.java
20_haveThree.java
21_twoTwo.java
22_sameEnds_SKIP.java SKIP!
23_tripleUp.java
24_fizzArray3.java
25_shiftLeft.java
26_tenRun.java
27_pre4_SKIP.java SKIP!
28_post4_SKIP.java SKIP!
29_notAlone_SKIP.java SKIP!
30_zeroFront_SKIP.java SKIP!
31_withoutTen_SKIP.java SKIP!
32_zeroMax_SKIP.java SKIP!
33_evenOdd.java
34_fizzBuzz.java

CODINGBAT QUIZ 4
Array-2: http://codingbat.com/home/srp4379@lausd.net/quiz2