Procedural Paradigm Procedural programming is normally used in











- Slides: 11

Procedural Paradigm Procedural programming is normally used in: Old space programs Website development Networking

Procedural Paradigm Advantages: It is good for general purpose programming There are various books and learning resources Able to use different compilers in order to target different CPUs: Disadvantages: There are various Procedural languages Repeated code Hard to read

Objective Oriented Paradigm Objective oriented programming is normally used in: Game development Operating systems Military

Objective Oriented Paradigm Advantages: Reusable Code Easy to fix Not time consuming Disadvantages: Very CPU heavy Complex to learn Large program

Event Driven Paradigm Event driven programming is normally used in: Flowing interfaced software Web development Hardware interacting software

Event Driven Paradigm Advantages: Graphical Software Allows user interface interact with hardware easily hardware interrupts Disadvantages: Complex Not to master very logical Code cant be reused often

3 Factors which may lead to project failure

EXAMPLE OF A SEQUENCED PROGRAM This is a sequenced code. The code runs from top to bottom with no interruptions. The code runs with no selective or iterative features. TOP BOTTOM

EXAMPLE OF A SELECTIVE PROGRAM This is a selective program. What makes this a selective program Is the fact that it has an if statement which gives the user a Different answer depending on what the user types

EXAMPLE OF AN ITERATIVE PROGRAM This is an example of an iterative program. What makes this program iterative is the fact that depending on what the user types the program will keep running or will stop.

Table of 6 data types Data Type Example Memory used(Bytes) Information and benefits of the data type Integer int Number = 55; 4 Is a data type which only holds whole numbers. This data type wont print floats(decimals). An integer is useful as it can hold a large amount of numbers however there is a limit to that. This is when the long integer is used String Text = “Hello”; 2 Is a data type which holds multiple characters such as names, sentences or even text. The string is normally used in order to instruct the user of an action he should take such as an input. Character char Text = ‘H’; 1 This data type also holds characters but only a single one. This data type is normally used in order to shorten a name. For example: Joao Vitoriano = J. V Boolean Bool switchon = True 1 The data type Boolean only outputs one of the 2 values which are True and False. This data type is normally used in iterative and selective programs Float float L = 0. 2 f; 4 This data type shows decimals but only up to 7 whole number. For example: 6. 321362. Since the float is only able to show up to digits the data type double is used in order for the program to output more digits. If an f isn’t typed at the end of the number, the float is converted to a double Array int number[3] = {2, 5, 8}; Depends on size of array An array is a way of making multiple integers, strings, etc. . in only one line of code and with only one variable name. This makes it easier and quicker to declare data types.