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

Homeworks-Summer 2007

PLEASE REVIEW: Collaboration Policy, Homework Policy-Summer07


Homework 1: Implement two new image methods in Picture [Questions] [Gallery]
Homework 2: Create a Picture collage [Questions] [Gallery]
Homework 3 and 4: Create a dance, complete with music [Questions] [Gallery]
Homework 5: New Picture REMOVEDst Manipulations [Questions]
Homework 6: Create an animation with sound effects [Questions] [Gallery]
Homework 7: Turtle Etch-a-sketch Graphical User Interface (GUI) [Questions] [Gallery]
Homework 8: Zombie Attack Simulation [Questions] [Gallery]
Homework 9: Animating Zombie Attack Simulation (Extra Credit Assignment) [Questions] [Gallery]

HW1: Implement two new image methods in Picture

DUE DATE: Monday May 21, 2007

Back to the top

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. In other words, we expect both of your methods to be void methods.)

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 file via email to your TA. Name your methods something that makes sense for what it does and place those names in the top comments region of the 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 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-Summer07

Ask Questions on HW1-Summer07 here.

Back to the top

HW2: Create a Picture collage

DUE DATE: Friday May 25, 2007

Back to the top

Create a class with a public static void main(String[]args) 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 are welcome to add additional pictures.

The whole collage should be mirrored in some direction so that it will be, for example, symmetric horizontally or vertically. However you may NOT use any of the mirror methods in You have to place elements so that everything gets mirrored appropriately. We require you to use Turtle to do at least some of your drawing.

Hint: If you use two turtles to move and drop everything, a mirrored, symmetric picture will result.

You should include comments at the top of your class definition as well as throughout your public static void main(String[]args) method explaining what your code is doing or what your code should be doing.

Your method must use FileChooser.getMediaPath() to access pictures. Do not include FileChooser.setMediaPath() with your submitted code or you will get points off!

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


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

Ask Questions on HW2-Summer07 here.

Back to the top

HW3 and HW4: Create a dance, complete with music

DUE DATE: Monday, June 11th

Back to the top

Using SongNodes and the Turtles, create a musical dance. Play music while the Turtles move in patterns.

I recommend using the a modified version of that I have written specific to this homework. You can review the java doc. Basically I added a method playFromMeOn that will play your music automatically and does not use the note viewer. I also added a method blockingPlayFromMeOn that works like blockingPlay from Sound

You must implement your dance and music in a TurtleDance class in a main method.

Please remember to include your name and Prism ID (i.e. gtx###x or jsmith#) in your comments as well as explain what you want your code to be doing.



EXTRA CREDIT: You are still required to do all of the basic requirements for the assignment, but you can implement one of the following special dances for extra credit:

Dance Off (+5points)
A rival gang of Turtles has challenged your gang of Turtles to a dance off. Each gang of Turtles take turns doing a dance in unison. On each turn the current gang of Turtles must repeat what the other gang did previously as well as add on new moves. There must be at least 2 turns meaning that each gang must go at least 2 times.

Turtle Waltz (+5points)
Several Turtle couples have decided to do the waltz. For each couple, the partners must face each other and move together with the music. You must have at least 3 Turtle couples and an appropriate background (something like a ballroom); this means that you must have the Turtles dance on a Picture.

Turtle Concert (+5points)
Intersperse music Sounds with spoken word Sounds to create a soundtrack for the concert. Choose one from the following dances:
1. Superstar and Backup Dancers - A Turtle superstar is performing his/her latest song. Have at least 5 backup dancers while the Turtle superstar is singing his/her song. Remember the backup dancers’ dance is usually more elaborate than the superstar’s.
2. Boy Band - Each member of the boy band take turns stepping in front to do a part of the vocals (and perhaps his own dance) while the others dance in unison.
3. Superstar, Backup Dancers, and Audience – The concept is basically just like Superstar and Backup Dancers, but instead you must have some Turtles in the audience that will also occasionally move, but how and when they move is really up to you.

Got another idea for extra credit? Get approval from any TA by midnight on Wednesday May 30, 2007. Be sure to include the name of the TA that approved your idea and explain the idea in the comments of your file.

Example Drawing of Resultant REMOVEDst Structure

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

Ask Questions on HW3-Summer07 here.

Back to the top

HW5: New Picture REMOVEDst Manipulations

DUE DATE: Monday, June 18

Back to the top

For this homework, you must implement three additional methods in PositionedSceneElement

You must also provide a class named PictureTest that has a public static void main(String[]args) method which utilizes all three of your new methods. When your TA executes the main method, it should (a) show a background with four or more pictures in it, (b) then show a new picture after using moveAllOccurrencesToTheEnd, and (c) a third picture after using then addNTimesAfterNthElement(d) a final fourth picture after using doARandomPictureManipulation(). Your TA might also test your methods with his or her own so remember to handle all possible cases.



Ask Questions on HW5-Summer07 here.

Back to the top

HW6: Create an animation with sound effects

DUE DATE: June 25

Back to the top

You must write HW6 using Pair Programming. Announce your pair on the Student704. 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 or CS1316 Pair-Programming Agreement.pdf form and turn it in to any TA or the professor. The last day to turn it in is Wednesday June 20. YOU ONLY NEED TO TURN IN ONE PER GROUP. ONLY ONE IS NECESSARY FOR HOMEWORK 6, 7 AND 8 (Not one for each assignment). YOU ONLY NEED TO TURN IN A NEW ONE (AFTER THE FIRST ONE) IF YOU SWITCH PARTNERS.

You need to:

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 is one:

Please put comments in your classes and before each of the methods that you create:
  1. With your name, Prism ID (gtx000x, jsmith0)
  2. Explaining what you're doing



As always, you can get up 5 points extra credit if your code impresses your TA

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

Ask Questions on HW6-Summer07 here.

Back to the top

HW7: Turtle Etch-a-sketch Graphical User Interface (GUI)

DUE DATE: Tuesday July 3 at 11:45pm with grace until Wednesday July 4 at 7:00am

Back to the top

You must write HW7 using Pair Programming. Not working in a pair is a 20% score penalty (i.e., you lose two letter grades from the start.) YOU ONLY NEED TO TURN IN A NEW ONE PAIR PROGRAMMING AGREEMENT IF YOU SWITCH PARTNERS.

Write a class TurtleEtchASketch that will create a version of the classic etch-a-sketch using a Turtle and present it visually using a GUI. You will need to have a Turtle draw on a Picture canvas and use directional buttons to control the movements of the Turtle.

Components you need to include:
The final design and location of each of these components is ultimately up to you and your partner.

Extra Credit +5pts: In addition to using the directional buttons to move the Turtles, also use a KeyREMOVEDstener to listen for keyboard input up, down, left and right arrow keys. Check out the Java tutorial on how to write a key listener
TA Discretionary Extra Credit +1-5pts: For creativity.

You are welcome to use these arrows, but you are also welcome to find your own:
upArrow.gif downArrow.gif leftArrow.gif rightArrow.gif



Consider posting a picture of your etch-a-sketch at Gallery HW7: Turtle Etch-a-sketch-Summer07.

Ask Questions on HW7-Summer07 here.

Back to the top

HW8: Zombie Attack Simulation

DUE DATE: Saturday July 21 11:45pm with grace until Sunday July 22 7:00am

Back to the top

You must write HW8 using Pair Programming. Not working in a pair will result in automatic 30% score penalty.

Using the provided Simulation Package (Simulation, Agents, etc), write a new class ZombieAttackSimulation that extends Simulation and modify the PersonAgent class and implement the following:
You and your partner must implement these rules and note the number of zombies and the number of surviving people. Start with 99 people and 1 zombie. Run the simulation for 100 timesteps and record the number of zombies and the number of surviving people. Do this for a total of 3 runs and average your numbers (You will have 4 datasets: 1st run, 2nd run, 3rd run, and average).

The goal is then increase the number of people that survive and decrease the number of zombies. You and your partner must implement TWO of the below special tactical maneuvers. You and your partner should implement one of the maneuvers, try out three runs and compute the average number of people and zombies. Then you must implement a second maneuver on top of the other one. You and your partner must then produce a Word document with graphs of the number of the normal people and zombies for each of the 100 timesteps of each run.

The Word document should have:


Extra Credit +10pts: TA discretionary extra credit



Do you have what it takes to survive a zombie attack? Show off your graphs: Gallery HW8: Zombie Attack Simulation-Summer07

Ask Questions on Questions on HW8-Summer07 here.

Back to the top

HW9: Animating Zombie Attack Simulation (Extra Credit Assignment)

DUE DATE: Thursday July 26 11:45pm with grace until Friday July 19 7:00am

Back to the top

HW9 is an individual assignment, but it is dependent on a working HW8. Students are to take their completed HW8 and replace the turtle with character images.

You may use any of the sprites offered in cs1316 here.



Share your animations at Gallery HW9: Animating Zombie Attack Simulation-Summer07.

Ask questions at Questions on HW9-Summer07.

Back to the top

Link to this Page