Guest User

Untitled

a guest
Mar 8th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.awt.*;
  3.  
  4. public class Kennel {
  5.  
  6.      public void main (String[] args){
  7.  
  8.        int age;
  9.        String name;
  10.        Scanner scan = new Scanner (System.in);
  11.  
  12.        System.out.println ( "Enter Name of the Dog: ");
  13.        name = scan.nextLine();
  14.  
  15.        System.out.println ("Enter the age of the Dog:  " );
  16.        age= scan.nextInt();
  17.  
  18.        dog1 = new Dog(age, name);
  19.  
  20.        System.out.println("In human years, the dog is: " + Dog.humanYears());
  21.       }
  22.  }
Add Comment
Please, Sign In to add comment