-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathApplication.java
More file actions
37 lines (22 loc) · 944 Bytes
/
Application.java
File metadata and controls
37 lines (22 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package io.zipcoder;
import java.util.Scanner;
public class Application {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
System.out.println("What is your pet's name?");
String petName = scanner.nextLine();
System.out.println("Your pat's name is " + petName + ".");
System.out.println("These are the pets that we have available...");
System.out.println("1 for LLama, 2 for Cat, 3 for Dog, 4 for Bird");
String animal = scanner.next();
switch(animal) {
case "Llama":
Llama llama = new Llama();
System.out.println("what would you like to call you Llama?");
//
// String petName = scanner.nextLine();
System.out.println("The sound like this " + llama.speak + " /n Your pet's name is " + petName);
break;
}
}
}