Please enable JavaScript to use CodeHS

AP Computer Science A Labs

Battleship Lab

Students learn how to use Object-Oriented design to implement the board game Battleship.

Students can complete this assignment after finishing Unit 4: Data Collections in Cortado, Unit 8: 2D Arrays in AP CS A (Nitro), Unit 5: Data Structures in AP CS A (Mocha).

Lessons

12.1 Battleship Lab

  • Battleship Demo
  • Battleship Part 1: The Ship Class
  • Battleship Part 2: The Location Class
  • Battleship Part 3: The Grid Class
  • Battleship Part 4: Adding a Ship to the Grid
  • +4 more

Courses that include this module