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
PayPal Gateway not configured
PayPal Gateway not configured