*in java* Complete method printPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "Too small". If greater than 10, print "Too large". Otherwise,...


*in java*


Complete method printPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by " seconds". End with a newline. Example output for ounces = 7: 42 seconds



import java.util.Scanner;


public class PopcornTimer {
public static void printPopcornTime(int bagOunces) {


/* Your solution goes here */


}


public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
int userOunces;


userOunces = scnr.nextInt();
printPopcornTime(userOunces);
}
}



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here