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
Anastaziya [24]
3 years ago
8

Assume that minutes is an int variable whose value is 0 or positive. Write an expression whose value is "undercooked" or "soft-b

oiled" or "medium-boiled" or "hard-boiled" or "overcooked" based on the value of minutes. In particular: if the value of minutes is less than 2 the expression's value is "undercooked"; 2-4 would be a "soft-boiled", 5-7 would be "medium-boiled", 8-11 would be "hard-boiled" and 12 or more would be a "overcooked".
Computers and Technology
1 answer:
e-lub [12.9K]3 years ago
4 0

Answer:

import java.util.Scanner;

public class Solution {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     System.out.println("Enter your minute:");

     int minute = scan.nextInt();

     

     switch(minute){

         case 0:

         case 1:

             System.out.println("undercooked");

             break;

         case 2:

         case 3:

         case 4:

             System.out.println("soft-boiled");

             break;

         case 5:

         case 6:

         case 7:

             System.out.println("medium-boiled");

             break;

         case 8:

         case 9:

         case 10:

         case 11:

             System.out.println("hard-boiled");

             break;

         case 12:

             System.out.println("overcooked");

             break;

         default:

             if(minute > 12){

               System.out.println("overcooked");

             } else if (minute < 0){

                 System.out.println("Enter a valid minute.");

             }            

     }

   }

}

Explanation:

The first line is the import statement, which import the Scanner class for receiving user input. The next line is the class declaration which is named Solution.

The Scanner object is declared and assigned as scan. Then a prompt is displayed to the user asking the user to enter the minute. The user input is stored as minute.

Switch statement is use to categorize the user input. If the user enter 0-1, an output of undercooked is displayed. If the user enter 2-4, an output of soft-boiled is displayed. If the user enter 5-7, an output of medium-boiled is displayed. If the user enter 12 or any number above 12, an output of overcooked is displayed. Again, the user enter a number less than zero, an error message is displayed telling the user to enter a valid number.

You might be interested in
your computer running Windows 10 is doing some very strange things with operating system you are fairly certain it is not a hard
AlekseyPX
It might be a virus, when my computer starts going crazy i just bought a fixme stick and they work amazing or trying getting an expert to fix it if it worse
6 0
3 years ago
Read 2 more answers
HELPPP ASAPP
Setler [38]

Answer:

I think that Hardware runs the computer, whereas software performs tasks is correct.

I think that Hardware performs tasks, whereas software provides instructions is correct.

Explanation:

For the first one I put above, I think it is correct because Hardware is literally the computer, it runs everything but the software gives it instructions.

For the second one I put above, I think it is correct because Hardware does what the software tells it, hardware is what makes everything happen, the software gives it code.

For example, if you know Python:

print('Hello')

Will tell the computer to print 'Hello' in the terminal.

If you know javascript:

document.write("Hello") Not sure if this is right btw, I learned js some time ago

This will tell the computer to display Hello on the screen on your website

If you know ok nevermind...

And by software you mean the programming language or something executing the code (complier) right?

Hope this helps!!!

LOOK AT THIS!!!

My guess, might not be correct: Hardware performs tasks, whereas software provides instructions because if software is the app or program right? So then the software gives the code and algorithms and in algorithms you provide instructions and the computer runs the result, if you think about it like this: without the software the hardware can't do anything which is true, so then the software is telling the software what to do (instructions) and the hardware is performing it and showing results and responding to the software. I hope this helps

This is supposed to be a comment but it doesn't fit

6 0
3 years ago
Read 2 more answers
What's the best definition of financial literacy?
8090 [49]

Answer:

defines personal financial literacy as "the ability to use knowledge and skills to manage financial resources effectively for a lifetime of financial well-being.\

Explanation: thats it

5 0
3 years ago
Which one Bc I’m struggling
amid [387]
14 is c and 16 a btw do you go to connection academy
6 0
3 years ago
Read 2 more answers
Explain the danger leaks pose when operating a tractor.
Romashka [77]
Read and follow procedures as outlined in the operator's manual. By being familiar with the operating features of a tractor, the operator will develop confidence when the tractor is driven under adverse conditions. Learn the location and purpose of all of the guages and controls as well as other indicators. Knowing where the controls are by memory can allow you to react more quickly in an emergency situation. There have been accident situations where individuals have become entangled in machinery or the power takeoff shaft and rescuers or family did not know how to disengage the equipment. Family members should be showed how to shut down equipment or disengage the PTO in case of emergency.
Study the various decals on your equipment. They may point out DANGER, WARNING and CAUTION for various points on the tractor. Have an experienced tractor operator with you as you review the various decals and ask questions!
5 0
3 years ago
Other questions:
  • Pablo can view a minimum of_____ panes and a maximum of_____ panes in a split screen worksheet.
    7·1 answer
  • The Classic Triangle Testing Problem, (Myer's Triangle): A program reads three integer values. The three values are interpreted
    10·1 answer
  • What nuclear remediation site had their computers wiped clean by notpetya?
    15·1 answer
  • Https://intro.edhesive.com/courses/17288/assignments/2313298?module_item_id=4864185
    9·1 answer
  • Three batch jobs, A through E, arrive at a computer center at almost the same time. They have estimated running times of 10, 6,
    6·1 answer
  • Wireless networks use radio frequency (RF) or radio techniques, which allows wireless transmissions to reach out in all directio
    6·1 answer
  • Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
    7·1 answer
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • How to run angular project from github.
    7·1 answer
  • Jacob holds a Computer Hacking Forensic Investigator (CHFI) certification. Which of the following responsibilities should Jacob
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!