Selection techniques Programming techniques Control structures Imagine a scenari
ID: 3906140 • Letter: S
Question
Selection techniques
Programming techniques
Control structures
Imagine a scenario in which you are asked to create a menu-driven program in which certain tasks need to be performed based on the choices a user makes (1, 2, 3, and so on).
Based on your research and the task assigned in the scenario, answer the following questions:
Which selection technique do you think is best suited for such a program? Why?
Do you agree that all control structures are nothing but a form of the ''Go to'' statement? Why or why not? Justify your responses with reasons.
Is "Go to" a good programming technique? Why or why not?
Do you agree with the statement, "The 'do while' loop is enough to solve any problem that uses looping and no other repetition structure is required"? Why or why not?
Explanation / Answer
I will switch case to choose the menu option. if use switch it improves the porgram readability and maintainbility and it is easy to use
Nop, controll structures will decides whether to execute any instruction but go to is different which goes to the specific instruction based on given lable
No, it reduces the redability of program
No, do whille will not suits for every scenario because it allows the first time without checking the condition
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.