SlideShare a Scribd company logo
1 of 13
PROGRAM DESIGN
Higher Computing Science
DESIGN
• The modular design of a software solution can be carried out in three
stages:
• Top level design
• the main steps that the program will carry out
• each of the main steps will become a sub-program
• Data flow
• shows the data that flows IN and OUT of each sub-program
• data IN – will be passed as a parameter from the main program into the sub-
program
• data OUT – will be returned from the sub-program back to the main program
• Refinements
• a break down of each of the main steps from the top level design
DESIGN EXAMPLE 1
Design a program that displays the leading driver in the Formula 1
championship. The program should:
• read the driver name and their number of points from a file
• work out the driver with the most points
• display the leading driver, and their number of points
TOP LEVEL DESIGN
(STRUCTURE DIAGRAM)
Leading
driver
Read drivers
and points
from file
Work out driver
with most
points
Display
leading driver
and their
points
DATA FLOW (STRUCTURE DIAGRAM)
Leading
driver
Read drivers
and points
from file
Work out driver
with most
points
Display
leading driver
and their
points
driver
array
points
array
points
array
position position
driver
array
REFINEMENTS (STRUCTURE DIAGRAM)
Leading
driver
Read drivers and
points from file
Work out driver with
most points
Display leading
driver and their
points
Open
drivers
file
Loop for
drivers
Read name
into array
Read
points into
array
Close
drivers
file
Set max
to
points[0]
Loop for
remaining
drivers
Display
driver[position]
Display
points[position
]
points >
max?
set max to
points
store position
DESIGN EXAMPLE 2
Design a program that asks the user to enter the temperature for 7 days,
and then calculates the highest and lowest temperatures.
TOP LEVEL DESIGN (PSEUDOCODE)
1. Get daily temperatures
2. Calculate highest temperature
3. Calculate lowest temperature
4. Display highest and lowest temperatures
DATA FLOW (PSEUDOCODE)
1. Get daily temperatures
• OUT: array of temperatures
2. Calculate highest temperature
• IN: array of temperatures
• OUT: highest temperature
3. Calculate lowest temperature
• IN: array of temperatures
• OUT: lowest temperature
4. Display highest and lowest temperatures
• IN: highest temperature, lowest temperature
REFINEMENTS (PSEUDOCODE)
1. Get daily temperatures
1.1 LOOP 7 TIMES
1.2 GET daily temperature FROM KEYBOARD
1.3 STORE daily temperature IN temperatures_array
REFINEMENTS (PSEUDOCODE)
2. Calculate highest temperature
1.1 SET highest_temp TO 1st element in temperatures_array
1.2 LOOP WITH counter FROM 2nd array element TO 7th array element
1.3 IF temperatures_array[counter] > highest_temp THEN
1.4 SET highest_temp TO temperatures_array[counter]
1.5 END IF
1.6 END LOOP
REFINEMENTS (PSEUDOCODE)
3. Calculate lowest temperature
1.1 SET lowest_temp TO 1st element in temperatures_array
1.2 LOOP WITH counter FROM 2nd array element TO 7th array element
1.3 IF temperatures_array[counter] < lowest_temp THEN
1.4 SET lowest_temp TO temperatures_array[counter]
1.5 END IF
1.6 END LOOP
REFINEMENTS (PSEUDOCODE)
4. Display highest and lowest temperatures
1.1 DISPLAY highest_temp
1.2 DISPLAY lowest_temp

More Related Content

Similar to Program Design

C++ advanced PPT.pdf
C++ advanced PPT.pdfC++ advanced PPT.pdf
C++ advanced PPT.pdfDinashMaliya3
 
Cs1123 2 comp_prog
Cs1123 2 comp_progCs1123 2 comp_prog
Cs1123 2 comp_progTAlha MAlik
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor ManagementDamian T. Gordon
 
VLSI Introduction to PSPICE
VLSI Introduction to PSPICEVLSI Introduction to PSPICE
VLSI Introduction to PSPICEAbhishekvb
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsnoahjamessss
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringscskvsmi44
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures Ahmad Idrees
 
Operating Systems: Processor Management
Operating Systems: Processor ManagementOperating Systems: Processor Management
Operating Systems: Processor ManagementDamian T. Gordon
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptxTadiwaMawere
 
1_Basic Structure of Computers.pptx
1_Basic Structure of Computers.pptx1_Basic Structure of Computers.pptx
1_Basic Structure of Computers.pptxKarthikChavan5
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6helpido6
 
Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6ashhadiqbal
 
3 modularisation and bdc
3 modularisation and bdc3 modularisation and bdc
3 modularisation and bdcSiva Kumar
 
Chap6 procedures &amp; macros
Chap6 procedures &amp; macrosChap6 procedures &amp; macros
Chap6 procedures &amp; macrosHarshitParkar6677
 
Java developer trainee implementation and import
Java developer trainee implementation and importJava developer trainee implementation and import
Java developer trainee implementation and importiamluqman0403
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxAnasYunusa
 

Similar to Program Design (20)

C++ advanced PPT.pdf
C++ advanced PPT.pdfC++ advanced PPT.pdf
C++ advanced PPT.pdf
 
Cs1123 2 comp_prog
Cs1123 2 comp_progCs1123 2 comp_prog
Cs1123 2 comp_prog
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
 
VLSI Introduction to PSPICE
VLSI Introduction to PSPICEVLSI Introduction to PSPICE
VLSI Introduction to PSPICE
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
02.softwareengr.ppt
02.softwareengr.ppt02.softwareengr.ppt
02.softwareengr.ppt
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
 
Operating Systems: Processor Management
Operating Systems: Processor ManagementOperating Systems: Processor Management
Operating Systems: Processor Management
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptx
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
1_Basic Structure of Computers.pptx
1_Basic Structure of Computers.pptx1_Basic Structure of Computers.pptx
1_Basic Structure of Computers.pptx
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6
 
Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6
 
3 modularisation and bdc
3 modularisation and bdc3 modularisation and bdc
3 modularisation and bdc
 
Chap6 procedures &amp; macros
Chap6 procedures &amp; macrosChap6 procedures &amp; macros
Chap6 procedures &amp; macros
 
Cs 1114 - lecture-2
Cs 1114 - lecture-2Cs 1114 - lecture-2
Cs 1114 - lecture-2
 
Java developer trainee implementation and import
Java developer trainee implementation and importJava developer trainee implementation and import
Java developer trainee implementation and import
 
Lecture1
Lecture1Lecture1
Lecture1
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 

More from Forrester High School (20)

Database Evaluation
Database EvaluationDatabase Evaluation
Database Evaluation
 
Testing SQL
Testing SQLTesting SQL
Testing SQL
 
SQL
SQLSQL
SQL
 
Database Query Design
Database Query DesignDatabase Query Design
Database Query Design
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
Compound Keys
Compound KeysCompound Keys
Compound Keys
 
Entity Occurrence Diagrams
Entity Occurrence DiagramsEntity Occurrence Diagrams
Entity Occurrence Diagrams
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
 
Python Predefined Functions
Python Predefined FunctionsPython Predefined Functions
Python Predefined Functions
 
Python Substrings
Python SubstringsPython Substrings
Python Substrings
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
 
Records in Python
Records in PythonRecords in Python
Records in Python
 
SDD Predefined Functions
SDD Predefined FunctionsSDD Predefined Functions
SDD Predefined Functions
 
SDD Cconditional Loops
SDD Cconditional LoopsSDD Cconditional Loops
SDD Cconditional Loops
 
SDD Fixed Loops
SDD Fixed LoopsSDD Fixed Loops
SDD Fixed Loops
 
SDD Conditional Statements
SDD Conditional StatementsSDD Conditional Statements
SDD Conditional Statements
 
SD & D Arithmetic Operators
SD & D Arithmetic OperatorsSD & D Arithmetic Operators
SD & D Arithmetic Operators
 
N5 security precautions
N5 security precautionsN5 security precautions
N5 security precautions
 

Recently uploaded

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 

Recently uploaded (20)

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 

Program Design

  • 2. DESIGN • The modular design of a software solution can be carried out in three stages: • Top level design • the main steps that the program will carry out • each of the main steps will become a sub-program • Data flow • shows the data that flows IN and OUT of each sub-program • data IN – will be passed as a parameter from the main program into the sub- program • data OUT – will be returned from the sub-program back to the main program • Refinements • a break down of each of the main steps from the top level design
  • 3. DESIGN EXAMPLE 1 Design a program that displays the leading driver in the Formula 1 championship. The program should: • read the driver name and their number of points from a file • work out the driver with the most points • display the leading driver, and their number of points
  • 4. TOP LEVEL DESIGN (STRUCTURE DIAGRAM) Leading driver Read drivers and points from file Work out driver with most points Display leading driver and their points
  • 5. DATA FLOW (STRUCTURE DIAGRAM) Leading driver Read drivers and points from file Work out driver with most points Display leading driver and their points driver array points array points array position position driver array
  • 6. REFINEMENTS (STRUCTURE DIAGRAM) Leading driver Read drivers and points from file Work out driver with most points Display leading driver and their points Open drivers file Loop for drivers Read name into array Read points into array Close drivers file Set max to points[0] Loop for remaining drivers Display driver[position] Display points[position ] points > max? set max to points store position
  • 7. DESIGN EXAMPLE 2 Design a program that asks the user to enter the temperature for 7 days, and then calculates the highest and lowest temperatures.
  • 8. TOP LEVEL DESIGN (PSEUDOCODE) 1. Get daily temperatures 2. Calculate highest temperature 3. Calculate lowest temperature 4. Display highest and lowest temperatures
  • 9. DATA FLOW (PSEUDOCODE) 1. Get daily temperatures • OUT: array of temperatures 2. Calculate highest temperature • IN: array of temperatures • OUT: highest temperature 3. Calculate lowest temperature • IN: array of temperatures • OUT: lowest temperature 4. Display highest and lowest temperatures • IN: highest temperature, lowest temperature
  • 10. REFINEMENTS (PSEUDOCODE) 1. Get daily temperatures 1.1 LOOP 7 TIMES 1.2 GET daily temperature FROM KEYBOARD 1.3 STORE daily temperature IN temperatures_array
  • 11. REFINEMENTS (PSEUDOCODE) 2. Calculate highest temperature 1.1 SET highest_temp TO 1st element in temperatures_array 1.2 LOOP WITH counter FROM 2nd array element TO 7th array element 1.3 IF temperatures_array[counter] > highest_temp THEN 1.4 SET highest_temp TO temperatures_array[counter] 1.5 END IF 1.6 END LOOP
  • 12. REFINEMENTS (PSEUDOCODE) 3. Calculate lowest temperature 1.1 SET lowest_temp TO 1st element in temperatures_array 1.2 LOOP WITH counter FROM 2nd array element TO 7th array element 1.3 IF temperatures_array[counter] < lowest_temp THEN 1.4 SET lowest_temp TO temperatures_array[counter] 1.5 END IF 1.6 END LOOP
  • 13. REFINEMENTS (PSEUDOCODE) 4. Display highest and lowest temperatures 1.1 DISPLAY highest_temp 1.2 DISPLAY lowest_temp