Please enable JavaScript.
Coggle requires JavaScript to display documents.
1.2.4 types of programming langage (LMC (ADD, SUB, STA, LDA, BRA, BRZ, BRP…
1.2.4 types of programming langage
paradigms
procdural
instructiosn in sequence
selction
interations
moduels , fucntion ,sub produres
Imperative
Tells a computer what to do step by step
lays code out in statments
Object oritated
objects are moddeld on real world
objects interact
inheritance
assembly
uses Mnemonics
processor specific
low level
one to one
op code and operand (instruction and data)
assembled using a assembler
most programming Language are Turing complete so can solve any computing problem, but some are better stuited
logic
expressed as rules and logic
used along with a goal to obtain a resullt
functional
mathmatical
takes in values and retuns one
built in
LMC
ADD
SUB
STA
LDA
BRA
BRZ
BRP
INP
OUT
HLT
DAT
A Lable | a mnumonic | the data
addressing modes
immediate
the value in the address is the value to be used
ADD 10 means add 10
direct
the value in the adress tells us the memroy location to find the value
add 10 means add whats in location 10 to acc
indirect
the instuction is the addres to find the adress
ADD 10 means go to location 10 to get address of value
large addresses can be acessed
index adressing
ADD 10 meand add idex plus 10
addressing the fist location finds the location to be added
useful for arrays
object orientated prgraming
classes
real world template for an object
atributes
varables
methods
procdures
also used to affect atributes
reuseable
objects
instantiation- creating an object from a class
uses new
constructor is needed
how classes are constructed
inheritance
used to specified classes by re using code
same attributes and methods
adds extra attributes as needed
Parent/child, superclass/subclass
has access to superclass code
subclasses iherets all the way up the tree
overrided
if a new class is called with the same name it will override by the child class
super. can be used to override overriding so original is still used
encapsulation
he concept that attributes of an object are protected and can only be accessed or altered by methds
safer cant be accidentally alterd
data cannot be acsesed without using methods
privert vs public
validation can be used
polymorpthism
"many forms"
even if data is saved together the correct method is used when a output for loop is used
picks the correct metthod