Change Contents of the Bubble
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Homeworks-Spring 2007

All homework are due by 7 pm EDT on the due date! Homework Policy

PLEASE REVIEW: Collaboration Policy

HW1: Implement two new image methods in Picture


DUE DATE: Monday Jan. 22

Write two new methods in the class Picture that implement some kind of image manipulation.The two methods can not be the same. You must use a for loop in one method and a while loop in the other! The picture that gets manipulated should be the target that receives the method (i.e., this). For example, if you implement the method "mytweak()", then you'll use it on some picture somePicture.mytweak(), and you'll expect the picture somePicture to change. (Don't bother returning a DIFFERENT picture for this method.)


What manipulation that gets implemented is entirely up to you: Increasing blue while decreasing red, flipping vertically, posterizing, etc. You must implement something NOT already implemented in the class Picture. You can use the methods that are there as examples, but do not make any calls to those existing methods to implement your new methods.

Turn in Picture.java file via WebCT. Name your methods something that makes sense for what it does and place those names in the top comments region of the Picture.java class definition. Place your methods at the bottom of the class definition, with a comment before it indicating what your method does.

The TA grading this homework will compile your Picture.java file in DrJava and test it using the Interactions pane. They will create an instance of a Picture, execute each of your defined methods on that Picture object and show() the results.

Did you make an interesting picture with your first methods? Please consider sharing it in the Gallery HW1: First picture method-Spring07

Ask Questions on HW1-Spring07 here.



HW2: Create a Picture collage


DUE DATE: Friday Jan. 26

Implement a class with a static public void main() method that, when executed, creates and shows a collage of pictures. You need to have one picture appear four times: The original time, then three other times with some image manipulation. You're welcome to add additional pictures if you'd like.

The whole collage should be mirrored in some direction – i.e., should be symmetric horizonatlly or vertically. However you may NOT use any of the mirror methods in Picture. You have to place elements such that everything gets mirrored appropriately.

Hint: If you use two turtles, and move/drop everything the same with the two turtles, but mirrored, a symmetric picture will result.

You must use a Turtle to do some of your drawing!!

Your method must use FileChooser.getMediaPath() to access pictures.

For +5 Extra Credit: Create your collage with diagonal symmetry

Turn in your PictureCollage.java file, any additional pictures that you add to your media folder to create your collage, and your Picture.java file if you end up adding any additional methods to it. Turn in via WebCT.

Comments are important here! Please include comments at the top of your class definition:
  1. With your name, GT-email address
  2. Explaining what you're doing – help your TA figure out what's going on!

Please consider sharing your collage on the Gallery HW2: Picture collage-Spring07

Ask Questions on HW2-Spring07 here.


HW3: Create a dance, complete with music


DUE DATE: Monday Feb. 5

Using Sampled Sounds and the Turtles, create a musical dance. Play music (sounds at least?) while the turtles move in patterns.

Implement your dance and sounds in a TurtleDance class in a main method.

Turn in your TurtleDance Java file via WebCT. Comments are important here! Include comments with:
  1. Your name and GT-email address
  2. Explaining what you're doing – help your TA figure out what's going on!

EXTRA CREDIT: Use MIDI (JMusic) rather than sampled sounds for an additional 5 points extra credit. Look up the Play object in the JMusic docs. Play.midi(score,false) will play a score in the background (false keeps it from quitting Java after playing). Play.waitcycle(score) will block (wait) anything else from happening until the score is done playing – essentially, letting you block like blockingPlay.

Please consider sharing your song and dance in the Gallery HW3: Turtle Dance-Spring07.

Ask Questions on HW3-Spring07 here.


HW4: Use Weaving and Repeating to Create Music


DUE DATE: Friday Feb. 16

Using the methods developed in class to play with linked list of music, create a song.

You only have to use SongNode and have a single part with a single instrument. It does not need to autoplay!

You will create a class (with some cunning name like MyWovenSong) with a main that will assemble your song, then open it with showFromMeOn (or show–whatever you need to do open up the notation View on your masterpiece). Please put comments in your class:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

Please consider sharing your song (by saving out the MIDI) in the Gallery HW4: Woven Music-Spring07

Ask Questions on HW4-Spring07 here.

HW5: New Picture REMOVEDst Manipulations


DUE DATE: Wed Feb. 28

Using any of the linked lists of pictures that we created (where ordering represented linearity, or layering, or using turtles to walk the list), implement three additional methods (where firstpicturnodeinlist is a node, not actually a picture):

Note: oldelement or findelement will never be equal to the firstnodeinlist


You must also provide a class named PictureTest that has a main() method which utilizes all three of your new methods. When the grader executes the main(), it should (a) show a background with three or more pictures in it, (b) then show a new picture after using findAndReplaceRepeat, and (c) a third picture after using replaceWithModification, then (d) a final fourth picture after using replaceWithModifications.

Please put comments in your class before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing:

Turn in to WebCT:

Ask Questions on HW5-Spring07 here.


HW6: Create an animation with sound effects


DUE DATE: Monday March 12 Wednesday March 14

You must write HW6 using Pair Programming. Announce your pair at Pairs Page-Spring 2007. Not working in a pair is a 10% score penalty (i.e., you lose one letter grade from the start.) Be sure to fill out pairProgrammersAgreement.pdf form and turn it in to your grading TA by Monday March 12.

Note: This is a big program. Don't leave it for the last minute!

Create an animation with sounds associated with frames.
THERE MUST BE AT LEAST 20 FRAMES IN YOUR ANIMATION.

Here's how you need to do it:

You can use and modify any of the data structures that we've described in class. You can create new data structures if you'd like.

You will also need to create a class (call it AnimationRunner). Your TA will create an instance of this class (AnimationRunner ar = new AnimationRunner()).

From here on, there are SEVERAL ways to handle the animation.
Here's one:

For 5 points extra credit, use both Sound play() and blockingPlay() in your animation play() – but NOTE that you still can't CREATE any new sounds in your animation play() method. All the sounds still have to be in some kind of linked list data structure before you get started.
We also offer up to 10 points extra credit for the animation which goes beyond our expectation.
Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Turn in to WebCT:

Consider posting your movie at Gallery HW6: Animation with sound-Spring07.

Ask Questions on HW6-Spring07 here.

HW7: Build a Graphical User Interface (GUI) for creating a MIDI file


DUE DATE: Friday Mar. 30

You must write HW7 using Pair Programming. Announce your pair at Pairs Page-Spring 2007. Not working in a pair is a 20% score penalty (i.e., you lose two letter grades from the start.) Be sure to fill out pairProgrammersAgreement.pdf form and turn it in to your grading TA by Monday April 2.

Build a class named MidiTool that will create a graphical user interface (GUI).

This GUI will have a string input area where the user can type in a sequence of letters. The letters will define a MIDI sequence. Only the letters c,d,e,f,g,a, and b are allowed, presumed all in the third octave. Lowercase is an eighth note, uppercase is a quarter note. So cEdEgC would be c3 eighth, e3 quarter, d3 eighth, e3 quarter, g3 eighth, c3 quarter.

There should also be buttons:


Extra Credit 5 pts: Create a SaveSequence button that saves the sequence into a MIDI file.

Please put comments in your classes and before each of the methods that you create:
  1. With your name and your partner's name, GT-email addresses
  2. Explaining what you're doing

Turn in to WebCT: (Only one of you need to submit HW, but don't forget to put your partner's name and GT-email address in your comment.)

Last time, people wanted to show off their cool tools. Feel free to take a picture of your tool and share it here: Gallery HW7: MIDI Tool-Spring07

Ask Questions on HW7-Spring07 here.

HW8: Simulate a Pandemic and its Response


DUE DATE: Friday Apr. 20

You must write HW8 using Pair Programming. Announce your pair at Pairs Page-Spring 2007. Not working in a pair is a 30% score penalty (i.e., you lose three letter grades from the start.) Be sure to fill out pairProgrammersAgreement.pdf form and turn it in to your grading TA by Monday April 23.

Using the Simulation Package, enhance the disease simulation. It's a much more fiendish disease now.


Students are to implement these rules and to note the average number of people infected (normal size world, start with 100 people and one infected) and the average number dead over three runs.

The goal is then increase the number that survive and decrease the number of infected. Students are to implement TWO of the below public health policies. They are to implement one of the policies, try out three runs and compute the average infected and dead, then implement the second policy and compute the average infected and dead. The students are to produce a Word document with graphs of the number of healthy, infected, and dead people for each of the 100 (Updated from 30 days, you'll get better analysis if you do 100 days) days of each run. The Word document should have 3 graphs for the original rules, then 3 graphs after the first policy implementation and a description of what happened (including average counts of diseased and dead) and why, then 3 graphs after both policies are implemented with a description of what happened
with counts and why.

POLICIES:

Turn in to WebCT:

CHANGE TO ASSIGNMENT

Please run your simulation for 100 time steps, not just 50. From the runs that I'm seeing, 50 time steps is too early in the simulation, and there seems to be a critical mass a little after 50. You are welcome to change Simulation run() that lets you run for 100.

BTW, please count the number of LIVE infected, not dead infected, in your "infected" count. Mark Guzdial

Should you be working for a disease management center? Show off your graphs: Gallery HW8: Simulate a Pandemic and its Response-Spring07

Ask Questions on HW8-Spring07 here.

HW9: Extra Credit


DUE DATE: Wednesday Apr. 25

HW9 is an individual assignment, but it is dependent on a working HW8. You will once again be using the Simulation Package and your enhanced disease simulation.

Students are to take their completed HW8 and replace the turtle with character images. There must be:

This homework will be worth 1-3% on your final grade–it will be graded out of 100, then added in to your overall homework grade.

You may use any of the sprites offered in cs1316 here

Please put comments in your classes and before each of the methods that you create:
  1. With your name, GT-email address
  2. Explaining what you're doing

Did you make an interesting picture with your first methods? How about a whole movie? Please consider sharing it in the Gallery HW9: Extra Credit-Spring07

Turn in to WebCT:

Ask Questions on Questions on Extra Credit HW9-Spring07 here. (This will not be for help, only clarification since it is an extra credit homework)

Links to this Page