JMU CS349 - Developing Multimedia
Gallery Help Policies Solutions Study-Aids Syllabus Tools
Programming Assignment 3


1 Purpose

The primary purpose of this assignment is to help you review (and demonstrate that you have acquired) the knowledge and skills required to use the observer pattern and the iterator pattern. There is no multimedia programming in this assignment.

2 Overview

As you know, WeatherBits is a (fictitious) company that is developing and commercializing applications that will use localized, high-resolution weather forecasts. For this assignment, you must implement and test several methods in version 2.0 of the weather package.

3 Documents

WeatherBits uses a heavyweight process (as opposed to an agile process) so they have created a fairly detailed set of specifications. They are described in the following document:

4 Tasks

You must implement all of the new classes in the weather package and all of the classes in the weather.io package. In addition, you must develop a complete unit test suite for these classes that covers all statements and all branches (as measured by EclEmma). Your tests must be in a package named testing and each test class must include the word "Test" in its name.

5 Help With Data Files

You should download the data files into the downloads directory/folder that you created for this course. You should then open a file explorer or finder, select all of the files, and drag them into Eclipse. Specifically, you must drag them into the project (not the src directory/folder or anything underneath it).

Then, in your code that needs to use these files (e.g., your tests), you should use only the file name (i.e., do not include a path). For example, you might construct a BufferedReader named in as follows:

BufferedReader in = new BufferedReader(new FileReader("current.obs"));

It is possible to put the data files elsewhere, but then, when you submit your solution, your code will not be able to find them. In other words, for your code to work both on your computer and on the submission system, the data files must be dragged into the Eclipse project.

6 Hints

As is always the case, your implementation must avoid code duplication wherever it is reasonably possible to do so. So, for example, the various static factory methods must call the appropriate fromString() method. As another example, derived classes must not duplicate code in the class that they specialize. As a final example, methods that read String representations of objects must not duplicate code in the factory methods.

7 Submission

You must submit (using Gradescope) a .zip file named pa3.zip that contains:
  1. Your implementation of the required interfaces/classes in the appropriate package(s).
  2. JUnit tests for all of your classes (including classes from previous assignments that must be submitted) in a package named testing.

You may submit your code up to 10 times with no penalty. After the 10th submission, your grade will be reduced by 5 points for each submission.

8 Grading

Your submission will be graded as follows:

As always, points will be deducted manually (i.e., outside of Autolab) for code that is unclear, inelegant, and/or poorly documented.

Copyright 2025