Wednesday, January 21, 2015

Dog Naming Barking Thing (chp. 3)



So, I made the Dog() thing. I added the eat() and chaseCat() classes, so those work as well. I prints as it should. I didn't implement the eat and chaseCat because I didn't feel the urge to. I cut off the "package" line, sorry about that. I know how important it is. This is pretty straight forward stuff.

Here's the Code Magnet thing about islands:


Some things I learned:

  • primitive variable: byte x = 3;
  • reference variable: Cat newCat = new Cat();
  • primitive is anything like: 5, 'g', true, 3.45
Something like 'train engineer' would be considered primitive. Here's a train engineer (for reference purposes):

1 comment: