CSSE 220 – Object-Oriented Software Development

Homework 7

Objectives

Practice with decisions (if, switch) in Java. More practice implementing classes based on a given specification.

Tasks

  1. Complete the assigned reading for the next session: Chapter 6. (See schedule for topics to focus on.) As you read, see if you can answer the self-check questions. If there is something you do not understand, make note of it so you can ask about it.
  2. Edit the Big Java Review Wiki on ANGEL, adding answers to two of the review exercises from chapter 6. Be sure to carefully follow the instructions for doing this that are posted on the Wiki.
  3. Programming from last time: Complete the CubicPlot exercise from Homework 6, working in the Eclipse project from that homework.
  4. More programming:
    1. The rest of your programming work for this assignment must be done in the Decisions project inside Eclipse. Use the SVN Repository Exploring perspective to check out this project, then switch back to the Java perspective.
    2. Complete any in-class exercises that you didn’t finish in class:
      • EmailValidator
      • Bid, including getValue(), isValid(), and 100% test coverage
    3. Big Java, Exercise P5.13. Be sure to write appropriate javadoc comments and unit tests before writing each method. Test first is faster in the long run!
    4. Big Java, Exercise P5.17. You should write appropriate javadoc comments and unit tests for Circle besides the graphical display described in the problem. Write a ShapeViewer class containing your main() method that creates and configures the JFrame for this problem.
    5. Extend your program from the previous task so that, in addition to the circles, it also:
      • Asks the user for the top-left coordinates, width, and height of two rectangles.
      • Creates a MyRectangle class to handle drawing of a rectangle and to calculate whether the rectangle intersects a given rectangle. (You do not need to handle calculation of intersections of circles with rectangles.)
      Again, you should write appropriate javadoc comments and unit tests in addition to the graphical display.

Turn-in Instructions

We will grade your Wiki contributions using ANGEL. Turn-in your programming work by committing it to your SVN repository.