Course Solutions Uncategorized (Solved) : C Programming Language Battleship Game Needs Several Different Kinds Ship Need Type Store Q32731088 . . . .

(Solved) : C Programming Language Battleship Game Needs Several Different Kinds Ship Need Type Store Q32731088 . . . .

 

In C# programming language:

Our Battleship game needs several different kinds of ship – weneed a type to store the ships and information about it.

Create a base class called Ship.

Create child classes for each of the ship types in the game(https://en.wikipedia.org/wiki/Battleship_(game)#Description) thatinherit from Ship.

Ships should have the following properties:

A private array of positions

A Position is composed of an X and Y coordinate – you shouldcreate a struct to encapsulate this.

A read-only length

The constructor for each inherited type should set this to thecorrect length for the ship type.

A read-only color to be drawn in

The constructor for each inherited type should set this

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post