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
-
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.
-
Complete the assessment exercise over this reading on ANGEL (under Lessons → Assignments).
-
Programming from last time: Complete the
CubicPlot
exercise from Homework 6, working in the Eclipse project from that homework.
-
More programming:
-
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.
-
Complete any in-class exercises that you didn’t finish in class:
-
EmailValidator
-
Bid
, including getValue()
, isValid()
, and 100% test coverage
-
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!
-
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.
-
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.