Week 1and 2 SG Unit 1 pp. 1-33 TB. Chapter 3 PRINCIPLES OF PROCEDURAL PROGRAMMING.
-
Upload
elaine-heath -
Category
Documents
-
view
223 -
download
2
Transcript of 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
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
4 Main Sections in Outline LO1: Principles [Unit 1] LO2: Design [Unit 2] LO3: Implement [Unit 3] LO4: Test [Unit 4]
Principles LO1: Understand the principles of
procedural programming Discuss the principles Discuss the characteristics Discuss the features 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
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
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
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
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
1 Characteristics of Programming p.17 Low-level languages High-level languages Generations, e.g. 1st, 2nd, 3rd, 4th, 5th Programs Applications Instructions Algorithms
2 Types of languages p.21 Procedural languages Object-oriented Event-driven Others e.g. script and mark-up languages Simple overviews and uses
3 Reasons for choice p. 22 Organisational policy Suitability of features and tools Availability of trained staff Reliability Development and maintenance costs Expandability
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
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
6 Programming Syntax and Standards p. 25 Command rules Variable declaration Use of comments Code layout Indentation
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
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!