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. It will also help you review (and demonstrate that you understand) how to perform input in Java. assignment.

2 Overview

As you know, EnhancedRealty is a (fictitious) company that is developing and commercializing applications for the real estate industry. For this assignment, you must implement and test several methods in version 2.0 of the realestate package.

3 Documents

EnhancedRealty 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 Data Files

You have been provided with the following data files that you can use for testing purposes:

You should download the data files into the downloads directory/folder that you created for this course.

5 Tasks

You must implement all of the new components in the realestate package and all of the components in the realestate.io package. In addition, you must develop a complete unit test suite for these components 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.

6 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.

Do not submit the data files, they will be provided by the autograder in the appropriate location (as discussed below).

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.

7 Grading

Your submission will be graded as follows:

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

8 Help

8.1 Help Using A Scanner

Text files often use multiple delimiters, the delimiters that separate fields and the newline character that separates records (or lines). To instruct a Scanner to use a particular delimiter or delimiters you must invoke its useDelimiter() method. For example, to instruct it to use just commas as delimiters you must pass it ",", to instruct it to use just newline characters as delimiters you must pass it "\n", and to instruct it to use both you must pass it "[,\n]" (which is a regular expression that matches both).

8.2 Help Using a BufferedReader

Text files often use multiple delimiters, the delimiters that separate fields and the newline character that separates records (or lines). If you choose to use a BufferedReader you will read an entire record (including the newline character) using the readLine() method.

8.3 Help Organizing Data Files

As discussed above, 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 your IDE. If you are using Eclipse, 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("cs349.houses"));

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.

9 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.

Copyright 2024