What is the correct answer for Chapter 6 Q 9s answer from th

What is the correct answer for Chapter 6, Q 9\'s answer from the Problem Solving and Programming Concepts (9th Edition)?

Q9. For what type of problems would you use the case logic structure?

I have answered it as:

This structure is used in many business-related problems, such as those dealing with types of accounts in a bank, types of insurance available to an employee, or the selection of a bonus.

Solution

Case logic statements are a substitute for long if statements that compare a variable to several values. Switch statements serve as a simple way to write long if statements when the requirements are met. Often it can be used to process input from a user.

As you have answered, case logic structure can be used in accounts of a bank, types of insurance available to a an employee etc. So we can say that whenever there are multiple options available to pick, we can use it easily.

another example is: Academic grading system. Here there will be different grades for each subject. For each grade you can process unique logic as described in the above case.

So in this way wherever there are multiple options to select or process, we can use case logic structure.

What is the correct answer for Chapter 6, Q 9\'s answer from the Problem Solving and Programming Concepts (9th Edition)? Q9. For what type of problems would you

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site