level 3 computing year 1 lecturer: phil smithwiki.computing.hct.ac.uk/_media/computing/btec/... ·...

24
Level 3 Computing Year 1 Lecturer: Phil Smith

Upload: others

Post on 23-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Level 3 Computing

Year 1

Lecturer: Phil Smith

Page 2: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Learning outcomes Now we will continue to learn about tools for software design.

Inputs and outputs.

Tools. Structure diagrams.

Data flow diagrams.

This is learning outcome 3 “Be able to use tools to demonstrate software designs”.

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 3: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Structure Diagrams

Structured charts are hierarchical and are used to display a breakdown of components to a reasonable level of detail. This means for each web page and the functions it contains with a reference to the specification.

You will also need to document the development platform and version, the language used and version of your solution.

Page 4: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Design – Data structure diagram

Data Structure Diagram (DSD) is a diagram of the conceptual data model.

The basic graphic notation elements of DSDs are boxes which represent entities. The arrow symbol represents relationships. Data structure diagrams are most useful for documenting complex data entities.

Page 5: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

DSD for simple web site For example - Structured Chart

Page 6: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Design – Data structure diagram

Page 7: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Design – Data structure diagram

Structure charts show module structure and calling relationships. In a multi-threaded system, each task (thread of execution) is represented as a structure chart. Large structure charts are levelled into a stack of connected diagrams.

Structure charts omits the detail that you find in flow charts.

You would still do a flow chart but of each path in the diagram.

Page 8: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Design – Data structure diagram Task 1

Do a data structure diagram for the requirements provided in Assignment 3.

Page 9: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams DFD’s (Data Flow Diagrams) are used to identify and understand how data flows into (input) and out of (output) a system.

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 10: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams Suppose you are given the details of a small mail order

catalogue system that allows people to shop from home. When a customer receives the catalogue and wants to buy something, they can telephone, fax or email their order to the company. The company gets the order and sends the goods and an invoice. When the customer receives the goods with a delivery note, they send payment and receive a receipt for their payment.

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 11: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams The first thing we must do is model the main outputs

and sources of data in the scenario above.

Then we draw the system box and name the system.

Next we identify the information that is flowing to the system and from the system.

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 12: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams Here is the Level 0 (also known as the context diagram) DFD for the Mail Order system:

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 13: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams You will see that the Customer (a source of information)

has sent in an order.

The system has sent out an invoice data flow, a delivery note data flow and goods ('goods' is not information; it is shown as a double-headed arrow because it is a physical or resource data flow).

Payment comes in - ie a payment data flow is received, and a receipt data flow goes out to the customer.

Catalogue goes out to the customer - this is also a physical data flow.

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 14: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams Activity - Draw a DFD for the Mosspark surgery

When a patient arrives at Mosspark Surgery with a repeat prescription request, the receptionist checks the prescription file and writes out a prescription. This has to be authorised by the doctor before being passed to the resident chemist for dispensing. The chemist then gives the prescription to the patient. If the patient is entitled to free prescriptions, the chemist verifies this and fills in the appropriate details on a form, which is filed in the free prescriptions file. Otherwise the chemist takes the appropriate amount of money from the patient and gives them a receipt.

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 15: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data flow diagrams Task 1

Your answer should be similar to mine:

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith

Page 16: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Context Diagram First DFD in every business process

Shows the context into which the business process fits

Shows the overall business process as just one process (process 0)

Shows all the external entities that receive information from or contribute information to the system

Page 17: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Level 0 Diagram Shows all the major processes that comprise the

overall system – the internal components of process 0

Shows how the major processes are interrelated by data flows

Shows external entities and the major processes with which they interact

Adds data stores

Page 18: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Level 1+ Diagrams Generally, one level 1 diagram is created for every major

process on the level 0 diagram

Shows all the internal processes that comprise a single process on the level 0 diagram

Shows how information moves from and to each of these processes

If a parent process is decomposed into, for example, three child processes, these three child processes wholly and completely make up the parent process

Level 2 Diagrams

Shows all processes that comprise a single process on the level 1 diagram

And so on

Page 19: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Data Flow Diagrams DFDs are one of the main methods available for

analyzing data-oriented systems.

DFDs emphasize the logic underlying the system.

The systems analysts can put together a graphical representation of data movement through the organization.

Page 20: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Advantages of the Data Flow Diagram Approach Four advantages over narrative explanations of data

movement: Freedom from committing to the technical

implementation too early.

Understanding of the interrelationships of systems and subsystems.

Communicating current system knowledge to users.

Analysis of the proposed system.

Page 21: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Basic Symbols Four basic symbols are:

A double square for an external entity--a source or destination of data.

An arrow for movement of data from one point to another.

A rectangle with rounded corners for the occurrence of transforming process.

An open-ended rectangle for a data store.

Page 22: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Basic Symbols

Page 23: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Level 1 Diagrams Task 2

Now do a Context diagram for the scenario in assignment 3.

Sorry but I cannot give you an answer for this one.

Page 24: Level 3 Computing Year 1 Lecturer: Phil Smithwiki.computing.hct.ac.uk/_media/computing/btec/... · When a patient arrives at Mosspark Surgery with a repeat prescription request, the

Summary

Today we learnt about –

Dataflow diagrams.

Next we shall learn about –

Flow charts

Pseudo code

BTEC Level 3 Year 1 - Unit 6 Software Design and Development, Phil Smith