UMBC CMSC 202
UMBC CMSC 202 CSEE | 202 | current 202

CMSC 202 - Project 2

BattleShip: A Competitive Game

Assigned Sunday October 1, 2006
Design Due Sunday October 8, 2006 at 11:59 pm
Program Due Monday October 16, 2006 at 11:59pm
Updates
  • Oct. 16 - Deadline Extension due to server failure. No Late Penalty for this project - you MUST submit on-time.
  • Oct. 5 - No makefile provided, modify your existing one.
  • Oct. 2 - Error Handling updated.

Objectives


General Project Description

You have just recently started an internship with GamesCo - a local interactive game company and your supervisor wants you to create an electronic version of the old BattleShip game. You will be responsible for creating the interface that users will see, all of the game logic, a networking component that will allow users to play each other head-to-head, and an artificial-intelligence component that will allow users to play the computer. Each phase of this project will add on a different component so that by the end of the five phases, you will have a completely operational BattleShips game.

Project Description

Class Description

For the second phase of the project, your boss requires that you modify your application to take advantage of Object-Oriented Programming by introducing the following objects which are described in the Design Requirements: You are free to add any more classes that you believe work within your application.

Functional Description

Functionality

There are several modifications to the functionality of the Project from Project 1. Your application should do the following tasks:

Error Handling Updated!

Your application should handle errors in the following ways:

Guarantees

The following are guarantees that you can assume:

Design and Implementation Requirements

Classes

You are required to design and implement the following classes:

You may add any other classes that your application requires. It is up to you to determine what the best way for the above classes to interact, there are many acceptable solutions, no one is necessarily better than another.

In designing your classes, adhere to the following guidelines:

Class methods must obey all of the coding style standards required of general purpose functions.

Tips for Developing Classes

Functions

You may continue to have functions that are not associated with an individual class. These "helper" functions should be defined in the Auxiliary files as before.

General Tips Updated!


Project Design Assignment

Your project design document for project 2 must be named p2design.txt. Be sure to read the
design specification carefully. Submit your design in the usual way: submit cs202 Proj2 p2design.txt Remember - the design is due ONE WEEK before the project. Late designs will not be accepted.

Project Makefile

The "make" utility is used to help control projects with large numbers of files. It consists of targets, rules, and dependencies. You will be learning about make files in lab. For this project, begin my modifying the makefile provided to you from Project 1.

When you want to compile and link your program, simply type the command make or make Proj2 at the Linux prompt. This will compile all necessary .cpp files and create the executable named Proj2.

The make utility can also be used for compiling a single file without linking. For example, to compile Proj2.cpp, type make Proj2.o.

In addition to compiling and linking your files, make can be used for maintaining your directory. Typing make clean will remove any extraneous files in your directory, such as .o files and core files. Typing make cleanest will remove all .o files, core files, Proj2 executable and backup files created by the editor. More information about these commands can be found at the bottom of the makefile.

Updated: If you are building your own makefile, you MUST use the /usr/local/bin/g++ compiler to compile and build each file. Do not depend on setting your default compiler to be this compiler, the grader may use a different compiler. There are two compilers on the GL systems, and you are required to use the one located at /usr/local/bin/g++.


Grading

The grade for this project will be broken down as follows. A more detailed breakdown will be provided in the grade form you receive with your project grade.

85% - Correctness

This list may not be comprehensive, but everything on this list will be verified by the graders.

15% - Coding Standards

Your code adheres to the
CMSC 202 coding standards as discussed and reviewed in class.
In particular, since this is your first C++ program using classes , pay particular attention to the list below. Graders will check all applicable items in the coding standards.
  1. Your file header comments
  2. Your function header comments (particularly pre- and post-conditions)
  3. Function and variable names
  4. In-line comments
  5. Code readability
  6. Limiting variable scope
  7. Class method names
  8. Class data member names

Project Submission

Steps for Submission

  1. submit all files
  2. submitls to verify they are in the remote directory
  3. submitmake to build your files remotely
  4. submitrun to run your files remotely
Assuming you've used the recommended file names, then to submit your project, type the command submit cs202 Proj2 Proj2.cpp Proj2Aux.cpp Proj2Aux.h Makefile The order in which the files are listed doesn't matter. However, you must make sure that all files necessary to compile your project (using the makefile) are listed. You need not submit all files at the same time. You may resubmit your files as often as you like, but only the last submittal will be graded and will be used to determine if your project is late. For more information, see the projects page on the course website.

You can check to see what files you have submitted by typing

submitls cs202 Proj2

Be sure to build your project once it has been submitted using the submitmake command, so that you know that all of the files are there and are the most up-to-date versions:

/afs/umbc.edu/users/d/a/dana3/pub/CMSC202/submitmake cs202 Proj2

Test your program to ensure that all files are the most recent versions:

/afs/umbc.edu/users/d/a/dana3/pub/CMSC202/submitrun cs202 Proj2

More complete documentation for submit and related commands can be found here.

Remember -- if you make any change to your program, no matter how insignificant it may seem, you should recompile and retest your program before submitting it. Even the smallest typo can cause compiler errors and a reduction in your grade.

Avoid unpleasant surprises!

Be sure to use the submitmake and submitrun utilities provided for you to compile, link and run your program after you've submitted it.


Last Modified: Monday, 16-Oct-2006 11:07:17 EDT