Académique Documents
Professionnel Documents
Culture Documents
Date: 3/21/2019
Course: CMSC 335 – Object-Oriented and Concurrent Programming
Project: 1
2 Design
Insert here UML Class diagram, explain classes, variables, methods, explain how classes
tie to the requirements of the project:
The basic purpose of the program is to read in a file, parse each line into a hierarchy of
objects related to parts of a Seaport, display the hierarchy in a readable format and
provide search functions for various fields in each object. The SeaPortProgram class
contains the main function, and serves to create the GUI, and create a World object
which is fed the file. The World class contains search functions and parses each line into
objects. It also maintains a list of SeaPort objects which make up the World. SeaPort
objects maintain four lists, three of which keep comprehensive track of a SeaPort’s child
Dock, Person, and Ship objects. Docks can have a single child Ship. Ships can be further
described as PassengerShips or CargoShips. This describes the basic hierarchy. The Job
and PortTime classes serve as placeholder for future projects. The InvalidInputException
class is used for debugging and error handling an incorrectly typed input file. It is not a
requirement of the project as we are meant to assume that any file tested will be valid.
Further info on each method and greater explanation of each class can be found in the
comments of the program itself.
3 User Guide
Explain how a user starts & runs your project, and any specific features with screenshots:
After compiling and running the program, a file can be opened from the File menu and
selecting open. A text file to be parsed can be navigated to and opened from here. Once
open, the file is displayed in the large text area at the bottom of the window and can be
scrolled through. The file can also be searched with the bar at the top. The search bar
consists of three main elements: a combo box where you can select the search type, a
text field where you can enter your query, and a search button where you can request
results (hitting enter while the text field is selected also works). The combo box allows
you to search various different object fields. By either object name, index, skill, parent
index, or parent name. Each result will be listed on a separate line in the large text area at
the bottom of the GUI. If no results are found it will state as such in the text area. one can
re-display the initial formatting of the whole file by selecting the File menu and choosing
the “Display File” option.
4 Test Plan
Complete this table and extend it with your test cases:
I felt that, for the most part, I learned very little programming from this project and more
about the demands from this class. I’m hoping this is just because the first project is
meant to be a foundation for future projects. I spent most of my time struggling with
creating the documentation or to understand the directions which frequently omitted
things, or listed contradictory requirements. There were also some specifications of the
assignment that felt as though they could be drastically improved. For instance, rather
than iterating through an entire ArrayList to find an object with a particular index value a
HashMap would be much better for searching by a given predefined index. For Dock
objects, storing a whole Ship object seems excessive when instead you could just store
the Ship index.