Success criteria
Once you have identified your success criteria, it is time to create design plans. You must provide clear linear searchAn algorithm designed to search for the presence of an item stored within an array (list). to solve each success criteria. Your algorithms should be represented using a combination of both data flow diagramA method used to illustrate the flow of data between functions. The use of arrows indicated whether data is an input to or output from the function. and pseudocode Also written as pseudo-code. A method of writing up a set of instructions for a computer program using plain English. This is a good way of planning a program before coding.. For example:
- Success criteria 1: The solution will include a function to capture user's name as a string, use a length check to validate the name and return the name variable.
Pseudocode:
START INPUT Name
WHILE LENGTH Name >= 50: OUTPUT ERROR
RETURN Name
END- Success criteria 3: Four functions will be created that will add, subtract, multiply and divide integer value. The function will accept two numbers as arguments and return the result after the mathematical operation
Pseudocode:
Create a function called SUBTRACT(A, B): Display on screen A - B
FUNCTION ADD(A, B): Return A + B
FUNCTION MULTIPLY(A, B): Return A * B
FUNCTION DIVIDE(A, B): Return A / BYou should show how your modules will work together. This can be represented in a flow chart. Remember, each function (like name and Subtract) will have its own algorithm.
So far, our example will look like:
This system flowchart shows how the name function is called and, once a valid name has been input, the quiz level function is called.
If a valid level is entered (1, 2 or 3) a For loop (x 10) will call the number function to generate two numbers less than 10, then randomly call and pass the numbers to one of the four maths questions.