EXAM JANUARY Flashcards
what is a linked list
a Dynamic data structure where each node has a pointer and a some data in it. pointer gives location of the next node.
what is an array
a data type where the data is only of one type.
what is a record
a data structure which is unordered and made up of different data types .all the data is stored in fields.
what is a tuple
an ordered set of values of any type . a tuple is immutable so it cannot be changed once it has been created.
what is a graph
a graph is a set of nodes which are connected by edges
what is polymorphism
where objects of different types are treated in the same way , this reduces the volume of code
what is encapsulation
the process of keeping the objects attribute private so they can be chnange via public metthods
what is inheritance
where the classes in inferiors hierarchies have the same same attributes as the parent class , this avoids duplicated code.
what are programming paradigms
different approaches to using programming languages to solving problems
what is a procedural language
a type of imperative programming language which uses a sequence of instructions contained within procedures.
what is OOP
this is where classes and objects and attributes are used. This type of programming mainly focuses on reusability and easy to maintain and update.
what is overriding
redefining a method in a subclass and altering the code so that it functions differently (produces a different output)
what are the advantages of OOP
OOP allows for high level of reusability
Encapsulation makes the code more reliable by protecting the attributes from being directly accessed
what are disadvantages of OOP
it may not be suitable for programmers that are used to working with different programming paradigms
OOP is not suitable for all types of problems. where few components are reused.
what happens in a TCP/IP layer
in the TCP layer a packet is sent between 2 devices to establish a connection.
In the Internet layer the IP protocol routes packets between both networks