Homework #4: Comic Strip

Objectives

In a comic strip, subjects are drawn within panels which are sequenced together to create a comical effect. Subjects are typically shown with speech balloons. In this assignment, you will design and draw subjects that will be part of your very own comic strip. You will place these subjects within panels and add speech balloons to create your comic strip.

The objectives of this assignment are to learn the use of Java libraries, in particular you will draw your subjects and write the text of your speech balloons using the Java Graphics and Graphics2D classes. To do this, you will need read the Javadoc for these libraries to determine how to make use of the different methods.

Problem

  1. Choose a theme for your comic strip subjects. Will your subjects be people, animals, or something else? Design what each of your subjects will look like. You need to have at least two subjects that will interact in a comic strip containing at least 4 panels. Plan the size of each panel carefully, as your subjects need to fit within each of these panels.
  2. Download and use the file ComicStrip.java for your assignment.
  3. "Fill in the blank" in the method named createStrip(). You should maintain not change the fact that the createStrip() method uses NO parameters.
  4. You may make the strip as big as you would like, but try to keep it reasonable so that you eliminate excess white space in the background.
  5. Use the Java classes Graphics and Graphics2D to draw your subjects. You must make use of methods that draw curves, polygons, filled and unfilled, and use different style lines. Be sure to use methods from the Graphics2D class, not just those from the Graphics class.
  6. Place each of your subjects within the different panels and add speech balloons.
  7. Sequence the panels together to create your comic strip. Your comic strip must consist of at least four frames (or panels). You may lay them out as 4 in a row horizontally, or 2x2 in a square, or 3x3 -- however you. wish. The frames must be separated with lines.
  8. Write a Java program (e.g. one with a class method named main()) that has the following lines of code (where the width and height have been defined and initialized earlier):
    ComicStrip comic = new ComicStrip( width, height );
    comic.createStrip();
    comic.show(); // you should also write the comic strip to a file

Deliverables

You must submit the Java code electornically. To submit your code electronically, send via e-mail the files of your Java main program (call it what you like, as long as it's a good name). Your code must compile and run in the CECS lab computers without any changes!

Collaborating

You may collaborate with one student from this class in order to satisfy the requirements from this assignment. Each student is required to create his/her own original comic strip subjects. and thus must be different from those created by the student whom you collaborate with.

Notes

Programming Resources