Resources | Revision Questions | Computer Science
Click on a question to view the answer
A program is designed to process a list of student grades. The program needs to calculate the average grade, identify students who have achieved a passing grade (defined as 50 or above), and output a report summarizing the results. Describe, using a structure chart, how you would decompose this problem into sub-tasks. Clearly indicate the parameters passed between the modules/procedures/functions involved in the algorithm design. Your structure chart should be at least three levels deep.
Explain the difference between a deterministic and a non-deterministic state-transition diagram. Provide an example of a scenario where a non-deterministic state-transition diagram would be appropriate and discuss the challenges associated with using non-deterministic diagrams in algorithm design.
Describe the key components of a state-transition diagram. Include a description of the symbols used to represent states, transitions, and initial/final states. Provide a brief example of how these components would be used to model a simple real-world process.