Mr. Rogers AP Computer Science  - Orientation

In order to get AP Computer Science students up to speed quickly, Mr. Rogers typically holds one or more three-hour-long orientation sessions in the summer before formal classes start . To stay informed about the date of the orientation, e-mail Mr. Rogers at tkrogers@greenvill.k12.sc.us.

 

Introduction - View Mr. Rogers AP Computer Science Syllabus

  1. Set up the Java platform JDK 7 and the BlueJ integrated development environment (IDE).
  2. Create projects in the BlueJ IDE and Use console output (System.out.println)

Programming Assignment 1: Using the BluJ IDE, write a program that outputs "Hello World" to the screen.

 

  1. Define the term debugging. Debugging is the process of correcting the compiling, run-time, and logic errors in a program so that it performs as desired.
  2. Define compiling error and describe a way to cause one. While compiling errors give error messages, be aware that the messages can be very misleading. Do not depend on them.

Deliberately delete a ";" from the above program and note the error message. Deliberately alter other elements of the program to see what happens

  1. Define encapsulation and information hiding.

 

  1. Define run-time error and describe a way to cause one. The program compiles but does not run. Usually gives an error message. This is called throwing an exception.

Programming Assignment 2: Write a program that inputs (your name) and (your age) on the command line and outputs "Hello (your name) you are (your age) years old".

Deliberately cause a run time error in  the above program and note what happens.

  1. Define the term iteration and describe a way to repeat one (loops such as the "for loop") An iteration is a set of steps or actions that are repeated.

example: in pounding a nail, each time the nail is struck by the hammer is one iteration.

Programming Assignment 3: Modify Programming Assignment 2 with a "for loop" so that the message repeats itself 10 times. once the program is running, modify it so that it has an infinite loop and see what happens when you run it.

Sample code:

for (int x = 0; x < 10; x ++) {

    // Lines of code

}

  1. Define logic error and describe a way to cause one. The program compiles and runs but does not run correctly. This is the worst type of problem because it gives no error messages or exceptions.
  2. Be aware that while a program can branch to a different part of the code or go round-and-round in a loop, it otherwise executes sequentially from the top to the bottom for a given method.
  1. Describe one of the key strategies in the creation of complex software: functional decomposition (breaking down an overwhelmingly complex task into smaller doable tasks). Note: Creating a a software project of even a few hundred lines of code rapidly becomes complex if not overwhelming. The key to success is to take baby steps.

View the Personal Software Project Specs: All of Mr. Rogers AP Computer Science students will be required to do a personal software project starting in the 3rd quarter and due in the 4th quarter. The specifications and other helpful information can be found here. The hardest part for many students is selecting a subject--hint: start looking for a suitable one today!

View and Explore NetLogo: Download the NetLogo IDE and you'll have access to several hundred simulation programs (in the IDE under files>models library). these are a great starting point for selecting a topic for your personal software project.

 

  1. Be aware that  AP Computer science test contains a case study called GridWorld.

Mastery of the case study often means the difference between a 4 and 5 ( 3 is considered passing, 5 is the highest possible grade) on the AP Exam. Start early and give it priority!

Programming Assignment 8: Set up a project called BoomDemo with a single class called BoomDemo and insert the code shown here. Run the code then modify it as follows:

  1. Change the speed of the dots as they explode apart. (Note: the numbers cannot be higher than 255.)
  2. By modifying the code, determine the meaning of the 3 numbers used for representing new colors.
  3. Change the dot color to yellow (hint: yellow is made of blue and green).
  4. Add 3 new sets of dots, a pair that explodes vertically, a pair that explodes horizontally, and a pair that explodes along the opposite diagonal from the existing pair of dots.
  5. Google java 6 graphics, select the 1st link, and choose a different shape for the dots.
  6. Do something of your own choosing to modify the program to your liking.