Académique Documents
Professionnel Documents
Culture Documents
The goal of this project was to produce a web version of the game of
Battleship. Our teams goal was to develop a single player version of the
classic board game. The game would allow a player to visit a specific URL.
The player would be greeted by a welcome screen that displays the game
rules and allows the user to request the start of anew game through a single
button. The player would then be taken to the game screen where they
should be able to view their game board with the placement of their ships.
The player would also be able to see the opponents board. The player
should have the option to enter coordinates from the opponents board to
attempt to sink the opponents ships. The game ends when either player
develop REST applications. The game would use a java servlet to handle all
server requests. The application would use JSON objects to transfer data
between the servlet and client. It was our teams goal to develop an
application that was lightweight and flexible. We also set out to develop a
client for the application. The client was built using JSPs with JavaScript and
JQuery. The client submits requests to the server using JSON and receives
JSON objects that are parsed and displayed to the user. Beyond the technical
work on as a team.
II. Quality
Our goal for this project was to develop a functional web application,
but we wanted our application to have a solid foundation. Our team was
free. The code must compile without errors or issues. Quality code has to be
lightweight and efficient. It is also crucial that good quality code be reusable
and flexible. In order to achieve quality code our team focused on code
review. The team was committed to sharing any changes to the code as early
and often as possible. This practice allowed other members of the team to
review any code changes before further development could take place. The
tests to verify the output of all basic methods. Our team developed test
cases for every single class that allowed for automated testing through JUnit.
Peer Code review, one of the most important factors in producing quality
code is developing a good review culture. Our team was able to accomplish
was non-functional requirements. With such a short time frame most of our
focus was on producing a working piece of code that met all of the functional
requirements. With more time our team would absolutely have to address
develop a way for the server application to verify that the client has the
were met. A multiplayer game that is played live would require a higher
completion time and cost, which is vital to any client, development teams
team can estimate the number of iterations the project will take based on
the number of story points left to complete and the teams measured
Christopher Pina
CST 438: Project Report
performance over the first few iterations. Our teams velocity can be used to
project. The entire team was open to ideas and willing to step in and support
whenever it was needed. For the first few weeks the team relied primarily on
previous discussions and provide ideas whenever they were available. This
members did make an effort to join the team chat at a scheduled time a few
times per week. These quick meetings were usually held at night after code
had been committed to our GitHub repository. These chat meetings were
to using Google hangout that allowed us to talk to each other and share our
screens when necessary. This more formal meeting was incredibly beneficial.
The team was able to share ideas more freely and having the ability to talk
unable to attend the meeting there was no real way to keep a history of
every conversation that took place. Our team did maintain a log with notes
throughout the meeting, but it is not as robust as the chat history feature. If I
improved communication methods. Since it was our teams first time working
together we did not have much time to get to know each others strengths
and weaknesses. This led to one of our team members taking on a handful of
requirements that may have been better handled by someone else on the
team with more experience with that particular technology. This did not have
an impact on our final product since the team was able to provide feedback
could have improved our team velocity. However, this challenge probably
had more to do with external aspects of the project such as it being a class
history and well documented code was crucial to overcoming this limitation.
methods, variables and classes were properly named. Anyone joining the
project would be able to easily determine what the code does simply by
Christopher Pina
CST 438: Project Report
reading the names of most objects. The project required minimal comments
and documentation, but what was necessary was added to the final version
of the code as the project was added to the server. Any new member of the
Most of our broader requirements were established early on and did not
change. The Battleship game has very specific rules that defined the scope
throughout. However, the implementation of the game and the design of the
game play remained the same, but the functionality of the game changed in
order to design something more basic that could be accomplished within the
allotted time frame. For example, our team decided to randomly choose the
placement of the ships on the board instead of allowing the user to set the
allowed players to set their battleships on the game board. When we decided
refactored to allow the game controller to randomly set the ships for all
process would not have provided the flexibility that we needed for this
project. Using a formal process would have been even more cumbersome for
to easily implement a design pattern within the system. The battleship game
separation between the internal workings of the program and the visual
representation for the user. The view is represented by the JSP files that are
displayed on the users browser. These JSP files are responsible for displaying
the game and all game data to the user as well as receiving all user input.
Game data is stored in the GameModel objects, which are responsible for
housing all game data for both players. The link between these two
VI. Diagrams
Domain Model
Christopher Pina
CST 438: Project Report
The diagram shows the applications most important classes and their
relationships. The basic objects of the application include Point, Location and
Ship. Ships have a location and locations have points. Ships are the core of
the application since they are used to build Player objects. A Player object
stores a number of ships as well as any guesses (points) made by the player.
The application requires two distinct player classes, one for the user and a
second for the Computer Player. The Computer Player class extends the
Player class, but adds guessing functionality. All player data is stored in the
Game Model class. Game Models are stored as new games in the Game
Controller. The Game Controller class utilizes an inner class to handle the
Deployment Model
Christopher Pina
CST 438: Project Report
The most important aspect of this application is the ability of the client to
submit requests to the server without the server necessarily knowing any
details of the client. The deployment diagram above shows that in the
Battleship game the client operates on a different system than the server
application. The client uses JSPs along with JavaScript to process the
response from the server. The diagram shows that requests submitted by the
Requirements/User Stories
One of the key requirements of the application is for the player to be able to
start a new game upon arrival. This requirement can be further described