/** * Author: Josiah Yoder et al. * Class: SE1011-051 * Lesson: Week 6, Day 1 */ import javax.swing.JOptionPane; import java.util.Scanner; public class Example051_6_1 { /* * The heart of the HelloWorld class. */ public static void main(String[] args) { // Scanner in = new Scanner(System.in); // int x = in.nextInt(); // Set up dog 1 Dog dog = new Dog("Fido"); dog.setBreed("Husky"); System.out.println(dog); // dog.toString() dog.rollInGrass(); System.out.println(dog); dog.takeBath(); System.out.println(dog); // Set up dog 2 Dog dog2 = new Dog("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(); } }