HW Sheet 2 – Friedland - APCS – Chapters 9-12 - 2007/2008

DATE

LAMBERT SECTION

HW #

HW

10/10-10/11 BLOCK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9.1-9.4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

23

CHAPTER 9 PROJECTS:

Name your Litvin projects: LITVIN_Page_Prob.java 

(e.g.  LITVIN_234_17.java) 

 

LITVIN Pg 360 #24-28.  (Write a tester for each one!)

 

9A:  Design and implement an application that reads an arbitrary number of integers in the range 0 to 50 inclusive and counts how many occurrences of each is entered.  After all data is entered, create an output table displaying each integer and the number of occurrences for any int that was entered 1 or more times. 

 

BONUSES:

1)    No preset range of ints.

2)    No limit to number of ints I can enter

3)    Draw a histogram, complete with labeled axes. 

4)    Intelligent scaling of histogram axes (i.e. if I entered in the number seven 25 times, maybe ticks marks should go by 5 instead of by 1)

5)    Display mean and standard deviation of data.  (See me for help)

 

9B:  Design a bank that can handle up to 30 customers.  Each account has a name, account number, and account balance.  Allow each customer to make deposits and withdrawals.  Produce appropriate error messages for invalid transactions.  Provide a method to add 3 percent interest to all accounts whenever it is invoked.  I should be able to check the status of any account at any time. 

 

LAMBERT:  Read pgs 305-313

LITVIN:  Read Sections 12.1-12.2

LINKS: Introduction to Arrays, Creating and Using Arrays, and Programming with Arrays.

 

LAMBERT:  Do:  9.1 (#1-3) 9.2 (#1-2) 9.3 (#1-5), 9.4 (#1-4)

 

10/15 Mon

9.5-9.7

24

LAMBERT:  Read pgs 314-320

LITVIN:  Read Section 12.10

LINKS: Multidimensional Arrays and Two-dimensional Arrays

 

LAMBERT:  Do:   9.5 (#1-2) 9.6 (#1-5) 9.7 (#1-4)

 

10/16 Tue

9.8-9.10

25

LAMBERT:  Read pgs 321-337  

LITVIN:  Read Section 12.7 

LINKS: Arrays as Parameters, Methods that Change Arrays, and Enhanced For Loop

 

LAMBERT:  Do:  9.8 (#1-2) 9.9 (#1-5) 9.10 (#1-2)

 

10/17-10/18 BLOCK

 

Review

26

LITVIN:  Do Pg 355 #1-8 and Pg 357 #17

10/19 Fri

 

 

 

 

10.1-10.3

 

 

 

 

27

CHAPTER 10 PROJECTS:

LAMBERT: 10-1, 10-3, 10-4, 10-5

LITVIN:  Pg 319 #8, 9

 

LAMBERT:  Read pgs 351-361

LITVIN:   Read Section 11.1

LINKS:  Programming w/Objects and Defining Your Own Classes

 

LAMBERT:  Do 10.1 (#1-4), 10.3 (#1-2)

 

10/22 Mon

10.4-10.5

28

LAMBERT:  Read pgs 362-371

LITVIN:  Read Section 11.2

LINKS:  Introduction to Inheritance, Inheritance and Class Hierarchy, and Example:  Vehicles

 

LAMBERT:  Do:  10.4 (#1-2)  10.5 (#1-6)

 

10/23 Tue

10.6-10.7

29

LAMBERT:  Read pgs 372-380

LITVIN:  Read 11.4 and 11.7

LINKS:  Interfaces, this and super, and Polymorphism

 

LAMBERT:  Do:  10.6 (#1-4)  10.7 (#1-2)

 

10/24-10/25 BLOCK

10.8-10.10

30

LAMBERT:  Read pgs 380-392

LITVIN:  Read 11.3

LINK: Abstract Classes

 

LAMBERT:  Do:  10.8 (#1-2)  10.9 (#1-2)  10.10 (#1-4)

 

10/26 Fri

10.11

31

LAMBERT:  Read pgs 392-394

LITVIN:  Read 11.5

LINK: Programming Example:  Hand, Card, Deck

 

 

LAMBERT:  Do:  10.11 (#1-4) and pg 403 ALL

LITVIN:  Do Pg 317 #1-5