100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
Summary Cos 1521 Chapter 9-14 Exam Summaries €8,71   In winkelwagen

Samenvatting

Summary Cos 1521 Chapter 9-14 Exam Summaries

1 beoordeling
 98 keer bekeken  0 keer verkocht
  • Vak
  • Instelling

Hi Everyone, I hope that exam studying is going great for you. I compiled summaries from the textbook for each chapter so you dont need too. I work very hard on these and added multiple diagrams as well. I study at UNISA and I am not a huge fan of theory so this makes it easy for me to study just w...

[Meer zien]

Voorbeeld 3 van de 16  pagina's

  • 6 mei 2020
  • 16
  • 2019/2020
  • Samenvatting

1  beoordeling

review-writer-avatar

Door: tjmahlatji • 4 jaar geleden

avatar-seller
Chapter 9 Programming Languages
To write a program for a computer, we must use a programming language. A computer language is a
set of predefined words that are combined into a program according to predefined rules.

Machine Languages

These are the programming languages available at an earlier stage. Made up of streams of 1’s and
0’s. The only language understood by the computer is machine language. Machine language has two
drawbacks. First, it is machine dependant. Second, it is very tedious to write programs in this
language and even more difficult to spot errors.

Assembly Languages

This is the next evolution, it replaces binary code with instructions and address with symbols or
mnemonics(also known as symbolic languages). An assembler is used to translate this into machine
language. Ex STORE Number1 RF means Store Register F into Number 1

High Level Languages

Assembly languages greatly improved programming efficiency but they still required programmers
to concentrate on the hardware they were using. There was a desire to improve efficiency and
change focus from the computer to the problem being solved. These are portable so the
programmer can focus on the program and not the computer. This language is easier for a human to
understand.




Translation

This is the method to convert higher level languages into machine language so that the computer
can understand the code. There are two types: compilers and interpreters.

- Compilers: translate the whole source program into the object program.

, - Interpreters: translates each line of the source program into the corresponding line of object
program and executing the line.




Translation Process:
- Lexical Analyzer: reads source code, symbol by symbol and creates a list of tokens in the
source language. Ex C, C++, Java
- Syntax Analyzer: Parses a set of tokens to follow instructions Ex
- Semantic Analyzer: Checks sentences created by the syntax analyser making sure of no
ambiguity.
- Code generator: Instructions are converted to a set of machine language instructions for the
computer

Programming Paradigms: Programming Languages approach they use to solve a problem




Procedural Paradigm: In the procedural paradigm (or imperative paradigm) we can think of a
program as an active agent that manipulates passive objects. We encounter man y passive objects in
our daily life: a stone, a book, a lamp, and so on. A passive object cannot initiate an action by itself,
but it can receive actions from active agents. A program in a procedural paradigm is an active agent
that uses passive objects that we refer to as data or data items. To manipulate a piece of data, the
active agent (program) issues an action, referred to as a procedure.

Examples: FORTRAN, COBOL, Pascal, C, Ada
- FORTRAN: Designed by a group of IBM engines under Jack Backus in 1957.

, - COBOL: Designed by a group of computer scientists under Grace Hopper of US Navy
- Pascal: Invented by Niklaus Wirth in 1971, named after Blaise Pascal
- C: Developed by Dennis Ritchie at Bell in 1970
- Ada: Named after Augusta Ada Byron, Assistance to Charles Babbage. Made for the US
Department of Defence

Object Oriented Paradigm: Deals with active objects instead of passive objects
- Classes are used to for a set of methods to react to outside stimuli
- Methods
- Inheritance
- Polymorphism: Meaning many forms. Treat several operations with the same name that can
do different things in related classes.
- Examples: C++ & Java
- C++: Bjarne Stroustup at Bell to improve C
- Java: Developed by Sun microsystems. Based on C & C++. Supports multithreading.

Functional Paradigm: Considered a mathematical function.
- Examples: LISP & Scheme
- LISP: Designed by a team of researchers at MIT in early 1960s.Everything is considered a list
- Scheme: a standardised version of LISP made by MIT in 1970s

Declarative Paradigm: Uses principle of logical reasoning to answer queries
- Based on deduction
- PROLOG is an example: Developed by A. Colmerauer in France 1972 Made up of facts &
Rules.

Common Concepts

- Identifiers: The name of objects.
- Data Types: A set of values and operations that can be applied to those values.
Simple: Cannot be broken into smaller data types. Have been defined in imperative
languages:
Integer – Whole number
Real – Number with fraction
Character – Symbol type
Boolean – True or false
Composite: Set of elements in which each element is a simple type or composite type:
Array: Set of elements each of the same type
Record: Set of elements in which element can be of different type

- Variables: The names for memory locations. (Initialization stores a value in a variable and
declaration sets a variable with a given name and type.
- Literals: A predetermined value used in a program
- Constants: A constant is similar to a variable but the value cannot be changed.
- Input:
- Output:
- Expressions: A sequence of operands and operators that reduce to a single value.

Operators(a language specific token that requires an action to be taken)

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

Verzekerd van kwaliteit door reviews

Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper examsummaries29. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €8,71. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 72042 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€8,71
  • (1)
  Kopen