Driver.java - import java.text.SimpleDateFormat import...

This preview shows page 1 - 2 out of 2 pages.

import java.text.SimpleDateFormat; import java.util.Scanner; public class Driver { public static void main(String[] args) { // Class variables String name; String type; String gender; int age; float weight; String acquisitionDate; String acquisitionSource; String reserved; String trainingLocation; String trainingStart; String trainingEnd; String trainingStatus; Scanner scan = new Scanner(System.in); // Create New Dog Dog Fred = new Dog(); Fred.setBreed("French Bulldog"); // Create New Monkey Monkey Jeff = new Monkey(); Jeff.setBreed("Capuchin"); // Method to add animals //System Prompt for Info System.out.println("Add Animal"); System.out.println("What is the name of the animal?"); name = scan.next(); System.out.println("What is the type?"); type = scan.next(); System.out.println("What is the gender?"); gender = scan.next(); System.out.println("What is the age?"); age = scan.nextInt();

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture