package mug12; /** * A StubInteract that simulates World's Interact. * * @author Angeline Namai * @author Kyle Gonnerman * @author Michael Claveria * @version 1.0 of November 2004 */ public class StubInteract { // +--------+-------------------------------------------------- // | Fields | // +--------+ String verb; String object; String actor; // +--------------+-------------------------------------------- // | Constructors | // +--------------+ // +----------------+------------------------------------------ // | Public Methods | // +----------------+ public String interact(String first, String second, String third) throws Exception { if (Math.random() < 0.5) return "Your action has been performed"; if (Math.random() < 0.1) return "Invalid Action!"; return "DONE!"; } // interact(String,String,String) }