unit 16 procedural programmingwiki.hct.ac.uk/_media/computing/btec/level3/l3-u16-a2-analysis.pdf ·...

17
UNIT 16 PROCEDURAL PROGRAMMING LEVEL 3 COMPUTING YEAR 2 LECTURER: PHIL SMITH

Upload: others

Post on 07-Feb-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

UNIT 16PROCEDURAL PROGRAMMING

LEVEL 3 COMPUTING

YEAR 2

LECTURER: PHIL SMITH

INTRODUCTION

• Assignment 2

• The design and development task seem quite challenging.

• However, if you take a systematic approach to understand the requirements then the process of design is much simpler.

TODAY

• We need to review the assignment brief and then to analyse the requirements in order to begin the design phase.

• So today we will go through a structured approach to identifying just what it is we need to design and then develop.

• We should be able to identify components (variables) and actions that we can then continue to flowchart.

SYSTEMS ANALYSIS FOR ASSIGNMENT 2

• The assignment brief provides a set of high level requirements.

• Along with these requires are a set of support files to aid in the design and development of a solution.

SYSTEMS ANALYSIS FOR ASSIGNMENT 2

• In order to properly understand what it is we need to design and develop a computer program all information must be used at the design phase.

• This is what systems analysis is.• The study of an activity or procedure to determine the desired end and the most efficient

method of obtaining this end.

• Systems analysis is a step by step approach to understanding requirements and identifying components.

SYSTEMS ANALYSIS FOR ASSIGNMENT 2

• From the assignment brief –

• If there is any duplication we can ignore it! We can also high light important points.

SYSTEMS ANALYSIS FOR ASSIGNMENT 2• In addition to the assignment brief requirements we also have a file “floor

plan.pptx” which provides details of the vehicle and it sensors and a sample factory layout.

• We also have details about factory stations.

• We shall be doing a few tasks and we need to record what we find.

•Task• Download from the wiki a blank analysis document for your use.

TASK 1 DESIGN

• Step 1 in our analysis is to identify the inputs and outputs.

• Use the information from the brief and from the floor plan file to list the inputs and outputs.

• 5 minutes for this task.

TASK 1 DESIGN

• What inputs and outputs did you discover.

Input sensors readings from the car.

Input from the maze on crash condition.

Input from an operator to start the vehicle(program).

Input from an operator to navigate the vehicle.

Input from an operator to record station to file?

DESIGN

• Now we need to identify the variables.

• Remember the easy way to do this is to identify the nouns and adjectives.

• A noun is a word for a person, place, or thing.

• Adjectives are describing words.

TASK 2 DESIGN

• Step 2 Identify the variables by looking for nouns and adjectives in the information you have.

• Try and add a data type to each one.

• Extension: Can you state the scope of the variable (local or global) with a reason.

• 10 minutes for this task.

TASK 2 DESIGN

• What variables did you find.

Examples.

Vehicle or car.

Maze.

Car sensors (Left, straight on and right)

Car status (at end – Finished) Use to control the loop

Whichway – string to tell the car to move into a particular direction.

List – data type List contusing whole numbers) for station IDs

Result of move – Boolean, indication of successful move or crash)

DESIGN

• Now we need to identify the actions our program will need to do.

• Again the easy way to spot these in the information we have is to look for the verbs.

• Verbs are doing words. In computer programming a verb can express an action such as command buttons and processes.

TASK 3 DESIGN

• Step 3 identify the actions our program will need to do.

• Use the information to identify the actions needed from the information required.

• 5 minutes for this task.

• Extension. Can any of the actions be accomplished using functions?

TASK 3 DESIGN

• What actions did you find?

1. Start program.

2. Move car. - could be a function – needs a direction

3. End outward journey.

4. End return journey.

5. Read sensors

6. Determine next move.

7. etc

DESIGN

• Now we can return to the flow chart started before Christmas.

• Continue with your flow chart.

SUMMARY

• We learnt that systems analysis will enable the design process to start and make good progress.

• That we can start producing design diagrams (flowcharts) with a much better understanding of what is actually needed to be done.

• That systems analysis can reduce the risk of developing features considered to be nice to have.