Write a C# program to control a deep-sea salvage submarine.
The program should:
Target depth or distance unreachableYou must use the subroutines described in the tables below.
| Subroutine | Purpose |
|---|---|
isSalvageComplete() | Returns true if all cargo crates have been salvaged. Otherwise, returns false. |
isCrateReachable(depth, distance) | Returns true if the crate at (depth, distance) is within range of the submarine's claw. Otherwise, returns false. |
| Subroutine | Purpose |
|---|---|
retrieveCargo(depth, distance) | Activates the claw to salvage the crate at (depth, distance), if that crate is reachable. |
You should use meaningful variable name(s) and C# syntax in your answer.
131 exam-style questions on AQA GCSE Computer Science Structured programming and subroutines (procedures and functions). Each one has a worked solution and a mark scheme showing where the marks go.