programming techniques?? Flashcards
Imperative programming
uses a series of instructions telling comp what to do w/ input in order to solve problem
Procedural programming
uses a sequence of
instructions which may be contained within procedures.
These instructions are carried out in a step-by-step manner
Structured programming
a kind of procedural programming which uses constructs: selection, sequence, iteration + recurssion rather than ‘go to’ stattements.
Modular techniques used to split large program intoo manageable chunks
Declarative programming
statements describe prolem to be solved.
language implementation then finds best way of solving it
used to create, amend + query databases
Logic programming
form of declarative programming.
is a paradigm expressing logic of computation w/o expressing control flow
consist of logical statements
code defines a set of facts and rules
What is an inportant feature of declarative programming
backtracking
whats used to find answers to problems in logic programming
queries
what uses procedural programming
python, basic, pascal, c#
what uses oop
java, c++, visual basic.NET, python
what uses declarative programming
sql, prolog
what uses functional programming
haskell, javascript, logo
define backtracking
going back to a previously found successful match
3 important things in declarative programming
facts and rules and goal
facts in declarative programming
a predicate which may have arguments + is something unconditionally true
rules in declarative programming
used to define a relationship b/w facts.
stored in the knowledge base.
true depending on given condition
goals in declarative programming
query to b solved
def instantiation
process of creating a new object from a class
advantages imperative programming
Very simple to implement
It contains loops, variables
disavantage imperative progrmaming
Complex problem cannot be solved
Less efficient and less productive
Parallel programming (parallel processing) is not possible
Imperative programming is divided into three broad categories which are?
Procedural, OOP and parallel processing
oop is
a collection of classes and object which are meant for communication.
The smallest and basic entity is object and all kind of computation is performed on the objects only.
More emphasis is on data rather procedure. ??
oop advantages
Data security
Inheritance
Code reusability
Flexible and abstraction is also present
declaative programming divided into?
logic, functional, database
what does the paradigm used depend on
problem to be solved