0% found this document useful (0 votes)
73 views

4.1 Fundamentals of Programming

This document outlines fundamentals of programming including data types, programming concepts, arithmetic operations, relational operations, Boolean operations, constants and variables, string handling operations, random number generation, exception handling, subroutines, parameters, returning values from subroutines, local and global variables, recursive techniques, and programming paradigms including procedural and object-oriented programming. It provides details on object-oriented programming concepts like classes, objects, inheritance, polymorphism and design principles.

Uploaded by

louistestevens
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

4.1 Fundamentals of Programming

This document outlines fundamentals of programming including data types, programming concepts, arithmetic operations, relational operations, Boolean operations, constants and variables, string handling operations, random number generation, exception handling, subroutines, parameters, returning values from subroutines, local and global variables, recursive techniques, and programming paradigms including procedural and object-oriented programming. It provides details on object-oriented programming concepts like classes, objects, inheritance, polymorphism and design principles.

Uploaded by

louistestevens
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

4.1 Fundamentals of
programming
Status

4.1.1 Programming
4.1.1.1 Data types
Understand the concept of a data type.

Understand and use the following appropriately:

integer

real/float

Boolean

character

string

date/time

pointer/reference

4.1 Fundamentals of programming 1


records (or equivalent)

arrays (or equivalent)

Define and use user-defined data types based on language-defined (built-in)


data types.

4.1.1.2 Programming concepts


Use, understand and know how the following statement types can be combined
in programs:

variable declaration

constant declaration

assignment

iteration

selection

subroutine (procedure/function)

Use definite and indefinite iteration, including indefinite iteration with the
condition(s) at the start or the end of the iterative structure. A theoretical
understanding of condition(s) at either end of an iterative structure is required,
regardless of whether they are supported by the language being used.

Use nested selection and nested iteration structures.

Use meaningful identifier names and know why it is important to use them.

4.1.1.3 Arithmetic operations in a programming


language
Be familiar with and be able to use:

addition

subtraction

multiplication

real/float division

integer division, including remainders

exponentiation

4.1 Fundamentals of programming 2


rounding

truncation

4.1.1.4 Relational operations in a programming


language
Be familiar with and be able to use:

equal to

not equal to

less than

greater than

less than or equal to

greater than or equal to

4.1.1.5 Boolean operations in a programming


language
Be familiar with and be able to use:

NOT

AND

OR

XOR

4.1.1.6 Constants and variables in a programming


language
Be able to explain the differences between a variable and a constant.

Be able to explain the advantages of using named constants.

4.1.1.7 String-handling operations in a programming


language
Be familiar with and be able to use:

length

4.1 Fundamentals of programming 3


position

substring

concatenation

character → character code

character code → character

string conversion operations

Expected string conversion operations:

string to integer

string to float

integer to string

float to string

date/time to string

string to date/time

4.1.1.8 Random number generation in a programming


language
Be familiar with, and be able to use, random number generation.

4.1.1.9 Exception handling


Be familiar with the concept of exception handling.

Know how to use exception handling in a programming language with which


students are familiar.

4.1.1.10 Subroutines (procedures/functions)


Be familiar with subroutines and their uses.

Know that a subroutine is a named ‘out of line’ block of code that may be
executed (called) by simply writing its name in a program statement.

Be able to explain the advantages of using subroutines in programs.

4.1.1.11 Parameters of subroutines

4.1 Fundamentals of programming 4


Be able to describe the use of parameters to pass data within programs.

Be able to use subroutines with interfaces.

4.1.1.12 Returning a value/values from a subroutine


Be able to use subroutines that return values to the calling routine.

4.1.1.13 Local variables in subroutines


Know that subroutines may declare their own variables, called local variables,
and that local variables:

exist only while the subroutine is executing

are accessible only within the subroutine.

Be able to use local variables and explain why it is good practice to do so

4.1.1.14 Global variables in a programming language


Be able to contrast local variables with global variables.

4.1.1.15 Role of stack frames in subroutine calls


Be able to explain how a stack frame is used with subroutine calls to store:

return addresses

parameters

local variables

4.1.1.16 Recursive techniques


Be familiar with the use of recursive techniques in programming languages
(general and base cases and the mechanism for implementation).

Be able to solve simple problems using recursion

4.1.2 Programming paradigms


4.1.2.1 Programming paradigms

4.1 Fundamentals of programming 5


Understand the characteristics of the procedural- and object-oriented
programming paradigms, and have experience of programming in each

3.1.2.2 Procedural-oriented programming


Understand the structured approach to program design and construction.

Be able to construct and use hierarchy charts when designing programs.

Be able to explain the advantages of the structured approach

3.1.2.3 Object-oriented programming


Be familiar with the concepts of:

class

object

instantiation

encapsulation

inheritance

aggregation

composition

polymorphism

overriding.

Students should know that:

a class defines methods and property/attribute fields that capture the


common behaviours and characteristics of objects

objects based on a class are created using a constructor, implicit or explicit,


and a reference to the object assigned to a reference variable of the class type

in the Unified Modelling Language (UML) composition is represented by a


black diamond line and aggregation by a white diamond line

Know why the object-oriented paradigm is used.

Be aware of the following object-oriented design principles:

encapsulate what varies

favour composition over inheritance

4.1 Fundamentals of programming 6


program to interfaces, not implementation

Students would benefit from practical experience of programming to an interface,


but will not be explicitly tested on programming to interfaces or be required to
program to interfaces in any practical exam.

Be able to write object-oriented programs.

Practical experience of coding for user-defined classes involving:

abstract, virtual and static methods

inheritance

aggregation

polymorphism

public, private and protected specifiers

Be able to draw and interpret class diagrams.

Class diagrams involving single inheritance, composition (black diamond


line), aggregation (white diamond line), public (+), private (-) and protected (#)
specifiers.

4.1 Fundamentals of programming 7

You might also like