IRM2708
BAN USER- 0of 2 votes
AnswersAll Sim characters are loaded with the same copy of your software. Imagine two of these sims are positioned somewhere on a line that extends to infinity in both directions, left and right. Using the below interface, write a C# method called "Collide" that ensures that the two sims will collide at some point in the future. Remember, the code that you write will be deployed to each Sim. You cannot write code that will be deployed to one and not the other. The method should have no parameters. You do not need to implement the ISim interface.
- IRM2708 in United Statespublic interface ISim { void MoveLeft(); // Moves the sim character one unit on the line to the left void MoveRight(); // Moves the sim character one unit on the line to the right void Relax(); // Commands the sim character to not do anything void MarkPosition(); // Puts a mark on the line at the current position of the sim character bool IsCurrentPositionMarked(); // Inspects the current position of the sim character for a mark and returns true if one is found, false if one is not found. }
| Report Duplicate | Flag | PURGE
Graphic Systems Senior Software Development Engineer .Net/C#