Outlab 6: Battleship

Due: Monday 8 Aug at 10 pm

Purpose

Apply everything you have learned this semester to solve a moderately sized problem (with many little sub-problems) with minimal guidance. i.e. Show me how well you can think for yourself.

Partners

This is a lab that allows you to work with 1 partner. A group of two is the maximum.

Problem Statement

You will build an application that allows a person to play Battleship against the computer. I will provide you a Driver and a class to represent spots on the board. You must use what I provide and build your own class to represent the game. Your application will create the board, place ships randomly, ask the user for spots they want to shoot at, report/update the result, and repeat until the game is over (all ships are hit in each spot they occupy). You must also be able to report the number of guesses it took the user to finish the game. There will also be limited error checking as described below.

Tasks

Hints

Submission

By Monday 8 August at 10:00 pm, submit the file Battleship.java into the appropriate D2L dropbox folder. DO NOT SUBMIT .class files!

Grading - 20 points