24
Dr Derek Peacock 2014 1 Introduction to Software Development by Derek Peacock

Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 1

Introduction to Software Development

by Derek Peacock

Page 2: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 2

What is a Computer ?

Electronic InformationProcessingMachine

Page 3: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 3

Basic System

InputData

(CPU)Processor

Output Data

Program

Page 4: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 4

Computer Programs

A sequence of coded instructions fed into a computer to enable it to perform specified operations upon data

Program = Set of cooperating Classes

Class = Operations and Data

Page 5: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 5

Operations

Procedures for the solution to a problem in a finite number of steps

1. Get the amount in GBP2. Get the exchange rate3. Calculate the amount in Euros4. Display the result in Euros

Page 6: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 6

Data & Data Structures

ObservationsFactsMeasurementsAttributesValuesReal or imaginary

ListsQueuesStacksTablesRecordsTrees

Page 7: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 7

Program Languages

Machine CodeC/C++/C#Visual Basic JavaPascal(Delphi)COBOLSQL

AssemblerPL/1ADASmall TalkSNOBOLFORTRANLISP

Page 8: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 8

Machine Code (Low Level)

0E E8 D9 010E E8 45 02B8 3E 01 1E50 1E 50 B8

‘AssemblerLD A, 01LD B, 02Add A, B

Total FlexibilityVery FastMany InstructionsDifficult to readDifficult to Debug

Page 9: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 9

Operations in English

Work out the equivalent amount in Euros for a given amount in GBP

Page 10: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 10

English

ImpreciseAmbiguousVery Large DictionarySame word can have different meaningsRules of grammar complex and inconsistent

Page 11: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 11

C#.NET

Easier to LearnVisual DesignObject OrientedMicrosoft Support .NET supportVisual Studio IDE

Page 12: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 12

C# Operation or Method

Console.WriteLine("Starting Convert Pounds to Euros!");Console.WriteLine();

Console.Write("Enter amount in British Pounds £ >");string value = Console.ReadLine();pounds = Convert.ToDecimal(value);euros = pounds * 1.2471m;

Console.WriteLine("Euros = {0}", euros);Console.WriteLine();Console.WriteLine("Ending Convert Pounds to Euros!");

Page 13: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 13

Java

Platform IndependentNot by Microsoft (by Oracle)Object OrientedWeb integrationVisual IDEsEnterprise Level and Mobile device support

Page 14: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 14

Java Operation

private void calculate_Euros(){inputAmount = InputTextBox.getText()exchangeRate = RateTextBox.getText()

Euros = inputAmount * exchangeRate

OutputAmountTextBox.setText(euros)

}

Page 15: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 15

C++

Leading LanguageSystems LanguageFast ExecutionObject Oriented

Main()

{

scanf(“%d”, &GBP);

scanf(“%d”, &ERate);

Euros = GBP * ERate

printf(“Euros = “);

printf(“%d”, Euros);

}

Page 16: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 16

Compilation (translatation)

High LevelLanguage

Input Program

Compiler ObjectCode

Output

Page 17: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 17

Linking (using pre-built libraries)

CompiledLibraries

MachineCodeLinker

ObjectCode

Input Program Output

Page 18: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 18

Execution (Run Program)

Input Program Output

Data MachineCode Results

Page 19: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 19

Software Development Life Cycle

Terms of Reference

RequirementsAnalysis

Software Design

Implementation

Testing

What ? (Outline)

What ? (Detail)

How ?

Page 20: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 20

Terms of Reference

I need a program that I can use to calculate how many euros I will get for a given amount of British currency.

Page 21: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 21

User Requirements

Page 22: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 22

Software Design

EnterPounds

CalculateEuros

DisplayEuros

Page 23: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 23

Delphi Implementation

procedure ConvertToEuros();var

pounds : currency;euros : currency;ExchangeRate : Double;

begin

pounds := GbpTextBox.Text;ExchangeRate := ExchangeRateTextBox.text;

euros := pounds * ExchangeRate;

EurosTextBox.Text := “Euros = ” & euros;

end;

Page 24: Introduction to Software Development - valerianweb.com · Introduction to Software Development by Derek Peacock. Dr Derek Peacock 2014 2 What is a Computer ?

Dr Derek Peacock 2014 24

Testing

Function Tested

Data Used Expected Result

Actual Result

Calculate GBP = 400Rate = 1.5

Euros = 600 Euros = 600

Calculate GPB = Rate =

Error Message

Error Message

Calculate GPB = -400Rate = 1.5

Error Message

Euros = -600