Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

if your programming language provides a case structure, it is appropria…

Question

if your programming language provides a case structure, it is appropriate to use this structure when
a. an action should be repeated until a condition becomes false
b. a series of nested if statements cannot be used to achieve the desired outcome
c. you need to bill customers extra if they have received a parking violation notice
d. you need bill customers a different amount for each of four types of parking passes they hold
not answered

Explanation:

Brief Explanations

A case - structure is used for multiple - way branching based on different values. Option d involves different actions (billing different amounts) based on different types of parking passes, which is a typical use - case for a case structure. Option a describes a loop (e.g., a do - while or while loop). Option b is not a correct reason for using a case structure. Option c can be achieved with an if - else statement.

Answer:

D. you need bill customers a different amount for each of four types of parking passes they hold