Question: Just need a super simple program in C++. Needs to create a 10x10 gameboard. Create a ship class and initialize 4 instances of the ship

Just need a super simple program in C++. Needs to create a 10x10 gameboard. Create a ship class and initialize 4 instances of the ship class to put 4 different ships on the board in random spots. The four ships are a frigate which takes two spaces, a destroyer that takes three spaces, a battleship that takes four spaces, and the carrier that takes five spaces. The ships need to be placed randomly on the board either horizontally or vertically.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!