Main.java

Package: main/
File: Main.java

  1. package main;
  2.  
  3. import existence.Existence;
  4. import existence.Existence010;
  5.  
  6. /** Uncomment these lines to instantiate other existences: */
  7.  
  8. //import existence.Existence020;
  9. //import existence.Existence030;
  10. //import existence.Existence031;
  11. //import existence.Existence032;
  12. //import existence.Existence040;
  13. //import existence.Existence050;
  14.  
  15. /**
  16.  * The Main Class instantiates an Existence.
  17.  * The Main Class runs the Existence step by step in a loop.
  18.  * and prints the Existence's activity as it runs.
  19.  */
  20. public class Main {
  21.  
  22. public static void main(String[] args){
  23.  
  24. /** Change this line to instantiate another existence: */
  25. Existence existence = new Existence010();
  26. //Existence existence = new Existence020();
  27. //Existence existence = new Existence030();
  28. //Existence existence = new Existence031();
  29. //Existence existence = new Existence032();
  30. //Existence existence = new Existence040();
  31. //Existence existence = new Existence050();
  32. //Existence existence = new Existence051();
  33.  
  34. /** Change this line to adjust the number of cycles of the loop: */
  35. for(int i = 0 ; i < 20 ; i++){
  36. String stepTrace = existence.step();
  37. System.out.println(i + ": " + stepTrace);
  38. }
  39. }
  40. }
  41.  

See public discussions about this page or start a new discussion by clicking on the Google+ Share button. Please type the #IDEALMOOCMain hashtag in your post: