/** * Author: Josiah Yoder et al. * Class: SE1011-011 * Lesson: Week 6, Day 1 */ public class Example051_6_2 { /* * The heart of the HelloWorld class. */ public static void main(String[] args) { boolean isOn; boolean isDiscIn; int numberOfPlayers; VideoGame051_6_2 game = new VideoGame051_6_2(); /// Dog example. Nearly same as Week 6, Class 1 Dog051_6_2 dog = new Dog051_6_2("Fido"); dog.setBreed("Husky"); System.out.println(dog.toString()); // dog.toString() dog.rollInGrass(); System.out.println(dog.toString()); dog.takeBath(); System.out.println(dog.toString()); // Set up dog 2 Dog051_6_2 dog2 = new Dog051_6_2("Bob"); dog2.setBreed("Lab retriever"); //String breed = dog2.getBreed(); dog2.getBreed(); // allowed, but not useful. // String name = dog.getName(); System.out.println("The dog's name is: "+dog.getName()); System.out.println("The dog's breed is: "+dog.getBreed()); System.out.println("The other dog's name is: "+dog2.getName()); System.out.println("The other dog's breed is: "+dog2.getBreed()); dog.bark(); } }