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
What are those jackets called the ones with lots of straps inside, like in movies where they store there ammo etc?
sesenic [268]

Answer:

Tactical Vest | Tactical Ammo Vest.

Explanation:

6 0
3 years ago
What is VoIP?
xeze [42]

Answer:

D. All of these are correct

Explanation:

VoIP transmits voice data packets over the internet. It is a low-cost option for receiving personal and business calls because it uses existing infrastructure that is the internet to transmit calls, unlike traditional telephone systems that require specialized equipment such as PBXs that are costly.VoIP also offers the ability to have more than one telephone number, as long as the bandwidth is enough, it allows multiple connections at any given time.

7 0
4 years ago
1. Write a query to list the names all products (by product code and name) and the average ordered quantity for each product wit
r-ruslan [8.4K]

select WorkCenterId, Count (ProducedIn_t.ProductID) as 'TotalProducts' from ProducedIn_t left outer join Product_t on Product_t.ProductID=Product_t.ProductID group by WorkCenterId

8 0
4 years ago
" Which technique for representing numeric data uses the mantissa to hold the significant digits of a value?"
UkoKoshka [18]

Answer:

signed magnitude

Explanation:

A numeric value that is approximate consists of a mantissa and an exponent. The mantissa is a signed numeric value, so also is the exponent a signed integer that specifies the magnitude of the mantissa.

4 0
4 years ago
_____ should be used to create a project schedule.
dem82 [27]

Answer:

meeting is the correct answer

3 0
3 years ago
Other questions:
  • The two variables causing the point of difference between the time codes are the frequency and the count
    6·1 answer
  • What vi command do you use to insert the a file named "file2.txt" to the end of your current file?
    12·1 answer
  • Assume that messages sent between two programs can be lost, duplicated, delayed, or delivered out of order. Design a protocol th
    9·1 answer
  • What is the most important trait of the first pilot project in the AI Transformation Playbook?
    10·1 answer
  • In graphical linear programming to maximize profit, the objective function is: I. a family of parallel lines. II. a family of is
    11·1 answer
  • A security hole is a(n): Group of answer choices packet-level firewall small peep-hole in a door or wall to allow a security gua
    14·1 answer
  • Design a base class, Road, with the following members:
    13·1 answer
  • Which methods will remove filters? Check all that apply.
    6·2 answers
  • We cannot share software in computer network true or false​
    9·1 answer
  • Which programming scenario would most likely involve this array block?<br><br>SOMEONE PLEASE HELPPP​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!