Week 1 and 2 - Central Educational Center

advertisement
Week 1 and 2:




Intro to CS What is Computing.ppt (6 slides).
o Topics: A quick look at what are some current areas of CS now at Georgia
Tech which hopefully breaks some sterotypes of what CS is.
o I also suggest showing clips from ASIMO and the Digital Video Special
Effects Class. You could also demo a LEGO robot.
o For homework you could ask students to check how computers are used in
a field they are interested in and have them write a report on it.
Intro to Computers and Programming part 1 Intro-Prog-Mod1-part1a.ppt (13
slides)
o Topics: What is a computer? What is a program? The evolution of
programming. What is Java? Why don't we program in English?
o Have students write instructions for how to make a sandwich or play a
game like checkers. Have another group try to follow the instructions.
Point out that it is hard to completely specify things in English.
o For homework you can ask students to write instructions for another game
or how to get to a place in the school. Or you could ask them to research a
computer language (when was it created, what was it used for, who
created it, what was good about it, what was not good about it?). Some
computer languages are: FORTRAN, COBOL, PL1, LISP, Smalltalk, Perl,
Python, Ruby)
Intro to Computers and Programming part 2 Intro-Prog-Mod1-part2b.ppt (17
slides)
o Topics: Why learn to program? What are the parts of a computer? How
does a computer execute a program? How are things stored in a computer?
How much space does a text document take?
o Additional resources: games on parts of a computer
http://www.quia.com/mc/65620.html,
o Additional resources: The major parts of a computer from Intel:
http://www97.intel.com/discover/JourneyInside/TJI_Strategies_Intro/defa
ult.aspx
o Additional resources: microprocessors and the fetch, decode, execute
cycle
http://www97.intel.com/discover/JourneyInside/TJI_Strategies_Microproc
essors/default.aspx
o Slides for a student simulation and how computers boot Computer
Simulation.ppt
o Additional resource: How PC's work and parts
http://computer.howstuffworks.com/pc.htm
o Have a student translate their name into ASCII.
o For homework have students figure out how much memory a digitized
document would take (like the Bill of Rights).
Intro to Computers and Programming part 3 Intro-Prog-Mod1-part3.ppt (13
slides)
o

Topics: Binary representation of decimal numbers, 2's compliment,
number of patterns for n bits
o Additional Resources: binary numbers from Intel
http://www97.intel.com/discover/JourneyInside/TJI_Strategies_DigitalInf
o/default.aspx
o Have students translate decimal numbers into binary and add them and
translate back to decimal.
o For homework read about remote entry systems for cars. Are they safe?
What happens if your little brother or sister keeps clicking it when they are
too far from the car over 256 times?
http://auto.howstuffworks.com/remote-entry2.htm
Intro to Java and DrJava Intro-Java-Mod2-part1a.ppt (18 slides)
o Topics: Intro to DrJava, Java math and relational operators, casting,
primitive types
o Additional resources:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html
o Have students use the interactions pane to solve a calculation using Java
like their body mass index (see
http://www.cdc.gov/nccdphp/dnpa/bmi/bmi-adult-formula.htm) for how to
calculate it
Week 3:




Intro to Java: Output, Strings, Invoking Methods Intro-Java-Mod2-part2a.ppt (19
slides)
o Topics: Using System.out.println, Using Strings, Invoking object and class
methods, how to tell if a method is a class or object method, naming
conventions
o For homework Object Methods vs Class (Static) Methods.doc ask me for
answer sheet
Introduction to Turtles JavaTurtles-Mod3-part1a.ppt (16 slides)
o Topics: Computation as simulation, the history of using turtles to teach
logical thinking, how to create objects, why we need variables
o For homework what is another way to create a string object? Can you
create an object of the class Integer? Read about turtle geometry and
Seymour Papert
Intro to Turtles - continued JavaTurtles-Mod3-part2.ppt (16 slides)
o Topics: Creating objects, declaring variables, invoking methods, passing
values to methods, drawing shapes with a turtle
o For homework have them draw a 3 letter word with a turtle
Intro to Turtles - continued JavaTurtles-Mod3-part3.ppt (19 slides)
o Topics: How to change the pen width, how to change the pen color, how
to reuse a series of Java statements by creating a method, how to pull out a
parameter to make a method more reusable
o For homework try to create more turtle methods

Variables Variables-Mod4.ppt (16 slides)
o Topics: What declaring variables does. How to declare variables. How to
change the value of a variable. Practice with variables. The difference
between primitive and object variables.
o In class do memory maps of how much memory is reserved for the
different types of variables. Show the difference between primitive
variables and object variables using boxes and bags or cups and bags.
Objects can be bags and all variables are boxes or cups. Primitive
variables contain the value in the box. Object variables contain a way to
calculate the memory address of the object (or null if the variable doesn't
refer to an object yet).
o Extra Resource: http://www.javaranch.com/campfire/StoryCups.jsp and
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/variables.html
o Extra Resource: Variable Worksheet.doc e-mail me for answer sheet
o Sample Questions:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/QandE/questions_variables.htm
l
o
For homework have the students declare many different variables and
draw what the memory looks like for each one.
TEST 1
Week 4:


Intro to Media Comp and Pictures Intro-MediaComp-Pictures-Mod5.ppt (19
slides)
o Topics: What is media computation. How does our color vision work?
How do digital cameras and computer displays work? What is a pixel?
How can you create and display a picture in Java?
o In class look at the computer screen with a magnifying glass to see the
pixels. Also look at ads for digital cameras and compare them. Which has
more pixels?
o For homework see if the students can figure out how to create a Sound
object and play it.
Manipulating Pictures - part 1 ManipulatingPictures-Mod6-part1.ppt (19 slides)
o Topics: How to get information from a picture object? What is an array?
How to get color information from a pixel object? How to create and work
with a color object? How to import a class or all classes in a package?
o In class create several picture objects and get the width and height from
each. Get the array of pixels from each picture object. Get the first and last
pixel in each picture. Get the red, green, and blue values for each pixel.
o



For homework what are some other things that are like arrays of pixels?
What else can you do with a color object? What are some other classes in
the package java.awt? What are some other packages in the Java
language?
Manipulating Pictures - part 2 ManipulatingPictures-Mod6-part2b.ppt (18 slides)
o Topics: What is a 2d array? How do you get a pixel at a given x and y
location from a picture object? How do you repeat a series of Java
statements? How do you use a while loop?
o For homework add another line to the caterpillar picture using a while
loop. Also print out 40 lines with 5 stars each using
System.out.println("****"); and a while loop.
Manipulating Pictures - part 3 ManipulatingPictures-Mod6-part3b.ppt (20 slides)
o Topics: What is an algorithm? What is a program? How do you translate
an algorithm into a program? What is a comment? Using a loop to
decrease the red in a picture.
o For homework try to decrease the green or blue in a picture.
Manipulating Pictures - part 4 ManipulatingPictures-Mod6-part4.ppt (14 slides)
o Topics: How do you trace code? What was each step doing in the decrease
red method? How would you increase red? How would you remove blue
from a picture?
o For homework try to remove red or green from a picture.
Week 5:



Manipulating Pictures - part 5 ManipulatingPictures-Mod6-part5.ppt (13 slides)
o Topics: How do change more than one color in a method? What is a for
loop? How do you print values in a loop? How do you convert a while
loop into a for loop?
o For homework convert the increase red method to use a for loop.
Manipulating Pictures - part 6 ManipulatingPictures-Mod6-part6.ppt (14 slides)
o Topics: How do you change all the colors in a method? How to use a for
loop? How do you negate a picture? How do you turn a picture into
grayscale (average the colors)? How do you improve the grayscale based
on human perception?
o For homework try to find a picture that looks really cool when it is
negated.
Nested Loops NestedLoops-Mod7-part1.ppt (14 slides)
o Topics: What is a 2-d array? How do you get a pixel from a picture given
an x and y location? How do you use a nested loop? How to convert from
a single for loop to a nested loop?
o In class before you show the code for a nested loop show a 2d array and
ask students to process it (sum the elements of an array). Then ask how
they did it?
o For homework modify any method that was a single for loop to be a
nested loop.


Nested Loops NestedLoops-Mod7-part2.ppt (17 slides)
o Topics: How to do vertical and horizontal mirrors of a picture? How to
start with small examples and derive an algorithm from those? How to
translate an algorithm into code?
o In class walk through coming up with the algorithm for vertical mirror
together. Then let the students try to solve the horizontal mirror algorithm
before you give them the solution.
o For homework do right to left vertical mirroring
Nested Loops NestedLoops-Mod7-part3.ppt (13 slides)
o Topics: How to copy a picture to another picture? How to copy a picture
to a location in another picture? How to declare, initialize, and change
more than one variable in a for loop?
o In class try to have the kids figure out how to copy to a location
o For homework copy flower1.jpg to the bottom right corner of a picture
made from the 640x480.jpg file
Week 6:



Nested Loops NestedLoops-Mod7-part4.ppt (14 slides)
o Topics: How to copy part of one picture to another? What makes a good
method? How to write a general method by adding parameters? How to
change one method to call another?
o For homework try to put one person's head on another person's body
Nested Loops NestedLoops-Mod7-part5.ppt (16 slides)
o Topics: How to copy one picture to another with the first picture rotated?
How to simplify a problem? How to solve a problem by hand? How to
come up with an algorithm for solving a problem? How to test the
algorithm with another example?
o For homework try to copy one picture to another with the first picture
rotated 180 degrees.
Nested Loops NestedLoops-Mod7-part6.ppt (19 slides)
o Topics: How to scale a picture down (make it smaller)? How to scale a
picture up (make it bigger)? How to create an image collage?
o In class use colored squares to walk through the scale down and up.
o For homework try to write more general versions of scale down and up.
Also create your own collage.
TEST 2

Conditionals Conditionals-Mod8-part1.ppt (14 slides)
o Topics: How to conditionally execute a statement or block of statments?
How to remove red-eye from a picture?
o

For homework try to write a method to count the number of pixels close to
Color.WHITE (distance 10)
Conditionals Conditionals-Mod8-part2.ppt (22 slides)
o Topics: How to do a conditional with two possibilities? How to check if
more than one condition is true? How to check that at least one condition
is true? How to check that one and only one condition is true? How to
check that a condition is not true?
o Homework: Write variations on the edge detection method. Compare a
pixel to the one above it or the one to the left of it.
Week 7:





Conditionals Conditionals-Mod8-part3.ppt (16 slides)
o Topics: How to work with > 2 possibilities in a conditional? How to sepiatint a picture? How to test for values in a range? How to posterize a
picture?
o For homework try to write a general posterize method that takes as input
the number of ranges to use
Conditionals Conditionals-Mod8-part4.ppt (13 slides)
o Topics: How to swap the background of a picture? How to do chroma
key?
o For homework try to do chroma key with a picture of a student. You can
tape several posterboards together for a cheap background. Can you
modify the method to do a better job?
Drawing Drawing-Mod9-part1a.ppt (16 slides)
o Topics: How to draw lines by changing pixels? How to get the
java.awt.Graphics object from a Picture object? How to set the color for
drawing? How to draw simple shapes? How to draw a string of text?
o For homework try to draw a simple house on the picture of a beach.
Drawing Drawing-Mod9-part2.ppt (18 slides)
o Topics: How to draw arcs and rectangles using java.awt.Graphics. How to
get a java.awt.Graphics2D object from a java.awt.Graphics object. How to
draw with a java.awt.Graphics2D object.
o For homework try to draw a thick oval on a picture.
Drawing Drawing-Mod9-part3.ppt (16 slides)
o Topics: Inheritance, Classes for general scaling and rotation, using a
gradient paint, interfaces, and clipping
o Homework Clip to a triangle
Week 9:

Review and Testing
Week 10:





Intro to Sound Intro-Sound-Mod10-part1.ppt (19 slides)
o Topics: How we hear? How do we digitize sound? Why do we digitize
sound? How to create, play, and explore a sound object?
o In class attach a microphone to a computer and use the media tools to see
the sound wave. Try a higher and lower sound. Try a softer and louder
sound.
o Homework: record some sounds for use in the class
Intro to Sound Intro-Sound-Mod10-part2.ppt (14 slides)
o Topics: How to get an array of SoundSample objects from a Sound object?
How to get and set the value of a SoundSample object. How to change a
sound by changing the value of the SoundSample objects. How to use a
for-each loop (Java 5.0). How to increase and decrease the volume of a
sound using a for-each loop.
o Homework: create a new method that increases the volume by 1.5.
Intro to Sound Intro-Sound-Mod10-part3.ppt (17 slides)
o Topics: How to use a while loop? How to increase and decrease the
volume of a sound? How to trace a method? How to use a for loop? How
to modify a method to take a parameter to make it more reusable?
o Homework: Write a method to add a passed amount to each value in a
sound.
Intro to Sound Intro-Sound-Mod10-part4.ppt (15 slides)
o Topics: How to make a sound as loud as possible? How to find the largest
value in an array? How to use System.out.println to check results? How to
conditionally execute a statement or block of statements? How to force all
the values to extremes?
o Homework: Write a method to reduce the volume of positive values by
30% and increase the volume of negative values by 30%.
Processing Sound Ranges UsingSoundRanges-Mod11-part1b.ppt (14 slides)
o Topics: Processing part of a sound using a for loop. Creating a sound clip.
Returning a sound from a method. Splicing sounds together.
o For homework create a sentence by splicing 3 or more sounds together.
Week 11:


Processing Sound Ranges UsingSoundRanges-Mod11-part2.ppt (16 slides)
o Topics: Splicing sounds together to make a sentence. Reversing a sound.
Mirroring a sound. Blending two sounds.
o For homework blend three or four sounds together
Processing Sound Ranges UsingSoundRanges-Mod11-part3.ppt (15 slides)
o Topics: Creating another blend sounds methods. Method overloading.
Changing the frequency of a sound. Showing that an algorithm can apply
to many situations.
o


For homework record a sound and modify the frequency of it several
times.
Creating Sounds and MIDI CreatingSoundsAndMIDI-Mod12-part1.ppt (13
slides)
o Topics: How to create a sound given the frequency and amplitude. What is
an object method? What is a class method? Creating both a sine wave and
square wave.
o For homework try to create a triangle wave.
Creating Sounds and MIDI CreatingSoundsAndMIDI-Mod12-part2.ppt (14
slides)
o Topics: Sound formats: MP3, WAV, AIFF and MIDI. What is a constant?
What is a class constant? What is a class field? Why use a private method?
o For homework Write a method to play a simple song with part of the song
repeating.
TEST 3
Week 12 and 13:

Creating Classes CreatingClasses-Mod13-part1.ppt (17 slides)
o Topics: How to identify objects and classes. How to declare a class. How
to declare fields in a class. How every class inherits from Object. How to
override inherited methods.
o For homework identify objects and classes in different situations: going to
see a movie, a soccer game, a classroom
o Extra materials: worksheet on identifying objects and classes Objects and
Classes Worksheet.doc.

Creating Classes CreatingClasses-Mod13-part2.ppt (16 slides)
o


Topics: Creating a constructor. The default constructor that is added if you
don't have one. Adding a no-argument constructor. Overloading
constructors. How to use a debugger to trace execution.
o For homework use a debugger to trace the execution of an earlier method.
Creating Classes CreatingClasses-Mod13-part3a.ppt (16 slides)
o Topics: Adding a method to a class. Adding accessor (getters) and
modifiers (setters). Protecting the fields. Adding a main method to a class.
o For homework add a sound field to the Student class that is a recording of
the person saying their name. Add accessors and modifiers for the new
field.
Creating Classes CreatingClasses-Mod13-part4.ppt (16 slides)
o Topics: What is a comment? Why comment your classes? What are the
types of comments? How to preview the Javadoc generated HTML in
DrJava? How to create HTML using Javadoc for all classes in a directory.
What is UML and how do you use it to create a class diagram? Practice
creating a class.
o


For homework add comments to 3-4 methods that you have written in
Picture or Sound.
Creating More Classes CreatingMoreClasses-Mod14-part1.ppt (17 slides)
o Topics: How to simulate a simple number guess game? How to name a
class? How to name the fields? How to use the java.util.Random class to
generate a random number? How to import a class so that you can use the
short name?
o For homework create a Dice class that you can use to simulate the roll of
dice.
Creating More Classes CreatingMoreClasses-Mod14-part2.ppt (12 slides)
o Topics: Pulling out a common function and putting it in a method. How to
get input from a user? How to display output to a user? Writing a class
that can generate a random sentence.
o For homework write a class FortuneTeller that randomally picks a fortune
from an array of fortunes.
Week 14:

Creating More Classes CreatingMoreClasses-Mod14-part3b.ppt (19 slides)
o Topics: How to inherit from another class. The implicit call to a parent noargument constructor in a child constructor. How to explicitly call a parent
constructor in a child constructor. How to override a parent's method. How
to invoke a parent's method. Creating a ConfusedTurtle class that has
objects that turn right when asked to turn left and left when asked to turn
right. What is polymorphism.
o For homework do the worksheet on which method is called.
TEST 5


Creating and Modifying Text CreatingAndModyingText-Mod15-part1.ppt (16
slides)
o Topics: Text as unimedia. What is Unicode? The java.lang.String class.
Some String methods. Parsing a delimited string. Converting from a string
to a number.
o For homework write a message in Unicode using decimal numbers for the
characters (a is 97 in decimal and A is 65 in decimal). Or write a class
Encoder that will encode a message and print it out in unicode as comma
separated numbers. You can also write a class Decoder that will decode
the message in decimal back into in string. For the normal alphabet the
decimal numbers match ASCII. See http://www.lookuptables.com/ ASCII
codes in decimal.
Creating and Modifying Text CreatingAndModyingText-Mod15-part2.ppt (20
slides)
o


Topics: what is a file? What is the full path for a file? What is an
exception? How to handle exceptions? How to read from a textual file?
o For homework add a constructor to ClassPeriod that takes a delimited
string.
Creating and Modifying Text CreatingAndModyingText-Mod15-part3.ppt (17
slides)
o Topics: What is a dynamic array (ArrayList)? What is a List? What is an
interface? How to implement an interface. Using casting or generics with
collections.
o For homework add a compareTo method to ClassPeriod. First compare the
teacher name and if 0 also compare the period number.
Creating and Modifying Text CreatingAndModyingText-Mod15-part4.ppt (20
slides)
o Topics: How to write to a file. How to force a new line in the output. How
to write a method to generate a form letter. How to write a method that
will modify the source code of a program.
o For homework write a method that takes a file name and reads a delimited
string from a file one row at a time and creates the form letter for that
information.
Week 15






Text for the Web TextForTheWebMod16-part1.ppt (13 slides)
o Topics: What is HTML? What are the basic tags of HTML? How to insert
an image. How to insert a hyperlink. How to insert a table. How to specify
colors using Hexadecimal.
o For homework create an HTML page with an image, a hyperlink, a table,
an ordered list, an unordered list, and some color.
Text for the Web TextForTheWebMod16-part2.ppt (16 slides)
o Topics: Writing a Java program that writes HTML. Breaking a method
into smaller, helper methods. Creating an HTML page from information in
a directory.
Text for the Web TextForTheWebMod16-part3.ppt (16 slides)
o Topics: Reading data from the Web and using it on another Web page.
What is a database and why are they used?
Text for the Web TextForTheWebMod16-part4.ppt (21 slides)
o Topics: Using Maps. The classes that implement Map. Using iterators.
Using generics.
Text for the Web TextForTheWebMod16-part5.ppt (22 slides)
o Topics: How to get data from a database. How to load the driver. How to
create a connection. How to create a statement. How to execute a
statement and get a result set. How to process a result set. How to close
connections, statements, and result sets.
Text for the Web TextForTheWebMod16-part6.ppt (11 slides)
o
Topics: How to do a join. How to modify the homepage based on
information from a database.
TEST 6
Week 16




Movies Movies-Mod17-part1a.ppt (16 slides)
o Topics: Movies are a series of frames. The frames rate is the number of
frames shown in one second. You need at least 16 frames per second (fps)
to give the illusion of continuous motion. Movies take up lots of space.
Movies are stored in a compressed format. You can do frame-based
animation by drawing a geometric object at different locations over time
on a seris of pictures.
Movies Movies-Mod17-part2.ppt (13 slides)
o Topics: How to create a tickertape movie of text moving. How to move
more than one object in a movie.
Movies Movies-Mod17-part3.ppt (16 slides)
o Topics: How to move an image in a movie by copying it to a different
location in each frame. How to fake a sunset by changing the amount of
green and blue in each frame. How to reuse methods. How to make
methods more reusable by adding parameters.
Movies Movies-Mod17-part4.ppt (16 slides)
o Topics: How to do movie special effects like fade a person out of a scene.
How to add something to a movie by generating the frames from the
movie and then modifying the frames.
Week 17





Movies Movies-Mod17-part5.ppt (20 slides)
o Topics: Replacing the background in a movie using chromkey. Fixing a
movie by doing color correction.
Speed Speed-Mod18-part1.ppt (16 slides)
o Topics: Machine Language, Assembler Language, Compilers and
Interpreters, History of Assembler Language and Compilers
Speed Speed-Mod18-part2.ppt (15 slides)
o Topics: Creating a graphical language interpreter, understanding what it
does, adding to it, and thinking about which is faster (interpreting
commands or just executing the commands).
Speed Speed-Mod18-part3.ppt (15 slides)
o Topics: Creating a graphical language compiler, understanding what it
does, adding to it, and understanding that executing compiled code is
faster than interpreting code.
Speed Speed-Mod18-part4.ppt (17 slides)
o
Topics: What happens when Java source code is compiled and executed?
Why use a virtual machine? What is an algorithm? How do you compare
algorithms? What is Big-Oh notation?
Week 18:
 Review and Testing
Download