Mindmap
3.3.6 Programming language paradigms
Inhalt der Mindmap
3.3.6 Programming language paradigms
Types of language
- First gen
- A.K.A binary or machine code
- Difficult to write and debug
- Because it's all in numbers, it's easy to make errors.
- Very fast execution speeds
- Uses numeric addresses
- Doesn't require translating (at least)
- Used for control
- Difficult to write and debug
- A.K.A binary or machine code
- Second gen
- A.K.A Low level or assembly language
- Uses mnemeonics
- Labels/ Symbolic addresses
- Very close to inner workings of a computer
- Difficult to read, debug and use
- Produces least portable code
- Translated by the assembler
- Uses mnemeonics
- Good for hardware manipulation
- Fast execution speeds
- Very effiecient
- A.K.A Low level or assembly language
- Third gen
- A.K.A Problem oriented languages
- These are normal high level languages
- Has keywords close to english
- Has reserved words
- can set variables
- Has IDE
- IDE allows to step through code, variable watching, debugging, setting breakpoints, error checking and all that cool stuff
- Easier to write
- Easier to debug
- It is harder to re use code
- In the sense that it is not very well planned. One would have to really plan writing in first and second gen languages, simply because they are difficult. It is much easier to just go at it in third gen languages
- Changes mean that programs need to be re written
- Has keywords close to english
- Fourth gen
- Actual tools for high level languages rather than a language
- They reduce time taken to produce programs
- E.g. A report program generator
- or CASE tools
- Computer aided software engineering
- or CASE tools
- Actual tools for high level languages rather than a language
- Fith gen
- Used for A.I systems
- And expert systems
- An example is a medical diagnosis system
- And expert systems
- A.K.A Declarative languages
- It stores facts and rules
- Checks quieries against them using inference engine
- No need to tell how to solve problems like in third gen languages, it does that itself
- Just give it facts and rules and ask it a question
- No need to tell how to solve problems like in third gen languages, it does that itself
- Checks quieries against them using inference engine
- It stores facts and rules
- Used for A.I systems
- First gen
Low level
- Fast execution speeds
- Mnemonics are easy to remember
- Difficult to read and debug
- Very close to machine code
- Fast execution speeds
Object oreinted
- Uses classes
- Classes are a template of which objects are created from
- They have attributes and methods
- Uses objects
- Objects are an instance of a class
- And a real world object
- Objects, when created can have values set to them
- Rather than after creation
- This is known as polymorphism
- Rather than after creation
- Objects are controlled using methods
- Data is encapsulated in the object. Meaning that data is hidden and only accesible via the methods
- Objects are an instance of a class
- Easier to provide working code
- More of a realistic approach to solving programs
- Code is much easier to reuse
- Therefore it is more portable
- Code is much easier to reuse
- More of a realistic approach to solving programs
- It is much harder to learn
- It is complex to craft
- Not as fast as a low level lang or machine code
- It is complex to craft
- Classes can inherit properties from other classes
- Objects also
- Also inherit methods
- Called inheritance
- Formal definition: Means by which properties and methods from the object class are copied to the object being created
- Uses classes
Declarative
- Give computer facts and rules and it works out problem by itself
- A.K.A expert systems
- Uses backtracking
- Going back to a previously found correct match in order to continue a search
- Uses instantiation
- Giving a variable in a statement a value
- E.g. X = Tom
- Has goals
- A statement that is trying to be proved if true or false
- E.g. Mother(X,Y)
- Uses predicative logic
- A branch of maths that manipulates logical statements that can either be true or false
- Has rules
- Mother(A,B):- Parent(A,B) Female(A)
- Has facts
- Program searches through facts using rules
- Male(John)
- Give computer facts and rules and it works out problem by itself
Procedural
- Uses functions and procedures
- Tell computer how to solve problem, computer solves it
- 3 programming constructs
- Selection
- Interation
- Sequential
- Good level of control
- Portable source code
- Variables can get mixed up if multiple functions call upon it
- Slower than low level languages
- Harder to reuse code
- Slower than low level languages
- Uses functions and procedures
UML diagrams
- Class diagrams
- Contains data about class, along with methods, attributes and name
- Not quite a traditional UML diagram
- Contains data about class, along with methods, attributes and name
- Don't worry, you'll recognise them all
- Object diagrams
- Like a class diagram, but for objects
- Shows only object, not class
- Like a class diagram, but for objects
- Use case diagrams
- Have 'actors'
- As stick people
- 2 types: Initiating and recieving
- As stick people
- Have actions
- In ovals
- Have association lines
- Linking actions
- To show which actions associated with which actor
- Have 'actors'
- State diagrams
- Has shaded circle
- Start point
- Has circle with a dot in it
- End point
- Arrows show transitions betwen system states
- Bought by events known as triggers
- Has shaded circle
- Sequence diagrams
- Show how objects work together to achieve tasks in a system
- Objects pass messages between themsleves
- Diagram shows objects, messaages and indication of time
- Activity diagrams
- Like a flowchart
- Uses diamonds for decisions
- Circle for stat and end points
- Oval for activity
- rectangles for input and output
- Oval for activity
- Circle for stat and end points
- Arrows show the transition of fata
- Brackets show commentary
- Communications diagrams
- Shows how different objects work together to carry out a task
- Objects in rectangles
- Connected by arrows
- Shows direction that information flows
- Labeled with method used to access info about object
- Labeled woth number to indicate order
- Labeled with method used to access info about object
- Shows direction that information flows
- Connected by arrows
- No start or end point, usually
- Objects in rectangles
- Shows how different objects work together to carry out a task
- Class diagrams
Informationen
- Beschreibung
- Mindmap am 3.3.6 Programming language paradigms, erstellt von Bobby Khaleque am 24/02/2015.
- Erstellt von
- Bobby Khaleque
- Aufrufe
- 0
- Bewertung