Presentation is loading. Please wait.

Presentation is loading. Please wait.

AS Level Computing 8 CHAPTER: Fundamentals of structured programming The basics of good programming Algorithms System Flow Charts Symbol Conventions Steps.

Similar presentations


Presentation on theme: "AS Level Computing 8 CHAPTER: Fundamentals of structured programming The basics of good programming Algorithms System Flow Charts Symbol Conventions Steps."— Presentation transcript:

1 AS Level Computing 8 CHAPTER: Fundamentals of structured programming The basics of good programming Algorithms System Flow Charts Symbol Conventions Steps Used to Represent the System’s Operation

2 AS Level Computing AS Computing F452 Design Can you spot the mistake? The aims of programming design are: - match the definition –Do you remember the aims of good programming design? Reliability Maintainability Readability PerformanceStorage saving the programme must be easy to change or modify programme should do what the end user requires the programmer must be able to read and understand the programme the programme must do its job fast and efficiently the programme must ideally occupy as little memory as possible

3 AS Level Computing AS Computing F452 Structure charts What is an Algorithm? –To design a solution to a problem, it is not enough to design what data is required and how the data is going to be inputted and outputted A well designed algorithm will list every instruction the computer needs to execute to solve the problem The algorithm will show the order that these instructions need to follow in terms of being carried out (executed) to solve the problem Devising Algorithms is essential for you to do well on this unit –An effective design will need to use some actual code with text in prose –An effective design needs to show logic in solving a problem A. A network device for carrying packets B. A section of code detailing what will happen to data being inputted, processed and outputted C. A rhythmic pulse that stimulates the processor

4 AS Level Computing AS Computing F452 Flow charts A program flow chart uses a diagram to show an overview of the operation of the algorithms in the system The flow chart will show –The tasks to be carried out in the new system –The devices (disk drives, tape drives etc…) that are to be used –The media input, storage and output –The files used by the system (we will look at files later this term) When a Systems Analyst is developing a new computer system, her or his ideas need to be written down. Frequently pictorial representation of how the system will work is easier to understand. TASKS Devices Input/Output

5 AS Level Computing AS Computing F452 Flow charts Flow charts use a recognised set of conventional symbols to represent how the component parts of the system will work They are used to provide an overview of the system –i.e. the order in which the steps need to be carried out A program flow chart uses a diagram to show an overview of the operation of the algorithms in the system

6 AS Level Computing AS Computing F452 Example of a systems flow chart Name the symbol boxes Process Symbol Input Symbol Decision Symbol Output Symbol Start Input Card in machine Flow lines are used to show the order in which the steps are to be carried out and connect the symbols together

7 AS Level Computing AS Computing F452 Example of a systems flow chart Carry out the 2 nd task Create a Flow Chart which will answer the 1st question in your Programming booklets. First of all refer to the homework that you did Tuesday –You have made a list of all the functions that need to be carried out when a supermarket handles the sale of goods at a electronic point of sale terminal (EPOS) Lets go through those answers first

8 AS Level Computing AS Computing F452 Task 2: Functions for the POS Draw a systems flow chart that shows how the computer system at the supermarket handles the sale of goods at the EPOS (electronic point of sale terminal). 1. Scan the barcode 2. Validate the barcode 3. This could lead to a decision: is the barcode valid – yes or no 4. Use the barcode as a key to locate the product details and decrease the stock level by one 5. Database or records are updated 6. Display product details on the screen, print product details on the receipt 7. Add cost to the total 8. Any more goods to process? – Yes or No 9. Display the total details on the screen, print total details on the receipt Now create the flow chart for Question 1 Chapter 8, Programming booklet Input Process

9 AS Level Computing AS Computing F452 Example of a systems flow chart Carry out the 3 rd task Create a flow chart which will answer the 2nd question in your Programming booklets. Make a list of all the functions that would enable a customer at a supermarket to have the option of paying for their goods by credit or debit card Lets go through those answers first

10 AS Level Computing AS Computing F452 Task 3: Functions for the POS Flow chart Number 2 The customers at a supermarket have the option of paying for their goods by credit or debit card. Draw a systems flow chart to show how this process works 1. Debit / credit card is swiped 2. Validate card number 3. Is card number valid? 4. Display rejection notice on VDU 5. Card number, amount and supermarket’s reference number sent to relevant bank 6. Print receipt. Customer confirms that the amount is correct by signing 7. Monies transferred between your account and the supermarket’s Now draw the flow chart for Question 2 Chapter 8, Programming booklet Input Process

11 AS Level Computing AS Computing F452 Task 4: Flow Chart Question Carry out the Task 4 flow chart questions on your own!Task 4 Answers

12 AS Level Computing AS Computing F452 Summary What is an Algorithm? –Section / set of instructions (procedures) that the computer needs to execute to solve the problem What are flow chart symbols? Which two of the following are not true. Used to show the order of the steps The tasks to be carried out in the new system Connects the Network components together Connect the symbols The media: input, storage and output The devices like disk drives and tape drives The resolution of the monitor The amount of bytes in a piece of data What are flow lines in the flow chart? Choose two answers. TRUE WRONG

13 AS Level Computing AS Computing F452 Pseudo-code Pseudo-code is lines of code to show how the system will work. It does not need to use the exact commands used in a real programming language, as long as it shows how the program will work. The programmer can later turn the pseudo-code into real code. It allows programmers to plan out their ideas without getting bogged down in the technicalities of a particular language. It can be used to write code in a very detailed way or just to provide an overview. It is important to be consistent when writing pseudo-code. You are inventing the code, but you have a standard way of writing the code. For example, you can’t use the command Output in one part of the code and then Display in another part of the code where the meaning is the same.


Download ppt "AS Level Computing 8 CHAPTER: Fundamentals of structured programming The basics of good programming Algorithms System Flow Charts Symbol Conventions Steps."

Similar presentations


Ads by Google