1 / 9

Advanced Higher Computing Based on Heriot-Watt University Scholar Materials

Advanced Higher Computing Based on Heriot-Watt University Scholar Materials. Comparison of OO with other languages. Lesson Objectives. Comparison of OO with Other Languages. Procedural Languages. Main Program. Subprogram A. Subprogram B. Subprogram C.

alair
Download Presentation

Advanced Higher Computing Based on Heriot-Watt University Scholar Materials

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. Procedural Languages Main Program SubprogramA Subprogram B Subprogram 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 Alford Academy Business Education and Computing

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

  6. Similarities and Differences with OO Object Oriented Declarative No rigid control structures such as loops, if then else Variables can be reassigned Data structures are dynamic ie only exists at run time 1. Prolog operates on a database – some argue that this is the same with OO where searching is part of the object 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 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 Alford Academy Business Education and Computing

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

  9. Activities • Read Scholar pp61 - 70 • Answer all Review question • Homework – Complete class work Alford Academy Business Education and Computing

More Related