AP COMPUTER
SCIENCE – HW SHEET #1 – CHAPS 1-6 - 2007/2008 – FRIEDLAND
Web links:
http://www.paly.net/~sfriedla/APCS
|
Date |
Info |
HW # |
Assignment |
|
8/28 Tue |
1.3-1.6 |
1 2 |
SEND MR. F AN EMAIL FROM HOME WITH SUBJECT, ÒAPCSÓ
Pg 17 #1-5, Pg 20 #1-4, Pg 23 #1-4 Pg 26 #1-5, Pg 29 Written #5; FITB #1-3 Links: Intro to Object Oriented Programming, and Machine Language and External Device Workings |
|
8/29-8/30 BLOCK |
2.1-2.5 |
3 |
Read pgs 31-41: Pg 32 #1-3, Pg 33 #1-3, Pg 36 #1-4, Pg 42 #1-4 Link: Java Virtual Machine |
|
8/31 Fri |
2.6-2.7 |
4 |
Read pgs 42-52: Pg 45 #1-5, Pg 52 #1-4 |
|
9/4 Tue |
Review |
5 |
Pg 53 #1-6, Pg 54 #7, 1-6 Links: The Internet and WWW and Java! and Toolboxes, APIs, and Packages |
|
9/5-9/6 BLOCK |
3.1-3.2 |
6 |
Read pgs 57-65: 3.1 (#1-4), 3.2 (#1-13) Links: Basic Java App |
|
9/7 Fri |
3.2-3.4 |
7 |
Read pgs 66-81: 3.2 (#14-25), 3.3 (#1-3), 3.4 (#1-2) Link: Variables
and Primitive Data Types |
|
9/10 Mon |
3.5-3.6 |
8 |
Read pgs 82-92: 3.5 (#1-3), 3.6 (#1-2) |
|
9/11 Tue |
3.7 |
9 |
Read pgs 92-100: 3.7 (#1-4), Pg 101-102 (ALL) PROJECTS:
Critical Thinking Pg 104; 3-A: Write
an application that takes in two integers from user and outputs sum, product,
difference, and quotient.
---BONUSES: Use
system.out.printf for output; program loops until I want to quit; program
responds gracefully to division by 0. 3-B: Write
an application that takes in 5 numbers from the user and outputs sum,
average, product, smallest, and largest.
---BONUSES: Find std
deviation; user can input any # of numbers; find median |
|
9/12-9/13 BLOCK |
4.1-4.4 |
10 |
Read pgs 105-115: 4.1 (#1-2), 4.2 (#1-2), 4.3 (#1-2), 4.4 (#1-7) Links: Blocks and Stuff and Algortihm Development and The "if" statement |
|
9/14 Fri |
4.5-4.6 |
|
Read pgs 116-123: 4.5 (#1-5), 4.6 (#1-3) Link: The "while" statement and The "for" statement |
|
9/17 Mon |
TEST |
11 |
TEST Chaps 1-3 |
|
9./18 Tue |
4.7-4.9 |
12 |
Read pgs 124-137: 4.7 (#1-2), 4.8 (#1-2), 4.9 (#1) Link: Details of Expressions |
|
9/19-9/20 BLOCK |
4.10 |
13 |
Read pgs 137-145: 4.10 (#1-4) |
|
9/21 Fri |
Review |
14 |
Pg 145-146 (ALL), Pg 149-151 ALL PROJECTS:
4-5, 4-10 4-A: Write an application that computes ex by using the formula: ex = 1 + x/1! + x2/2! + x3/3! + É (Note: ! = factorial. e = EulerÕs number. Let me know if you need help with these mathematical concepts!). 4-B: Write a program that reads an integer value between 0 and 100 (inclusive) representing the amount of a purchase in cents. Produce an error message if the input value is not in that range. If the input is valid, determine the amount of change that would be received from one dollar and print the number of quarters, dimes, nickels, and pennies that should be returned. Maximize the coins with the highest value. Example: Purchase amount: 36 Your change of 64 cents is given as: 2 Quarters 1 Dime 0 Nickels 4 Pennies Program should correctly determine whether the plural form of the coin should be used (i.e. 1 Dime vs 2 Dimes) 4-C: You're going to create a bar-chart! Write an application that prompts user for 10 numbers (each number needs to be between 1 and 30). For each number read, your program should draw a line containing the number of adjacent asterisks. For example, if the user inputs the number seven, your app would print: ******* ---BONUSES: Make it GUI; allow user to name each bar and make
the name part of the display; donÕt limit number to 30, if user wants number
that would cause line to be too long, use scale factor and inform user of
scale factor in final display (scale factor has to apply to all bars for
display to be valid) |
|
9/24 Mon |
5.1-5.2 |
15 |
Read pgs 155-167: 5.1 (#1-5) 5.2 (#1-11) Link: Black Boxes |
|
9/25 Tue |
5.3-5.5 |
16 |
Read pgs 168-182: 5.4 (#1-4), 5.5 (#1-3) Links: The "Return" Statement and Parameters and Objects, Instance Methods & Variables |
|
9/26-9/27 BLOCK |
5.6 |
17 |
Read pgs 183-194: 5.6 (#1-3), Pg 195-196 (ALL) Links: Static Subroutines and Variables and Constructors and The "truth" about
declarations PROJECTS:
5-3, 5-5, 5-8, 5-9 5-A:
Create a class called ÒDateÓ that includes three pieces of info as
instance variables: month, day,
and year. YouÕll need a
constructor that initializes all three instance variables. Write a method to check that the values
given are valid and prompts user for new values they arenÕt. Provide an accesssor and mutator
method for each variable.
Provide a method displayDate
that displays the date separated by forward slashes (/). |
|
9/28 Fri |
6.1 |
18 |
Read pgs 199-212: 6.1 (#1-5) |
|
10/1 Mon |
TEST |
|
TEST CHAPTER 5 |
|
10/2 Tue |
6.2-6.4 |
19 |
Read pgs 213-221: 6.2 (#1-6) 6.3 (#1-2) 6.4 (#1-2) |
|
10/3-10/4 BLOCK |
6.5-6.7 |
20 |
Read pgs 222-233: 6.5 (#1-2) 6.6 (#1-4) 6.7 (#1-3) |
|
10/5 Fri |
6.8 |
21 |
Read pgs 234-241: 6.8 (#1-4), Pg 243-244 (ALL) |
|
10/8 Mon |
Review |
22 |
Do: Pg 299-301 ALL PROJECTS:
6-8 through 6-10, Pg 301-302 #3, #4, Critical Thinking 6-A: A right triangle can have sides that are all integers, i.e. 3-4-5 or 5-12-13. If the sides are all integers, these numbers are called a "Pythagorean Triple." Write an application to find ALL Pythagorean triples for hypotenuses less than 501. Hint: use a triple nested for-loop. 6-B: Calculate ¹ from the infinite series: 4 – 4/3 + 4/5 – 4/7 + 4/9 – 4/11 + É Print a table that shows the value of ¹ approximated by 1 term, 2 terms, 3 terms, etc. How many terms of this series do you have to use before you first get 3.14? 3.141? 3.1415? 3.14159? (Put comment in code telling me or use System.out.println().) 6-C: Write an application that displays the following patterns separately one below the other. You must use for loops to generate the patterns to receive credit. (A)
(B)
(C) (D) *
********** **********
* **
********* *********
** ***
******** ******** *** ****
*******
******* **** ***** ******
******
***** ****** *****
***** ****** *******
****
**** ******* ********
***
***
******** ********* **
** ********* ********** *
* ********** |
|
10/9 Tue |
TEST |
|
TEST CHAPTERS 4 & 6 |
Rough Preview:
October: Chaps 6, 9 November: Chaps 10, 11 December: Chap 12
January: Chap 13 February: Chaps 14-16 March: Chaps 17-19
April: AP Review/Case Study
