Created
November 12, 2015 11:12
-
-
Save bragboy/c4da4c64051239050b01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package nasa.main; | |
| import nasa.exceptions.InvalidInputException; | |
| import nasa.exceptions.OutOfRangeException; | |
| public class Nasa { | |
| private ISignal signal; | |
| private ControlPanel controlPanel; | |
| public Nasa(ISignal signal){ | |
| this.signal = signal; | |
| } | |
| public void execute() throws InvalidInputException, OutOfRangeException { | |
| controlPanel = new ControlPanel(signal.getBounds()); | |
| controlPanel.setRoverPos(new Heading(signal.getInitialPos())); | |
| controlPanel.setData(signal.getData()); | |
| } | |
| public String getFinalPosition(){ | |
| Heading finalHeading = controlPanel.getRoverPos(); | |
| return finalHeading.toString(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment