March 2018
Intermediate to advanced
208 pages
4h 52m
English
| | class LaunchChecklist { |
| | |
| | List<String> checks = Arrays.asList( |
| | "Cabin Leak", |
| » | // "Communication", // Do we actually want to talk to Houston? |
| | "Engine", |
| | "Hull", |
| » | // "Rover", // We won't need it, I think... |
| | "OxygenTank" |
| » | //"Supplies" |
| | ); |
| | |
| | Status prepareLaunch(Commander commander) { |
| | for (String check : checks) { |
| | boolean shouldAbortTakeoff = commander.isFailing(check); |
| | if (shouldAbortTakeoff) { |
| » | //System.out.println("REASON FOR ABORT: " + item); |
| | return Status.ABORT_TAKE_OFF; |
| | } |
| | } |
| | return Status.READY_FOR_TAKE_OFF; |
| | } |
| | } |
In any bigger code base, you’re guaranteed to find sections of commented-out code. These types of comments are just clutter.
In this example, you see ...