You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
obj Cactus ==>
pub #size var dec <~~ declare attribites
pub #name con str
pub #type con str
pri #DoB con dec
pub meth new(name -str-, type -str-) ==>
#name <-< name
#type <-< type
#size <-< 0
#DoB <-< Time:now <~~ built in object, no need for () on methods with no paramaters
<==
pub meth grow(amount -dec-) ==>
#size <-+-< amount <~~ #size <-< #size + amount
<==
pub meth get_DoB =dec=>
<-- #DoB
<==
<==
spikey <-con Cactus-< Cactus::new("spikey", "barrel")
Cactus::new("spikey, "barrel") <~~ literal
The text was updated successfully, but these errors were encountered:
Example:
The text was updated successfully, but these errors were encountered: