Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

17
Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING

Transcript of Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Page 1: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Week 1and 2SG Unit 1 pp. 1-33TB. Chapter 3

PRINCIPLES OF PROCEDURAL PROGRAMMING

Page 2: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

General Outline Core of commercial application

development projects Also used by event-driven systems and

object-oriented platforms Where? Critical command content –

objects, events, listeners Many languages We’ll explore underpinnings

Page 3: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

4 Main Sections in Outline LO1: Principles [Unit 1] LO2: Design [Unit 2] LO3: Implement [Unit 3] LO4: Test [Unit 4]

Page 4: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Principles LO1: Understand the principles of

procedural programming Discuss the principles Discuss the characteristics Discuss the features of procedural

programming

Page 5: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Design LO2: Be able to design procedural

programming solutions Identify the program units and data and

file structures required to implement a given design

Design a procedural programming solution for a given problem

Page 6: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Implement LO3: Be able to implement procedural

programming solutions Select and implement control structures

to meet the design algorithms Correctly use parameter passing

mechanisms Implement a procedural programming

solution based on a prepared design

Page 7: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Test (1) LO4: Be able to test procedural

programming solutions Critically review and test a procedural

programming solution Analyse actual test results against

expected results to identify discrepancies

Page 8: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Test (2) Evaluate independent feedback on a

developed procedural program solution and make recommendations for improvements

Create onscreen help to assist the users of a computer program

Create documentation for the support and maintenance of a computer program

Page 9: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Now let’s get started with LO1: The Principles Characteristics of programming Types of languages Reasons for choice Data structures Data types Programming syntax and standards

Page 10: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

1 Characteristics of Programming p.17 Low-level languages High-level languages Generations, e.g. 1st, 2nd, 3rd, 4th, 5th Programs Applications Instructions Algorithms

Page 11: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

2 Types of languages p.21 Procedural languages Object-oriented Event-driven Others e.g. script and mark-up languages Simple overviews and uses

Page 12: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

3 Reasons for choice p. 22 Organisational policy Suitability of features and tools Availability of trained staff Reliability Development and maintenance costs Expandability

Page 13: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

4 Data Structures Variables, e.g. naming conventions, local and

global variables, arrays (one-dimensional, two-dimensional)

File structures; loops, e.g. conditional (pre-check, post-check, break-points), fixed

Conditional statements; Case statements Logical operators Assignment statements Input statements Output statements

Page 14: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

5 Data Types p. 23

Constants and literals Integer Floating point Byte Date Boolean Others e.g. character, string, small int Choice of data types, e.g. additional

validation, efficiency of storage

Page 15: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

6 Programming Syntax and Standards p. 25 Command rules Variable declaration Use of comments Code layout Indentation

Page 16: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Test Your Knowledge p. 331. In your own words, discuss the reasons

behind the choice of language2. What is the main difference between OOP

and event-driven programming? 3. Distinguish between high and low-level

programming languages and give examples of each

Page 17: Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.

Resources Study Guide – links to Gaddis (2003) Gaddis, T. 2013. Starting out with

programming logic and design. 3rd edition http://www.cplusplus.com/doc/tutorial/ http://www.cprogramming.com/

[Notice the 2 languages: C++ and C] homework!