US News ranks Walnut Hills 65th and Newsweek ranks Walnut Hills 66th among U.S. high schools

Out of more than 18,000 public high schools in the USA, US News ranks Walnut number 65 in the USA andawards WHHS Gold Medal status.

Click here to view the entire US News report

Each year, Newsweek picks the best high schools in the country based on how hard school staffs work to challenge students with advanced-placement college-level courses and tests. Just over 1.600 schools—only 6 percent of all the public schools in the U.S.—made the list.

Newsweek has ranked Walnut 66th in the nation and #1 in Ohio.

Click here to view the Newsweek report

AP Computer Science

AP Computer Science A is all about problem-solving. This course covers the material in an introductory Computer Science college course, and is intended for students with no or some prior computing experience. The course uses the Java language to teach fundamental computer programming skills and follows an object-oriented approach emphasizing data structures, abstractions, and algorithm development and analysis.

The course is a lab course in which you learn by doing. We will start by building small programs to learn the Java language and the basics of object oriented program design. We will then develop larger, more interesting problems, and will start working on a large interactive case study called Grid World.

The course is focused on writing programs that work on a desktop computer, using graphical interfaces, but the approaces and techniques you will learn can easily be adapted to develop web applications.

Besides the books and other materials used in this course, there are lots of excellent on-line resources for learning the Java language. A few of these are listed below.

Resources

Textbooks.
The main text for the course will be Java Methods A&AB: Object-Oriented Programming and Data Structures, AP Edition, by Maria Litvin and Gary Litvin (Andover, Mass.: Skylight Publishing, 2006.)

As practice for the AP exam, we will also use Be Prepared for the AP Computer Science Exam in Java, 4th Edition, by Maria Litvin and Gary Litvin (Andover, Mass.: Skylight Publishing, 2009.)

Syllabus and Material Covered

We will be following a proposed syllabus for the most part. You can get a copy of the syllabus here. In this syllabus, we will be covering the material you are responsible for on the CS AP exam, which is a small subset of the full Java development system.
     Here is a simplified version of the AP Java Subset I recommend that you print a copy and mark it us with page and date references as we cover each item in the Subset.

Sun's Java Tutorials
Sun and Oracle, the developers and owners of Java, have prepared a wonderful set of free, on-line tutorials on everything you could ever want to know about Java. These are a valuable supplement to course work. The most useful of these tutorial will be:
the sections on Java Language Basics and Object Oriented Programming Concepts
A listing of all the available tutorials is here.

Software

To use Java at home, you need to install the following FREE (!) software on your computer. All of this is available from the main Java download site, http://www.oracle.com/technetwork/java/javase/downloads/index.html

The software you need to load is:
1. The Java SE 6 Runtime Environment JRE -   
2. The Jave SE 6 Software Development Kit, JDK - install into C:\Program Files\Java\jdk1.6.0, rather than the suggested location
3. The Java SE 6 SDK documentation - (at the bottom of the page, under Additional Resources) - install this into a subdirectory docs of the jdk1.6.0 directory.
The Netbeans 6.9 IDE (Integrated Development Environment) - Select the Java SE version.

 

GridWorld

One very important part of the Computer Science A curriculum is the GridWorld Case Study.
The source code for this study and the manual are on your Java Distribution Disk, but for your convenience you can:
     download the GridWorld Case Study Manual as a pdf file
     download the GridWorld source code as a zip file. To use this, copy it to your flash
         drive and the right-click Extract to GridWorldCode
     download instructions for setting up the GridWorld project

Computer Buying Tips

Here is some information that might be useful for people planning to buy laptops for college or before.

Class Notes and Assignments

Class Notes - last updated 09/28/2011
Notes on Strings - last updated 10/25/2011
Notes on Arrays - last updated 11/18/2011
Notes on Algorithms - last updated 12/12/2011- including exam review notes

Very brief review of items to be tested on Fall semester exam:

  • data types, esp Strings
  • if / else and booleans (including truth tables, &&, ||, etc.)
  • loops – for, while
  • classes
    • constructors, fields, methods, getters & setters
    • creating objects ClassName obj = new ClassName()
    • until an object is initialized, it has a value null
  • inheritance – what of a superclass is available to the subclass
  • arrays – can be initialized using { , , ,} or new
    • for example, you can initialize an int array in either of these ways: int[ ] intArray = {1, 2, 5, 3}; or int[ ] intArray = new int[6];
    • once you initialize an array with the new operator, you must assign elements explicitly: intArray[0] = 1; intArray[1] = 2; etc
  • methods returning values, use of accumulators
  • recursion
    • given a recursive algorithm expressed as pseudocode, write the corresponding java method
    • trace a recursive java method

Homework - 08/18/11

Homework - 08/19/11


Homework - 08/22/2011

write programs that will display the results of these assignments, via explicit type conversion ("casting") of double values to an int variable. You can write these as multiple separate programs in ideone.com, or you can create a single program, declare the int variable a, and use multiple assignments and print statements to display the results.
int a;
a = (int)10.789;
a = (int) (-10.789);
a = (int) 5.2;
a = (int) 5.6;

*Homework - 08/23/2011

Read sections 2.6, 2.7, and 2.9 in How to Think Like a Computer Scientist (H2T)
Do Exercise 2.2 in H2T

Homework - 08/25/2011 - for loops

Homework - 08/26/2011 - tracing for loops

Homework - 08/30/2011 - finish Casino project

Homework 08/31/2011 - start upgrade to PowerSchool

  • write an if / else if …. statement that will, given a number in the range 55 .. 100, convert it efficiently to a letter grade
  • initialize a variable in that range
  • process the variable through the if / else if … statement and print out the letter grade

Homework 09/06/2011 - Introduction to methods - for a copy of Grader_110906 click here

In class today we extracted the getLetterGrade code from the Grader sample text, as a method with signature

public static String getLetterGrade(int grade)

The homework is to

1. replace the routine inside the for loop that calculates the letterGrade associated with a specific number grade with the statement letterGrade = getLetterGrade(grade)
2. use the getLetterGrade method again to find the letter grade associated with sumGrades, the average of the number grades received on the 12 tests.
3. Verify that this runs in ideone.com

Homework 09/07/2011 - Methods

1. Imitating the cToF method you wrote in class today, write a method fToC that will convert a temperature in Farenheit to the corresponding Celsius temperature. The formula is c = (f - 32) * (5 / 9)
2. Use these two methods in the main() method of the Main class in ideone.com to print out the temperature equivalents of 20 C and 98.6 F
3. Write a method that accepts 3 ints as parameters and returns their average. Part of this method's signature is:
                        ... double computeAverage(int a1, int a2, int a3)
4. Use this method in ideone.com to find the average of the numbers 79, 92, and 89
5. (Challenge) write a method with signature
                public static int raiseToPower(int base, int exp)
that will compute the number base^exp.  For example, raiseToPower(5, 3) returns 125. This method will require a for loop
.

Homework 09/09/2011 - Methods

1. Working inside the class Main,
2. Write a method public static boolean isPerfectSquare(int n) that tests an int n to see if it is a perfect square and returns true / false if it is, or is not, a perfect square.
3. One way to see if n is a perfect square is to:
    a. compute double root = Math.sqrt(n)
    b .the method public static long Math.round(double d) rounds a double value to the nearest long (an extended form of an int)
    c. Use the expression (int) Math.round(root) to find the int nearest to the square root of n, and store this in the int variable intRoot
    c. see if intRoot * intRoot == n
    d. return true or false accordingly
4. In the main method inside the same class Main, test each of the ints 0, 1, 2, ...10 and for each one print a statement like
                     The integer k is a perfect square,       or else       The integer k is not a perfect square
5. Submit your code in notepad form in the teacher drop box.

Homework - 09/12/2011

1. In class we built a method public static double getRootPos(int a, int b, int c) in the Main class that returns one of the roots of the quadratic equation ax^2 + bx + c = 0.
2. Test this method in the main() method, using values of a = 1, b = -5, and c = 6, to verify that it returns the value 3.0 as a root
3. Add a new method, getRootNeg(int a, int b, int c) to your Main class,. Use this method also in the main method so you can display both roots of the original quadratic equation.
3. Modify the main method to display both roots for the quadratic equations with a, b, c = 1, -5, and 6; 1, 5, and -14; 1, 5, and 14 (this one will be a surprise. Why?); and 3, 10, and -8. In each case except the first, you should reassign values to the appropriate ones of the variables a, b, c, and the 2 double variables holding the roots of the quadratic.

4. If your home computer is a windows machine, install the java sdk on it, in folder Program Files \ java \ jdk 1.6.0, as per instructions in section 5 of ReferenceDisk.doc

5. Tomorrow: make sure you bring your flash drive, and your Java Dist disk, and a printout of the instruction sheet on the java dist disk; we will load NetBeans compiler on your flash drive

Homework - 09/16/2011

1. Read Chapter 3, sections 1 - 4. If you have not already done so, also read Chapter 2, section 1 - secton 5
2. Do exercise 11 in Chapter 2
3. Modify the Hello program we were working on in class to
   a. prompt the user for 1 more String variable
   b. Then prompt the user for 1 more int variable
   c. Print out a description and the values of the String and int variables the user provided

Homework - 09/23/2011 - Building and testing the class Point       solution


Homework - 09/27/2011 - Bonus problem set, HIGHLY RECOMMENDED - Building and testing the class Time24

Homework - 10/03/2011 - Read sections 7.3 - 7.7 in Java Methods

Homework - 10/04/2011 - Boolean Arithmetic Problems

Homework - 10/06/2011 - while loop problem and String class reading

Homework - 10/10/2011 - String method practice

Homework - 10/17/2011 - More on Strings
     1. in codingbat.com/java, section Strings 1, do
        · hasBad
        · seeColor
        Both of these require you to use str.equals()
     2. in codingbat.com/java, section Strings 2, do
        · countHi
        You should probably use indexOf(String s, int n)
     3. in Chapter 10 of the textbook, do exercises 1, 2, and 3
        · exercise 1 is related to “escape characters”
        · exercise 3 asks you to remove dashes from a SSN
        you can do this by gluing together 3 substrings, or by using indexOf("-", n) to find parts of the string to include

Homework - 10/19/2011 - More on Strings
    In codingbat.com/java section Warmup 1
    . do all the problems from notString up through startHi
    . do startOz

Homework - 10/24/2011 - Build a 4-function calculator. The two required files are the actual assignment and the framework you will use for your program.

Homework - 10/28/2011 - problems from Codingbat.com/java
     • In Warmup-1, do these problems: missingChar, front3, startHi, stringE, everyNth
     • In Arrays1, do: makeEnds, no23, start1, frontPiece
     • Challenge (in NetBeans):
       o Write a method that takes an array of Strings and returns the String you get by concatenating the items in the array
       o redo repeatSeparator to return an array of Strings

Quiz Review Topics - 10/31/2011

String methods

indexOf(String match) returns position where 1st match occurs in current String
str.indexOf(“boo”) returns the position at which “boo” first occurs in str
indexOf(String match, int n) returns position of first occurrence of match at or after position n
str.charAt(int n) returns the character at position n in str
str.substring(int start) returns the part of str beginning at position start
str.substring(int start, int end) returns the part of str beginning at start and up to but NOT including position end
concatenation: str1 + str2
converting a String representing a number into a number

Integer.valueOf(String str) converts the digit String str into an int
Double.valueOf(String str converts the String  str into the double it represents

Array stuff on quiz(1)

know what an array is
int[ ] intArray can be initialized in 2 ways

intArray = { … list of values … }
intArray = new int[10] // not on the crib sheet

accessing items in intArray: intArray[4] references the item in position 4 in intArray

HW due on 11/10/2011

by Thursday 11/10/2011 you must have completed:
At least 10 exercises from each of these sections:

Warmup 1
Strings1
Arrays1

And at least 1 of the problems in Arrays2, 2nd row


Lab for in-class work on 11/10/2011, to be finished next week
 - Creating a zoo inside the Animals project

HW due on 12/05 - Binary / Decimal conversions






**


 










**

Events Calendar

Tuesday, May 22, 2012

Upcoming Sporting Events

Questions? Contact Our Athletic Director Want to volunteer? Want to make a donation or contribution to athletics or a particular team? Want to be part of our march to excellence? Please contact Tom Donnelly at 363-8602 or send Tom an email.

Is today's game still on? Call the sports hotline @ 363-8604

View Other Sports Articles

Go To Our Sports Home Page

Upcoming Music and Fine Art Events

Marching Band season is beginning. Guard and percussion camp is the week of July 26th. Home camp is the week of August 2nd and away camp is in Ripley, WV the week of August 9th

Upcoming Guidance Events

« Click Here to go to the WHHS Calendar

Alumni Events

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed elit dolor, blandit vitae, ultricies mollis, rhoncus eget, turpis. Pellentesque ullamcorper! Aenean dignissim egestas metus. Cras molestie, turpis ut molestie commodo; nulla neque feugiat nisi, in faucibus urna lorem id urna.

Academic Events