Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

organclass1

By: ace on Mar 24th, 2010  |  syntax: None  |  size: 0.91 KB  |  hits: 39  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.     }