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
ankoles [38]
3 years ago
6

In the Happy Valley School System, children are classified by age as follows:less than 2, ineligible2, toddler3-5, early childho

od6-7, young reader8-10, elementary11 and 12, middle13, impossible14-16, high school17-18, scholargreater than 18, ineligibleGiven an int variable age, write a switch statement that prints out, on a line by itself, the appropriate label from the above list based on age.
Computers and Technology
1 answer:
Greeley [361]3 years ago
7 0

Answer:

int age = 10;

switch (age){

case 0:

case 1:

System.out.println("ineligible");

break;

case 2:

System.out.println("toddler");

break;

case 3:

case 4:

case 5:

System.out.println("early childhood");

break;

case 6:

case 7:

System.out.println("young reader");

break;

case 8:

case 9:

case 10:

System.out.println("elementary");

break;

case 11:

case 12:

System.out.println("middle");

break;

case 13:

System.out.println("impossible");

break;

case 14:

case 15:

case 16:

System.out.println("high school");

break;

case 17:

case 18:

System.out.println("scholar");

break;

default:

System.out.println("ineligible");

}

Explanation:

In java and many other programming languages, a switch statement is a way of having multiple branching options in a program. This is usually considered a more efficient way than using multiple if....else if statements. and the expression variables could be byte, char int primitive data types. etc. every branch (option) in a switch statement is followed by the break statement to prevent the code from "falling through". In the question The variable age is declared as an int and initialized to 10. and tested against the conditions given in the question.

You might be interested in
WILL GIVE BRAINLIEST!!!!!!!
denpristay [2]

Answer:

A drill is one of the most important tools a dentist can have. They run on pneumatic systems which gives the drill power and precision.

Explanation:

So, false

3 0
2 years ago
Read 2 more answers
Modern ancestor of the typewriter
Rashid [163]
I would think Microsoft Word would be the answer. It does everything a typewriter can.
4 0
2 years ago
Read 2 more answers
Nog
STatiana [176]

Answer: False

Explanation:

The statement that "Peacekeeper text is non-printing text that indicates where you can type" is false.

The non-printing text which shows where on exam type is referred to as the peaceholder text. It is usually an hint which can be used to fill in the actual text.

8 0
3 years ago
In addition to compiling the list of user access requirements, applications, and systems, the BIA also includes processes that a
laila [671]

Answer:

automated

Explanation:

Basically a Business Impact Analysis (BIA) estimates and determines the effects of a business activity and process disturbances. These disruptions can be natural or electronic disasters. It also collects information which is used to establish recovery plan. It identifies the business vulnerabilities and works on the strategies in order to reduce such potential hazards. The BIA involves both manual and automated processes. BIA involves automated processes which include the automated software tools that enables the protection of the confidential information of the users and also generates automated reports about the critical business processes.

5 0
3 years ago
Which feature of a social news sharing website distinguishes it from a social bookmarking website
Crank
The privacy feature i think
4 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose you have two arrays of ints, arr1 and arr2, each containing ints that are sorted in ascending order. Write a static meth
    7·1 answer
  • I have been trying to work on this for a while now, and this is on excel
    11·1 answer
  • You put $500 in an interest bearing bank account that pays 2% per year but has a fee of $2 per month. Are you getting ahead?
    14·2 answers
  • The _____ feature automatically corrects typing, spelling, capitalization, or grammar errors as you type them.
    13·1 answer
  • A(n) _____ is a telephone facility that manages incoming calls, handling them based on the number called and an associated datab
    5·1 answer
  • Who developed the idea of a universal network?
    11·1 answer
  • Which CIDR network has the smallest possible number of hosts? a. 123.0.0.0/8 b. 123.45.0.0/16 c. 123.45.67.0/24 d. All have the
    10·1 answer
  • WHO WANTS TO PLAY AMONG US
    15·2 answers
  • Which of the following examples can be solved with unsupervised learning?
    8·1 answer
  • Which action does not happen in each iteration of the repeat loop in the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!