Wednesday, March 26, 2008

Project 3b

Due Date: Monday, 14 April (firm!)

Team project

Objectives

An understanding of
  • Requirements analysis
    • functional requirements
    • nonfunctional requirements
    • constraints/goals
  • Modeling
    • UML class diagrams
    • UML sequence diagrams
  • Design patterns
    • Designing to an interface
    • Composite pattern
    • Decorator pattern
  • Java coding
    • final-correctness
    • anonymous inner classes
    • basic Java AWT graphics

Description

In this project, you will complete the implementation of the simple API for drawing graphical shapes. The API design is based on the requirements from project 3a, with some minor modifications. See also the practice midterm and its solutions, on which this project is based.

As discussed in class, I will send the code skeleton for this project directly to your team as soon as you notify my of your submission of project 3a.

Functional requirements

The functional requirements are embodied in the JUnit tests in the test folder. If your code passes all the tests, you will have fulfilled the functional requirements for grading purposes. If some of the tests do not pass, you will receive partial credit.

Specifically, complete the code in the various Java source files within the src folder. Look in the Eclipse Tasks view for sections marked as "your job" and use the test cases as your guide. Besides other minor tasks, the main implementation tasks are:
  • Implementing the int size() method in the Shape interface and all implementing classes
  • Implementing the missing classes Outline, Point, and Polygon
    • The Outline decorator does the opposite of the Fill decorator: it indicates that its shape should be drawn in outline (default) mode.
    • A Point is a location without a shape. You should implement it using a Circle with radius 0 as its shape and override any methods as needed.
    • A (closed) Polygon is a shape defined by a list of points. Implement it as a special case of Group.
As usual, you must not make any other changes to the code skeleton or the test cases.

Sequence diagrams

Using a modeling tool or general drawing tool of your choice, draw sequence diagrams representing the following method invocations:
  • s.size() in TestSize.testGroupSimple
  • s.draw() in TestDraw.testSimple (be sure to include the Graphics object in the diagram)

Grading

  • 10% code skeleton
  • 10% inline and Javadoc comments (be sure to run Javadoc)
  • 60% functional requirements
  • 20% sequence diagrams

How to submit

Please refer to the online submission procedure. Each team is to make exactly one submission.

No comments: