Define decision making and describe its role in programming.
What will be an ideal response?
?The process of choosing which code to execute at a given point in an application is known asdecision making.When you write a computer program, regardless of the programming language, you often need to execute different sets of statements depending on some predetermined criteria. For example, you might create a program that needs to execute one set of code in the morning and another set of code at night. Or you might create a program that must execute one set of code when it's running on a larger screen, like a desktop or notebook computer, and another when it runs on a smaller screen, like a tablet or mobile phone. Additionally, you might create a program that depends on user input to determine exactly what code to run. For instance, suppose you create a web page through which users place online orders. If a user clicks the Add to Shopping Cart button, a set of statements that builds a list of items to be purchased must execute. However, if the user clicks the Checkout button, an entirely different set of statements, which completes the transaction, must execute.
You might also like to view...
Labels and Text Boxes are known as controls
Indicate whether the statement is true or false
Which of the following is a characteristic of wet pipe fire suppressions systems?
a. Water held back by a clapper b. Always contains water c. Air blows out of a pipe; the water flows d. Preferred for computer installations