User Tools

Site Tools


ant_lab_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
ant_lab_1 [2018/11/23 13:10] cthielant_lab_1 [2018/11/23 13:41] cthiel
Line 8: Line 8:
  
 Before we make an ''Ant'' we will be needing a way to test it (See [[https://en.wikipedia.org/wiki/Extreme_programming|Extreme programing]] for why it's a good idea to make a tester before the object you are testing).  We will make a simple ''AntCorral'' that will eventually hold ''Food'' objects and ''AntHill'' objects that spawn ''Ants''s as well as tell the all the objects in the  ''AntCorrall'' about the passage of time, so they will do something.  The objects will implement an interface we will invent called ''Active'' Any object that is ''Active'' will need to have a ''doSomething'' method. Before we make an ''Ant'' we will be needing a way to test it (See [[https://en.wikipedia.org/wiki/Extreme_programming|Extreme programing]] for why it's a good idea to make a tester before the object you are testing).  We will make a simple ''AntCorral'' that will eventually hold ''Food'' objects and ''AntHill'' objects that spawn ''Ants''s as well as tell the all the objects in the  ''AntCorrall'' about the passage of time, so they will do something.  The objects will implement an interface we will invent called ''Active'' Any object that is ''Active'' will need to have a ''doSomething'' method.
 +
 +{{ ::active.java |Active.java}}
 +
 +{{ ::antland1.java |AntLand1.java}}
ant_lab_1.txt · Last modified: 2018/11/23 13:45 by cthiel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki