Suggested Syllabus for Media Comp in Java
This syllabus is for a introductory computing and programming course. Since teachers have different length classes (some are block and some are regular so I will put this about 30-60 min modules). You certainly don't have to follow this approach but can customize it for your class.
For a zip file of all the slides see http://coweb.cc.gatech.edu/mediaComp-plan/101.
I have added topics for each set of slides so if you are looking for something in particular do a search for the topic on this page.
You have my permission to use and modify these slides. Please keep my name on as original author.
Barb Ericson ericson (at) cc.gatech.edu
- Intro to CS What is Computing.ppt (6 slides).
- 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.
- I also suggest showing clips from ASIMO and the Digital Video Special Effects Class. You could also demo a LEGO robot.
- 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)
- Topics: What is a computer? What is a program? The evolution of programming. What is Java? Why don't we program in English?
- 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.
- 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)
- Intro to Computers and Programming part 3 Intro-Prog-Mod1-part3.ppt (13 slides)
- Intro to Java and DrJava Intro-Java-Mod2-part1a.ppt (18 slides)
- Intro to Java: Output, Strings, Invoking Methods Intro-Java-Mod2-part2a.ppt (19 slides)
- 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
- For homework Object Methods vs Class (Static) Methods.doc ask me for answer sheet
- Introduction to Turtles JavaTurtles-Mod3-part1a.ppt (16 slides)
- Topics: Computation as simulation, the history of using turtles to teach logical thinking, how to create objects, why we need variables
- 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)
- Topics: Creating objects, declaring variables, invoking methods, passing values to methods, drawing shapes with a turtle
- For homework have them draw a 3 letter word with a turtle
- Intro to Turtles - continued JavaTurtles-Mod3-part3.ppt (19 slides)
- 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
- For homework try to create more turtle methods
- Variables Variables-Mod4.ppt (16 slides)
- 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.
- 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).
- Extra Resource: http://www.javaranch.com/campfire/StoryCups.jsp and http://java.sun.com/docs/books/tutorial/java/nutsandbolts/variables.html
- Extra Resource: Variable Worksheet.doc e-mail me for answer sheet
- Sample Questions:
- For homework have the students declare many different variables and draw what the memory looks like for each one.
- Intro to Media Comp and Pictures Intro-MediaComp-Pictures-Mod5.ppt (19 slides)
- 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?
- 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?
- 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)
- 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?
- 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.
- 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)
- 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?
- 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)
- 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.
- For homework try to decrease the green or blue in a picture.
- Manipulating Pictures - part 4 ManipulatingPictures-Mod6-part4.ppt (14 slides)
- 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?
- For homework try to remove red or green from a picture.
- Manipulating Pictures - part 5 ManipulatingPictures-Mod6-part5.ppt (13 slides)
- 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?
- For homework convert the increase red method to use a for loop.
- Manipulating Pictures - part 6 ManipulatingPictures-Mod6-part6.ppt (14 slides)
- 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?
- For homework try to find a picture that looks really cool when it is negated.
- Nested Loops NestedLoops-Mod7-part1.ppt (14 slides)
- 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?
- 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?
- For homework modify any method that was a single for loop to be a nested loop.
- Nested Loops NestedLoops-Mod7-part2.ppt (17 slides)
- 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?
- 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.
- For homework do right to left vertical mirroring
- Nested Loops NestedLoops-Mod7-part3.ppt (13 slides)
- 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?
- In class try to have the kids figure out how to copy to a location
- For homework copy flower1.jpg to the bottom right corner of a picture made from the 640x480.jpg file
- Nested Loops NestedLoops-Mod7-part4.ppt (14 slides)
- 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?
- For homework try to put one person's head on another person's body
- Nested Loops NestedLoops-Mod7-part5.ppt (16 slides)
- 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?
- For homework try to copy one picture to another with the first picture rotated 180 degrees.
- Nested Loops NestedLoops-Mod7-part6.ppt (19 slides)
- 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?
- In class use colored squares to walk through the scale down and up.
- For homework try to write more general versions of scale down and up. Also create your own collage.
- Conditionals Conditionals-Mod8-part1.ppt (14 slides)
- Topics: How to conditionally execute a statement or block of statments? How to remove red-eye from a picture?
- 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)
- 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?
- Homework: Write variations on the edge detection method. Compare a pixel to the one above it or the one to the left of it.
- Conditionals Conditionals-Mod8-part3.ppt (16 slides)
- Topics: How to work with > 2 possibilities in a conditional? How to sepia-tint a picture? How to test for values in a range? How to posterize a picture?
- 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)
- Topics: How to swap the background of a picture? How to do chroma key?
- 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)
- 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?
- For homework try to draw a simple house on the picture of a beach.
- Drawing Drawing-Mod9-part2.ppt (18 slides)
- 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.
- For homework try to draw a thick oval on a picture.
- Drawing Drawing-Mod9-part3.ppt (16 slides)
- Topics: Inheritance, Classes for general scaling and rotation, using a gradient paint, interfaces, and clipping
- Homework Clip to a triangle
- Intro to Sound Intro-Sound-Mod10-part1.ppt (19 slides)
- Topics: How we hear? How do we digitize sound? Why do we digitize sound? How to create, play, and explore a sound object?
- 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.
- Homework: record some sounds for use in the class
- Intro to Sound Intro-Sound-Mod10-part2.ppt (14 slides)
- 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.
- Homework: create a new method that increases the volume by 1.5.
- Intro to Sound Intro-Sound-Mod10-part3.ppt (17 slides)
- 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?
- 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)
- 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?
- 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)
- Topics: Processing part of a sound using a for loop. Creating a sound clip. Returning a sound from a method. Splicing sounds together.
- For homework create a sentence by splicing 3 or more sounds together.
for answer sheet.
- Processing Sound Ranges UsingSoundRanges-Mod11-part2.ppt (16 slides)
- Topics: Splicing sounds together to make a sentence. Reversing a sound. Mirroring a sound. Blending two sounds.
- For homework blend three or four sounds together
- Processing Sound Ranges UsingSoundRanges-Mod11-part3.ppt (15 slides)
- Topics: Creating another blend sounds methods. Method overloading. Changing the frequency of a sound. Showing that an algorithm can apply to many situations.
- For homework record a sound and modify the frequency of it several times.
- Creating Sounds and MIDI CreatingSoundsAndMIDI-Mod12-part1.ppt (13 slides)
- 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.
- For homework try to create a triangle wave.
- Creating Sounds and MIDI CreatingSoundsAndMIDI-Mod12-part2.ppt (14 slides)
- 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?
- For homework Write a method to play a simple song with part of the song repeating.
- Creating Classes CreatingClasses-Mod13-part1.ppt (17 slides)
- 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.
- For homework identify objects and classes in different situations: going to see a movie, a soccer game, a classroom
- Extra materials: worksheet on identifying objects and classes Objects and Classes Worksheet.doc. E-mail me
- Creating Classes CreatingClasses-Mod13-part2.ppt (16 slides)
- 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.
- For homework use a debugger to trace the execution of an earlier method.
- Creating Classes CreatingClasses-Mod13-part3a.ppt (16 slides)
- Topics: Adding a method to a class. Adding accessor (getters) and modifiers (setters). Protecting the fields. Adding a main method to a class.
- 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)
- 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.
- 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)
- 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?
- 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)
- 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.
- For homework write a class FortuneTeller that randomally picks a fortune from an array of fortunes.
- Creating More Classes CreatingMoreClasses-Mod14-part3b.ppt (19 slides)
- Topics: How to inherit from another class. The implicit call to a parent no-argument 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.
- For homework do the worksheet on which method is called.
- Creating and Modifying Text CreatingAndModyingText-Mod15-part1.ppt (16 slides)
- 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.
- 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)
- 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?
- For homework add a constructor to ClassPeriod that takes a delimited string.
- Creating and Modifying Text CreatingAndModyingText-Mod15-part3.ppt (17 slides)
- 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.
- 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)
- 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.
- 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.
- Text for the Web TextForTheWebMod16-part1.ppt (13 slides)
- 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.
- 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)
- 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)
- 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)
- Topics: Using Maps. The classes that implement Map. Using iterators. Using generics.
- Text for the Web TextForTheWebMod16-part5.ppt (22 slides)
- 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)
- Topics: How to do a join. How to modify the homepage based on information from a database.
- Movies Movies-Mod17-part1a.ppt (16 slides)
- 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)
- 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)
- 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)
- 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.
- Movies Movies-Mod17-part5.ppt (20 slides)
- Topics: Replacing the background in a movie using chromkey. Fixing a movie by doing color correction.
- Speed Speed-Mod18-part1.ppt (16 slides)
- Topics: Machine Language, Assembler Language, Compilers and Interpreters, History of Assembler Language and Compilers
- Speed Speed-Mod18-part2.ppt (15 slides)
- 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)
- 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)
- 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?
- Speed Speed-Mod18-part5.ppt (12 slides)
- Topics: Searching for an item in a collection. What is a linear search? What is a binary search? Understanding how a binary search works. What is best-case, worst-case, and average-case execution time?
- Speed Speed-Mod18-part6.ppt (13 slides)
- Topics: Categories of algorithms: Class P, Intractable, Class NP. Algorithms that can't be written (halting problem). How to compare computer advertisements. What slows down a computer?
Additional Topics (some for Advanced Placement Computer Science):
- Recursion Recursion.ppt
- Topics: defintion of recursion, using Turtles to draw a tree, breaking a triangle up into smaller triangles
- Abstract classes and polymorphism with comic strips. ComicStripExample-part1.ppt ComicStripExample-part2.ppt
- Topics: Analysis and design, inheritance, abstract classes, polymorphism
- Alternative introduction to creating classes using a slideshow CreatingClasses-SlideShow-Mod13-part1.ppt CreatingClasses-SlideShow-Mod13-part2.ppt CreatingClasses-SlideShow-Mod13-part3.ppt CreatingClasses-SlideShow-Mod13-part4.ppt
- Topics: Declaring classes, inheritance, overriding toString, constructors, fields, methods, accessors, modifiers, main method
- Data structures AP-DataStructures.ppt
- Topics: All the A and AB data structures (arrays, lists, sets, maps, trees, stacks, queues)
- Sorting SortingBigOh.ppt (20 slides) ArraySorter.java
- Selection sort, insertions sort, mergesort, quicksort, Big Oh
- AP Case Study AP-CaseStudy-Overview.ppt Extending the Case Study.ppt
- Case study and extending the case study (interfaces, inheritance, abstract classes)
- New things in Java 5.0 (1.5) What'sNewInJava5.ppt
Link to this Page