Upload
melvin-oneal
View
230
Download
0
Embed Size (px)
DESCRIPTION
Analysis is about understanding the problem. Start by describing the problem, as you see it, in your own words as clearly and concisely as possible. Identify all required inputs. (external information) Identify all required processes. (calculations, decisions, comparisons) Identify all required outputs. (anything which must be shown on the screen or output in any other way)
Citation preview
REVISION INFORMATION Software Development Life Cycle Software Development Tools High Level Programming:
Structures Algorithms Iteration Pseudocode
Order of Priority and Relational Operators
SOFTWARE DEVELOPMENT LIFE CYCLE
A
Dance
In
The
Dark
Every
Monday
ANALYSISAnalysis is about understanding the problem.
Start by describing the problem, as you see it, in your own words as clearly and concisely as possible.
Identify all required inputs. (external information)
Identify all required processes. (calculations, decisions, comparisons)
Identify all required outputs. (anything which must be shown on the screen or output in any other way)
DESIGNAt this stage the designers will set out how the problem will be solved. They will design various aspects of the program using:
storyboards testplan pseudocode graphical design notation (flowcharts)
shows the overall structure of the program clearly
IMPLEMENTATION
Actually writing all the program code using a software development program e.g. Java, C++, Visual Basic.
Software development programs provide a text editor that you use to write high level language code
TESTING normal conditions
the program does what it should do with normal input e.g. the user has to enter a number between 1 and 100
extreme conditionsthe program can handle situations that are at the edge of what would be considered normal
exceptional conditions it can handle inputs that it has not been designed to cope with
e.g. A program is being written to record scores rolled on a six-sided dicethe most suitable set of test data : 3, 1, 0, 7, 6, 2
DOCUMENTATION
The types of documentation generated at this stage often include:
technical guide information about the spec of computer required
user guide step by step guide on how to use the program description of the features of the software
EVALUATION
checking whether the program is readable
does the solution solve the problem
the issues encountered
the issues outstanding
recommendations for improvement
MAINTENANCEprogram maintenance may be required when
new bugs are uncovered by the end-user
new requirements are identified at a later date the client requires the original solution to be
integrated with other systems
TRANSLATORSTranslates high level languages (written by humans) into machine code (understood by processors)
There are two main types of translator programs.
Compiler translates a program into machine code (commands that are
written in ones and zeroes)
Interpreter does the same as a compiler but one line at a time
SCRIPTING LANGUAGE AND MACROS
Small programs called macros can be developed within some application packages e.g. Word Processing, Spreadsheets.
The macro is actually coded in a scripting language called Visual BASIC for Applications(VBA)
A Macro is a set of commands activated by a single keystroke.
PRE-DEFINED FUNCTIONSThere are some standard pre-defined functions that you may
want to use in your programs.
Pre-defined functions: greatly speed up program development
Int takes a number and removes any fractional part leaving the whole
number part isKeyDown
retrieves keyboard input
STANDARD ALGORITHMSAn algorithm is a finite sequence of steps that solves a specific problem. For this unit, you need to know about 4 standard algorithms.
finding a minimum finding a maximum counting occurrences linear search
STANDARD ALGORITHMSExample: a list of daily midday temperatures recorded at a weather station during February 2003
The find a minimum algorithm would search through all the daily temperatures in the list, and find the lowest one i.e. (2°C)
date 1 2 3 4 5 6 7 8 9 10
11
12
13
14
temperature (°C)
4 6 5 7 11
9 8 5 3 4 3 6 7 4
date 15
16
17
18
19
20
21
22
23
24
25
26
27
28
temperature (°C)
5 6 2 3 8 6 12
10
11
9 6 11
8 6
STANDARD ALGORITHMS
find maximum works its way through a list of numbers and finds the number with the highest value i.e. (12°C) counting occurrences
counts how many occurrences of a given value there are in the list
Linear search searches through a list looking for a particular item and
reports where the item is found
ARRAYS
All of the standard algorithms which you met in the last slides operate on a list of data items.
We will see how a computer program can store a list of items
ARRAYSSuppose a program was required which would prompt the user to enter and store the names and scores for nine dart players.Variables required:first_name, second_name, third_name, fourth_name …… ninth_name (all strings)
first_score, second_score, third_score, fourth_score …… ninth_score (all numbers).
ARRAYS
Instead of creating 18 individual variables you create 2 arrays:
An array of strings: string[] names = new string[5];
An array of numbersint[] marks = new int[5];
LOOPS Fixed loop the number of times a section of code is to be repeated is fixed in
advanceFor(i=0; i<5; i++) {Lines of code}
Conditional loop A section of code in a program is to be repeated until a
particular item of data is entered by the user while (i < 10)
{Lines of code}
BODMASBRACKETS, OPEN, DIVIDE, MULTIPLY, ADD, SUBTRACT
Arithmetic operators +, -, *, /
Which one of the following would be the output from the line of program code below?
PRINT 5 + 3 * 4 – 1 312416
RELATIONAL OPERATORS== != > < >= <=
A ticket program will give a discount if the person is under 16 or if the person is 65 and over
Age > 65 AND age < 16Age > 65 OR age < 16Age > = 65 AND age < 16Age > = 65 OR age < 16
PSEUDOCODEMix of English and programming language and can help when converting to code
let score be 24if score is greater than or equal to 30 display “A Pass”if score is greater than or equal to 24 and less than 30 display “B Pass”if score is greater than or equal to 16 and less than 24 display “C Pass”if score is less than 16 display “Fail”
In the code sample above, what type of statement is the first line? let score be 23
Conditional loopFixed loopConditional statementAssignment
What is the output on screen from the code section above?
A PassB PassC PassFail
What program construct is being used in the section of pseudocode shown above?
A fixed loopA conditional loopConditional statementsAn arithmetical operation