ace

organclass1

ace
Mar 24th, 2010
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. public class Organ
  2. {
  3. public String description;
  4. public Organ circulatorySystem;
  5. public Organ respitorySystem;
  6. public Organ upperGI;
  7. public Organ LowerGI;
  8. public HashMap <String, String> organMap;
  9.  
  10. /**
  11. * Create an Organ described "description". Initially, it has
  12. * no exits. "description" is something like "a kitchen" or
  13. * "an open court yard".
  14. */
  15. public Organ (String description)
  16. {
  17. this.description = description;
  18. organMap = new HashMap <String, String>();
  19. fillOrganMap();
  20. }
  21.  
  22.  
  23. /**
  24. * method to fill hashmap with organs
  25. *
  26. **/
  27. public void fillOrganMap ( )
  28. {
  29. organMap.put < "Circulatory System", "Respitory System">;
  30. organMap.put <"Respitory System", "Circulatory System">;
  31. organMap.put <"Upper GI", "Lower GI">;
  32. organMap.put <"Lower GI", "Upper GI">;
  33. }
Add Comment
Please, Sign In to add comment