-
Notifications
You must be signed in to change notification settings - Fork 0
/
CoffeeTester.java
29 lines (26 loc) · 1.11 KB
/
CoffeeTester.java
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
/*
* Created by Noah Shaw
*/
import java.util.Scanner;
public class CoffeeTester {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Let's coffee!");
Coffee firstCoffee = new Coffee();
Coffee secondCoffee = new Coffee();
System.out.println("What's the name of the first coffee?");
Scanner keyboard = new Scanner(System.in);
firstCoffee.setName(keyboard.nextLine());
System.out.println("What's the caffeine content?");
firstCoffee.setCaffeine(keyboard.nextInt());
System.out.println("");
keyboard.nextLine();
System.out.println("What's the name of the second coffee?");
secondCoffee.setName(keyboard.nextLine());
System.out.println("What's the caffeine content?");
secondCoffee.setCaffeine(keyboard.nextInt());
System.out.println("It would take "+firstCoffee.RiskyAmount()+" "+firstCoffee.getName()+" coffees before it's dangerous to drink more.");
System.out.println("It would take "+secondCoffee.RiskyAmount()+" "+secondCoffee.getName()+" coffees before it's dangerous to drink more.");
System.out.println("Cya!");
}
}