-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimal.ctxt
More file actions
28 lines (28 loc) · 1.84 KB
/
Copy pathAnimal.ctxt
File metadata and controls
28 lines (28 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#BlueJ class context
comment0.target=Animal
comment0.text=\n\ \n\ Models\ an\ animal\ in\ the\ river\ ecosystem.\n\ \n\ @author\ Jackson\ Eshbaugh\n\ @version\ 1/27/2024\n
comment1.params=
comment1.target=Animal.Gender\ generateRandomGender()
comment1.text=\n\ Generates\ a\ random\ gender.\n\ There\ is\ a\ uniformly\ distributed\n\ chance\ for\ each\ gender.\n\ \n\ @return\ The\ random\ gender,\ either\ {@code\ Gender\#MALE}\n\ or\ {@code\ Gender\#FEMALE}.\n
comment2.params=
comment2.target=Animal()
comment2.text=\n\ Creates\ an\ animal\ of\n\ random\ age\ and\ gender.\n
comment3.params=age\ gender
comment3.target=Animal(int,\ Animal.Gender)
comment3.text=\n\ Creates\ an\ animal\ of\n\ specified\ age\ and\ gender.\n\ \n\ @param\ age\ The\ age\ of\ the\ animal\n\ @param\ gender\ The\ gender\ of\ the\ animal\n
comment4.params=
comment4.target=int\ getAge()
comment4.text=\n\ Gets\ the\ age\ of\n\ this\ animal.\n\ \n\ @return\ The\ animal's\ age\n
comment5.params=
comment5.target=Animal.Gender\ getGender()
comment5.text=\n\ Gets\ the\ gender\n\ of\ this\ animal.\n\ \n\ @return\ The\ animal's\ gender\n
comment6.params=
comment6.target=boolean\ maxAge()
comment6.text=\n\ Determines\ whether\ this\ animal\ is\n\ at\ its\ maximum\ age.\n\ \n\ @return\ True\ if\ the\ animal\ is\ at\ its\ max\ age,\ false\ otherwise.\n
comment7.params=
comment7.target=boolean\ incrAge()
comment7.text=\n\ Increments\ the\ animal\ age\ by\n\ one,\ if\ possible.\n\ \n\ @return\ True\ if\ the\ operation\ is\ successful,\ false\ \n\ if\ the\ operation\ failed\ and\ the\ age\ remains\ as\ it\ was.\n
comment8.params=
comment8.target=java.lang.String\ toString()
comment8.text=\n\ Renders\ this\ animal\ as\ a\n\ String\ value\ of\ the\ form\n\ {@code\ GA},\ where\ {@code\ G}\n\ is\ gender\ and\ {@code\ A}\ is\ age.\n\ \n\ @return\ the\ String\ value\ "GA"\ described\ above.\n
numComments=9