-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColumbus.java
More file actions
49 lines (43 loc) · 1.17 KB
/
Columbus.java
File metadata and controls
49 lines (43 loc) · 1.17 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import java.util.Scanner;
public class Columbus
{
public static void main(String[] args)
{
Scanner Scanner = new Scanner(System.in);
System.out.println("Welcome to A Columbus Adventure!");
Person Quint = new Person("Quint");
Person Nemo = new Person("Nemo");
Person Columbus = new Person("Columbus");
System.out.println("Enter a Name for the Nina:");
String ninaName = Scanner.nextLine();
System.out.println("Enter a Name for the Pinta:");
String pintaName = Scanner.nextLine();
System.out.println("Enter a Name for the Santa Maria:");
String santaMariaName = Scanner.nextLine();
Ship Nina = new Ship(Quint, ninaName);
Ship Pinta = new Ship(Nemo, pintaName);
Ship SantaMaria = new Ship(Columbus, santaMariaName);
int userChoice = Ship.PassageSel();
if (userChoice == 1)
{
Nina.passageOne();
Pinta.passageOne();
SantaMaria.passageOne();
}
else if (userChoice ==2)
{
Nina.passageTwo();
Pinta.passageTwo();
SantaMaria.passageTwo();
}
else if (userChoice == 3)
{
Nina.passageThree();
Pinta.passageThree();
SantaMaria.passageThree();
}
else
System.out.println("Try Again");
Scanner.close();
}
}