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
Anyone play Ps4 and wanna run up some warzone or Gta? Im M 16 so dont be a creep... :) ill mark brainliest if you drop gamertag
Nikitich [7]

Answer:

Xbox/ PC game here

Explanation:

4 0
3 years ago
Read 2 more answers
It skills which move well between industries are considered?
Butoxors [25]

Answer:

They are termed as ethics. But remember different industries have a different set of ethics or rules that they expect their employees to follow. However, some that go well with all are common to all. And they are the standard ethics that are followed by all the industries. Failing to these is never expected.

Explanation:

Please check the answer section.

6 0
3 years ago
Which of the following are peripheral devices?
Fittoniya [83]

Explanation:

I think it's speakers,

7 0
3 years ago
Read 2 more answers
For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises
kati45 [8]

Answer:

vehicle super class 9.1.4

Explanation:

So you need to create a super class containig all the animals use the class above for referance

5 0
3 years ago
Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
3241004551 [841]

Answer: a. intrapersonal and short-term goals

Explanation:

Intrapersonal goals are those that we set for ourselves in our minds to accomplish. The students that are finishing their homework after school most probably set that goal in their minds and so meeting it would mean meeting their intrapersonal goals.

Homework is not a long term project but rather a short one that is usually meant to be completed within days. Completing it is therefore a short term goal.

The students who finish their homework after school are therefore accomplishing both their intrapersonal and short-term goals.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is not a typical step in the ethical hacking process? A. Planning B. Discovery C. Attack D. Recovery
    5·1 answer
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • The control programs managing computer hardware and software perform the _________ function to control and prioritize tasks perf
    8·1 answer
  • Which of the following is not a type of user account? A. Administrator b. Guest c. Group d. Standard
    10·1 answer
  • A collection of facts can be copyrighted, but only if the collection is ____ in a way that causes the resulting work to rise to
    14·1 answer
  • Which email client feature allows you to store the names and information of people you contact frequently?
    5·1 answer
  • Write a function that will alphabetize a string WITHOUT using the sort function :
    7·1 answer
  • A technician needs to boot a PC from a USB drive.
    5·1 answer
  • Tom Daniels, an employee of a telecommunications company, is developing software that would enable customers to activate value-a
    7·1 answer
  • Give an example where traditional laws and modern media have created "grey areas".
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!