1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mixer [17]
4 years ago
15

Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than

10, print "Too large". Otherwise, compute and print 6 * bag_ounces followed by "seconds". End with a newline. Sample output with input: 7 42 seconds
Computers and Technology
1 answer:
Gnoma [55]4 years ago
3 0

Answer:

public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

Explanation:

Using Java prograamming Language.

The Method (function) print_popcorn_time is defined to accept a single parameter of type int

Using if...else if ....else statements it prints the expected output given in the question

A complete java program calling the method is given below

public class num6 {

   public static void main(String[] args) {

       int bagOunces = 7;

       print_popcorn_time(bagOunces);

   }

   public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

}

You might be interested in
Wireless networks usually use ____ signals to send data.
barxatty [35]
<span>Wireless networks usually use radio (b) signals to send data. </span>
6 0
3 years ago
Read 2 more answers
What is the role of a design tWhat is the role of a design tool in a Robotic Process Automation (RPA) solution?
marin [14]

Answer and Explanation:

Robotic Process Automation(RPA) are software tools that apply artificial intelligence(AI) technology to automate digital routine tasks for business executives. It mimics everyday tasks and automatically executes them for the user.

Design tools in RPA play the role of infusing the best design into RPA software, it works with the popular phrase "design thinking". Robotic process automation software are now in tune with the popular buzz of a user centered approach to design of RPA tools. This ideology focuses on deploying RPA software that appeals to users and are therefore market friendly.

4 0
3 years ago
A proxy is
salantis [7]

Answer:

C. an authorization of a registered stockholder to another person to act in their place at the meeting

Explanation:

  • The proxy server acts as a gateway between you and the Internet.
  • it is a Intermediate Server separates users from browsing websites
  • Therefore, the proxy here refers to allowing someone to act on their behalf. In the case of the company, the proxy allows another person to act on behalf of the registered stockholder at company meetings.
4 0
3 years ago
In Activity 6.4 we asked you to compare the experience of playing the game of Snake on a
alexandr402 [8]

Answer:

start with what you know

Explanation:

8 0
3 years ago
The application window controls include: minimize, maximize, and close<br><br> A) true <br> B) false
Arlecino [84]

Answer:

True

Explanation:

Look at the top right of your computer while having a chrome tab open. You will see a line, a box, and a x. Hover over each and you can see the names.

6 0
3 years ago
Other questions:
  • Security testing attempts to verify that protection mechanisms built into a system protect it from improper penetration.
    9·1 answer
  • 13) What are the benefits and detriments of each of the following? Consider both the systems and the programmers’ levels. a. Sym
    14·1 answer
  • Mateo could not find the undo command or shortcut. He should _____.
    15·2 answers
  • SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and su
    15·1 answer
  • Write a program to compute the sum of digits in a number given by the user. You must use your own function to compute the sum of
    6·1 answer
  • What does the video say is the number-one requirement for Tour Guides?
    12·2 answers
  • Several programmers write individual code modules that are used for different processes in a vehicle. Individual tests have alre
    13·1 answer
  • Which of the following is not true?A. An organization may express its cybersecurity state through a Current Profile to report re
    10·1 answer
  • Which of the following sentences from the section "The Limits To Free Enterprise With A Mixed Economy" BEST develops a central i
    10·1 answer
  • I am trying to do a python code quiz for school, the basic requirements for the quiz are: the quiz MUST have 10 questions
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!