Presentation is loading. Please wait.

Presentation is loading. Please wait.

THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS.

Similar presentations


Presentation on theme: "THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS."— Presentation transcript:

1 THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS OF A SOLUTION TO A PROBLEM C- DETERMINE THE ORDER OF THE STEPS NEEDED TO SOLVE A PROBLEM D- IDENTIFY SUB-PROCEDURES NECESSARY TO SOLVE A PROBLEM

2 GENERALLY SPEAKING, ALL PROBLEMS BEGIN WITH AN IDEA. FINDING THE CONNECTION BETWEEN THIS INFORMATION AND THE SOLUTION LIES AT THE HEART OF PROBLEM SOLVING. TO DO THIS, THE FOLLOWING STRATEGIES CAN BE UTILISED.

3 The Programming Process Developing a program involves steps similar to any problem-solving task. There are five main ingredients in the programming process: 1.Defining the problem 2.Planning the solution 3.Coding the program 4.Testing the program 5.Documenting the program

4 A- IDENTIFY THE COMPONENTS OF A PROBLEM Decomposition Part of being a computer scientist is breaking down a big problem into the smaller problems that make it up. If you can break down a big problem into smaller problems then you can give them to a computer to solve. For example if I gave you a cake and asked you to bake me another one you might struggle, but if you watched me making the cake and worked out the ingredients then you'd stand a much better chance of replicating it. If you can look at a problem and work out the main steps of that problem then you'll stand a much better chance of solving it.

5 Pattern generalisation and abstraction Once we have recognised a pattern we need to put it in its simplest terms so that it can be used whenever we need to use it. For example, if you were studying the patterns of how people speak, we might notice that all proper English sentences have a subject and predicate.

6 ALGORITHM DESIGN ONCE WE HAVE OUR PATTERNS AND ABSTRACTIONS WE CAN START TO WRITE THE STEPS THAT A COMPUTER CAN USE TO SOLVE THE PROBLEM. WE DO THIS BY CREATING ALGORITHMS. ALGORITHMS AREN'T COMPUTER CODE, BUT ARE INDEPENDENT INSTRUCTIONS THAT COULD BE TURNED INTO COMPUTER CODE. WE OFTEN WRITE THESE INDEPENDENT INSTRUCTIONS AS PSEUDO CODE. EXAMPLES OF ALGORITHMS COULD BE TO DESCRIBE ORBIT OF THE MOON, THE STEPS INVOLVED IN SETTING UP A NEW ONLINE SHOPPING ACCOUNT OR THE SEQUENCES OF TASKS INVOLVED FOR A ROBOT TO BUILD A NEW CAR.

7 declare robot; robot.on; robot.get(body); robot.get(roof); do robot.weld(roof, body); until (robot.weld == success) robot.off;

8 SUPPOSE THAT, AS A PROGRAMMER, YOU ARE CONTACTED BECAUSE YOUR SERVICES ARE NEEDED. YOU MEET WITH USERS FROM THE CLIENT ORGANIZATION TO ANALYSE THE PROBLEM, OR YOU MEET WITH A SYSTEMS ANALYST WHO OUTLINES THE PROJECT. SPECIFICALLY, THE TASK OF DEFINING THE PROBLEM CONSISTS OF IDENTIFYING WHAT IT IS YOU KNOW (INPUT-GIVEN DATA), AND WHAT IT IS YOU WANT TO OBTAIN (OUTPUT-THE RESULT). EVENTUALLY, YOU PRODUCE A WRITTEN AGREEMENT THAT, AMONG OTHER THINGS, SPECIFIES THE KIND OF INPUT, PROCESSING, AND OUTPUT REQUIRED. THIS IS NOT A SIMPLE PROCESS.

9 B-IDENTIFY THE COMPONENTS OF A SOLUTION TO A PROBLEM Evaluate whether the order in which activities are undertaken will result in the required outcome. look the role of sub-procedures(routine) in solving a problem. DON’T REINVENT THE WHEEL

10 C- DETERMINE THE ORDER OF THE STEPS NEEDED TO SOLVE A PROBLEM Identify when decision-making is required in a specified situation. Identify the decisions required for the solution to a specified problem. Identify the condition associated with a given decision in a specified problem. Apply logical rules for real-world situations.

11 D- IDENTIFY SUB-PROCEDURES NECESSARY TO SOLVE A PROBLEM Check the syntax and the logical error call the subroutine correctly and what it will do when it is called. Such as the number of parameters, and the type of each parameter. This is the information needed to write a subroutine call statement that can be successfully compiled.

12 int smallest; int x; int y; int z; if (x <= y && x <= z) { return x; } else if (y <= x && y <= z) { return y; } else return z; } Parameters Sub-routine Functions

13 PUBLIC CLASS SUB { PUBLIC STATIC VOID MAIN (STRING[] ARGS){ INT NUMBEROFSTARS=5; FOR (INT I = 0; I < NUMBEROFSTARS; I++) { SYSTEM.OUT.PRINT('*'); } SYSTEM.OUT.PRINTLN(); } } Parameters Sub-routine Functions


Download ppt "THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS."

Similar presentations


Ads by Google