Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Tyler Beach
- */
- import java.util.*;
- public class test {
- public static void main(String[] args) {
- Coffee coffee_1 = new Coffee();
- Coffee coffee_2 = new Coffee();
- String name ;
- int caff_cont;
- Scanner keyboard = new Scanner(System.in);
- System.out.println("Let’s Coffee!!!1!11!!ONE!!!1!");
- System.out.println("What’s the name of the first coffee? ");
- name = keyboard.nextLine();
- System.out.println("What’s the caffeine content");
- caff_cont = keyboard.nextInt();
- keyboard.nextLine(); //get rid of newline
- coffee_1.setName(name);
- coffee_1.setCaffeine(caff_cont);
- System.out.println("What’s the name of the second coffee? ");
- name = keyboard.nextLine();
- System.out.println("What’s the caffeine content");
- caff_cont = keyboard.nextInt();
- coffee_2.setName(name);
- coffee_2.setCaffeine(caff_cont);
- System.out.printf("It would take " + coffee_1.getDangerAmount() + " " + coffee_1.getName() + " coffees before it’s dangerous to drink more.\n");
- System.out.printf("It would take " + coffee_2.getDangerAmount() + " " + coffee_2.getName() + " coffees before it’s dangerous to drink more.\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement