Design and implement the C++ program which simulates a submarine. Utilizing a two dimensional dynamic array (where user state the number of rows and columns), you should represent a submarine within an aquatic landscape. The submarine should travel from left side of array to right side, without leaving the area. If sub tries to leave area or it wanders into the shallow area, the simulation should end. Initialize array to -1. The user should be able to move the sub up, left, right and down. The initialize method in given files will represent the array as follows:
1) Submarine
2) Shallow area
3) Moveable area