-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitchActivity.java
More file actions
27 lines (25 loc) · 1.01 KB
/
Copy pathswitchActivity.java
File metadata and controls
27 lines (25 loc) · 1.01 KB
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
package Week3;
import javax.swing.*;
public class switchActivity {
public static void main(String[] args) {
String pokemon = JOptionPane.showInputDialog(null, "Enter a pokemon");
String pkmnInfo = "";
switch(pokemon){
case "charmander":
pkmnInfo = "a fire type starter, its final evolution is chariszard";
break;
case "squirtle":
pkmnInfo = "a water type starter, its final evolution is blastoise";
break;
case "bulbasaur":
pkmnInfo = "a grass type starter, its final evolution is venosaur";
case "pikachu":
pkmnInfo = "an electric type, only available as a starter is special cases, its final evolution is raichu";
break;
default:
pkmnInfo = "not registered or does not exist";
break;
}
JOptionPane.showMessageDialog(null, "This pokemon is "+pkmnInfo);
}
}