Presentation is loading. Please wait.

Presentation is loading. Please wait.

Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Comparison of OO with other.

Similar presentations


Presentation on theme: "Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Comparison of OO with other."— Presentation transcript:

1 Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Comparison of OO with other languages

2 Alford Academy Business Education and Computing2 Lesson Objectives Comparison of OO with Other Languages

3 Alford Academy Business Education and Computing 3 Procedural Languages Main Program Subprogram ASubprogram BSubprogram C Program is a collection of blocks or modules of code The modules (or procedures) process data (parameters) Procedures have a defined sequence of instructions and these are executed until the program ends

4 Alford Academy Business Education and Computing 4 Similarities and Differences with OO Object Oriented Procedural 1. Have control structures for iteration and selection 2. Change values of variables through assignment 3. Problem specific Modules are free standing and can be separately compiled Modules are methods that are part of a class Data and code are separate Data and code (methods) are not separate and are encapsulated into an object

5 Alford Academy Business Education and Computing 5 Declarative Languages With this type of language the computer is treated not as a machine that processes data but as a machine that can perform logic Programmer declares facts and relationships between items planet(saturn,large,900,atmosphere,rings,19). SCHOLAR Page 64

6 Alford Academy Business Education and Computing 6 Similarities and Differences with OO Object Oriented Declarative 1. Prolog operates on a database – some argue that this is the same with OO where searching is part of the object No rigid control structures such as loops, if then else Variables can be reassigned Data structures are dynamic ie only exists at run time Instantiation means to create a new object Variables are type free – ie can represent number, string, lists Instantiation is an instruction to give a variable a value

7 Alford Academy Business Education and Computing 7 Event Driven Languages In event driven environments the user executes what is known as an event procedure such as clicking a mouse or hitting a key to run part of the code They do not have a set sequence of instructions to execute Event driven programming and object oriented programming are inextricable linked to GUI systems Languages such as Java and Visual Basic provide support for event- driven programming through the use of objects, classes and methods

8 Alford Academy Business Education and Computing 8 Low Level Languages 1. Are machine dependent 2. Are difficult to program and debug 4. Demand a large expense of time on the part of the programmer 3. Are not compiled or interpreted 5. Contain no high level constructs 6. Execute extremely fast 7. Produce lines of code that have a 1:1 relationship with machine instructions

9 Alford Academy Business Education and Computing 9 Activities Read Scholar pp Answer all Review question Homework – Complete class work


Download ppt "Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Comparison of OO with other."

Similar presentations


Ads by Google