Programming paradigms

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

How-to check the java heap via JVM

"-Xmx"

imperative programming languages

"how"-oriented [specifies how the computation takes place] Ada Fortran Basic Algol Pascal Cobol Modula C

logic programming languages

"what"- oriented [does not specify how to compute the solution/consists of a declarative description of the problem] Prolog Lambda Prolog CLP PICAT

functional programming language

"what"-oriented [describes the problem to be solved] Lisp Scheme FP Standard ML Haskell

What is the von Neumann Machine

A computer architecture developed by John Von Neumann and others in the 1940s that allows for input, output, processing, and memory; it also includes the stored program concept

Define OBJECT-ORIENTED Paradigm

A type of programming based on objects that represent data. Basically the same as imperative paradigm EXCEPT that related variables, operations on variables are organized into classes of objects. ACCESS PRIVILEGES of variables, methods (operations) can be defined to reduce (simplify) the interaction among the objects which support features like inheritance, class hierarchy and polymorphism.

Define OBJECT-ORIENTED Paradigm

A type of programming based on objects that represent data. The interaction among the objects which support features like inheritance, class hierarchy and polymorphism.

Class Diagram

A visual representation of the relationships between classes.

What is the LOGIC programing paradigm also called?

Also called the DECLARATIVE programming paradigm.

What was the first primitive compiler?

Autocoder written by Alick E. Glennie in 1952

List John Backus Developments

Backus was also the system co-designer of the IBM 704 that ran the first FORTRAN compiler. involved in the dev. of IBM 704 and Backus-Naur Form (BNF). BNF was a formal notation used to define the syntax of programmed languages.

what is PROLOG arithmetic operations based on?

Based on the IMPERATIVE paradigm

Describe multiple paradigm C/C++

C++ is object oriented and contains almost every feature of imperative C. We can use C++ to write C programs.

What is the default Java HEAP size?

Client JVM Default Initial and Maximum Heap Sizes: The default maximum heap size is half of the physical memory up to a physical memory size of 192 megabytes (MB) and otherwise one fourth of the physical memory up to a physical memory size of 1 gigabyte (GB

Java

Concurrent Functional Generic Imperative Reflection OO

Describe the FUNCTIONAL PROGRAM PROCESS

Each function will take A NUMBER OF VALUES AS INPUT (parameters) and produce A SINGLE RETURN VALUE (output of the function). THE RETURN VALUE CANNOT BE STORED FOR LATER USE. IT HAS TO BE USED EITHER AS THE FINAL OUTPUT OR IMMEDIATELY AS THE PARAMETER VALUE OF ANOTHER FUNCTION.

Describe/list FORTRAN dev history/evolution

FORTRAN II came in 1958, III at end of 1958 but was never released to public, ASA Fortran 66 (IV) in 1996, ANSI fortran 77 (Fortran V) in 1978,

When was FORTRAN developed?

FORmula TRANslating was developed by the team headed by John Backus at IBM between 1954 and 1957

What does FORTRAN stand for?

FORmula TRANslation language

What is FUNCTIONAL PROGRAMMING ABOUT?

FUNCTIONAL programming is about DEFINING FUNCTIONS and ORGANIZING the RETURN VALUES of one ore more functions as the parameters of another function. Functional programming languages are mainly based on LAMBDA CALCULUS.

What was the FIRST widely used high level programming language?

Fortran

JavaScript

Functional Imperative Reflection OO Reactive

Who invented the compiler?

Grace Hopper Designed the first widely known COMPILER, called "A0" in 1951

Instance Variables

In Object Oriented Programming the instance variables of an object are the data items which that object uses

Concurrency Control

In concurrent computing, ensuring that threads operate in the correct sequence and priority

Describe multiple paradigm Java

Java is MORE object oriented BUT still includes many IMPERATIVE FEATURES. Java's primitive type variables do not obtain memory from the language heap like other objects.

When was the first high level programing language program developed

Konrad Zuze, Z4 machine for a chess playing program in 1946

LISP & non-functional features

LISP contains many nonfunctional features. Scheme can be considered a subset of LISP with fewer nonfunctional features.

what is LOGIC programming ABOUT?

Logic Programming is about finding facts, defining rules based on the facts, and writing questions to express the problems we wish to solve

Python paradigms

Metaprogramming Generic Functional Imperative OO structured

what is the ONLY significant LOGIC programming language?

PROLOG

concurrent languages

Parallel Pascal Java Concurrent ML

What is ASSEMBLY LANGUAGE?

SOPHISTICATED USE OF MNEMONICS IS CALLED ASSEMBLY LANGUAGE. Uses simple variables, branch to a label address, different addressing modes, and macros that represent a number of instructions.

when was the first high level language used in a electronic computing device used?

Short Code in 1949, there was no compiler for the high level language, it had to be HAND compiled into machine language.

object-oriented languages

Smalltalk Simula Java C++

What are the typical OBJECT ORIENTED programing languages

Smalltalk, C++, JAVA, C#

Concerns of paradigms

Some paradigms are concerned mainly with implications for the execution model of the language, such as allowing side effects, or whether the sequence of operations is defined by the execution model. Other paradigms are concerned mainly with the way that code is organized, such as grouping a code into units along with the state that is modified by the code. Yet others are concerned mainly with the style of syntax and grammar.

What is the FUNCTIONAL programming paradigm also called

The APPLICATIVE programming paradigm

What is the Java Heap?

The Java virtual machine has a HEAP that is shared among all Java virtual machine threads. The heap is the runtime data area from which memory for all class instances and arrays is allocated. The heap is created on virtual machine start-up.

What is the first high level programming language?

The first high-level language is Konrad Zuze's Plankalkul programming system in Germany 1946. Zuze developed is Z-machines Z1,Z2,Z3,Z4 in the lat 1930's and 1940's. PLANKALKUL was developed on the Z4 machine in Zurich. (a chess playing program)

Define the FUNCTIONAL programming paradigm

The functional programming paradigm expresses computation in terms of mathematical functions. THERE IS NO CONCEPT OF MEMORY LOCATIONS IN FUNCTIONAL PROGRAMMING LANGUAGES.

Define the LOGIC programming paradigm

The logic programming paradigm express computation in terms of logic predicates (?). a logic program is a set of facts, rules and questions.

Describe the process of Autocoder

Translated autocode in symbolic statements into machine language for the Manchester Mark I computer. It could handle single letter identifiers and simple formulas

What are the typical Imperative Languages

Typical imperative programming langues include ALL ASSEMBLY LANGUAGES and earlier high level languages like Fortran, Algol, Ada, Pascal and C

What is an ASSEMBLER

Used to convert mnemonic symbols to corresponding binary numbers, substitute register numbers or memory locations for the variables and calculate the destination address of branch instructions according to the portion of the labels in the program

Resource Starvation

Where one thread in a concurrent program accesses a resource locking lower priority threads as a result

Race Condition

Where two threads simultaneously operate on the same data, but different timings result in unpredictable results

Logic Programming

[Programming Paradigm] a declarative *description of the problem as a set of rules* provided, from which the solutions are then inferred

object-oriented programming

[Programming Paradigm] a programming approach where *not only the data type of a structure is defined, but also the types of operations or functions * that can be applied to the data structure

object-oriented programming

[Programming Paradigm] a programming approach where both the data type of a data structure, and the operations that can be applied on these, are defined.

concurrent or parallel programming

[Programming Paradigm] a programming technique that allows the execution of two or more operations at the same time

logic programming

[Programming Paradigm] based on concept of logical deduction

functional programming

[Programming Paradigm] computations are specified through *mathematical functions* that evaluate input expressions into output values

distributed programming

[Programming Paradigm] concurrent programming implemented on a multi-processor or multi-computer platform

imperative programming

[Programming Paradigm] oldest and most traditional model of computing

Encapsulation

a characteristic of objects in object-oriented programming which means that objects are closed systems which cannot be altered from outside.

iteration

a command is executed a set number of times

class

a group of objects that have the same properties, operations and behaviors

Thread

a sequence of instructions running concurrently with another sequence

what is a programming language PARADIGM

a set of basic principles, concepts, and methods for how a computation or algorithm is expressed. The MAJOR paradigms are IMPERATIVE, OBJECT-ORIENTED, FUNCTIONAL and LOGIC paradigms

Procedural Programming

a style of programming in which sets of operations are executed one after another in sequence

Imperative concerns

allow side effects

define the IMPERATIVE programming paradigm

also called "PROCEDURAL". expresses computation by fully specified and fully controlled manipulation of named data in a STEPWISE fashion. Data is initially stored in variables (just a memory location) then taken out of (read form) memory, manipulated in ALU (arithmetic logic unit) and then stored back in the same or different variables (memory locations). Finally the values of the variables are sent to the I/O devices as output.

What is MACHINE language?

binary

what is mnemonics? (prog. lang. dev.)

certain symbols to be used to represent frequently used bit patterns instead of writing code in binary

Class

code which defines the data an object of that type can use

object-oriented programming

designing a program by discovering objects, their properties, and their relationships

Functional concerns

disallow side effects

Declarative concerns

does not state the order in which operations execute

procedural concerns

groups code into functions

Object-oriented concerns

groups code together with the state the code modifies

Logic concerns

has a particular style of execution model coupled to a particular style of syntax and grammar

Concurrent programming

have language constructs for concurrency, these may involve multi-threading, support for distributed computing, message passing, shared resources (including shared memory), or futures

Imperative

how do we solve a problem (what steps does a solution have)?

Methods

in object-oriented programming this refers to the behavior of an object and how it can manipulate instance variables. Methods are defined inside the class which was used to create the object

object-oriented program

is the specification of a set of objects: their attributes and the way they interact with each other

What is a lambda expression?

lambda expression in computer programming, also called anonymous function, a function (or a subroutine) defined, and possibly called, without being bound to an identifier Lambda Expressions are nameless functions given as constant values. They can appear anywhere that any other constant may, but are typically written as a parameter to some other function. The canonical example is that you'll pass a comparison function to a generic "sort" routine, and instead of going to the trouble of defining a whole function (and incurring the lexical discontinuity and namespace pollution) to describe this comparison, you can just pass a lambda expression describing the comparison. HOWEVER, this misses one of the most important features of Lambda Expressions, which is that they execute in the context of their appearance. Therefore, they can use the values of the variables that are defined in that context. This differentiates function-pointers from true lambda expressions. In languages supporting mutable variables, proper lambda expressions offer the power change the values of those variables. Lambda expressions are rooted in lambda calculus.

Programming Paradigm

model or way of thinking about computing

imperative programming

oldest and most traditional model of computing

Symbolic concerns

programming which has a particular style of syntax and grammar

computation

refers to the transformation of the state of the objects

imperative program

sequence of commands or instructions for computer to follow

Class Libraries

sets of classes designed to be reusable components whose services can be used by many programs

What is the STORED PROGRAM CONCEPT

the FOUNDATION of IMPERATIVE languages

Instantiation

the creation of a new object from a class

Describe a LOGIC program

the execution of a LOGIC program is is to compare each question to each fact and rulebase, if the question finds a match, we receive a "yes" answer to the question...Otherwise, we receive a, "no" answer.

Formal Parameters

the parameters in the definition of a procedure or function

What are typical FUNCTIONAL programming language

typical functional programming languages include ML, SML, and LISP/Scheme

Inheritance

used in object-oriented programming, the sharing of characteristics between a class of objects and a newly created sub-class. This allows code re-use by extending an existing class

Generic programming

uses algorithms written in terms of to-be-specified-later types that are then instantiated as needed for specific types provided as parameters

Functional programming

uses evaluation of mathematical functions and avoids state and mutable data

Logic-based

what do we do to solve problems? (The language decides how to do it.)

Imperative Programming

where a developer writes code that describes in exacting detail the steps that the computer must take to accomplish the goal

Modularity

where a program is constructed as a series of sub programs which are self-contained and can be re-used within that program

Deadlock

where two threads are competing for the same resource resulting in neither completing its operation

Metaprogramming

writing programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime


संबंधित स्टडी सेट्स

ECO 3041 FSU Calhoun Final Exam Review (all exam questions)

View Set

5.25 Unit Test: Ecology and the environment

View Set

BASIC VEHICLE TECHNOLOGIES 1: COMFORT

View Set

IRSC American history 2020 exam 2

View Set

NCLEX Renal, Urinary and Reproductive systems

View Set

70-410 Lesson 13: Installing Domain Controllers

View Set

Federal Tax Considerations for Health Insurance Quiz

View Set

CTI: Intelligence Sources and Formats

View Set

ATI: RN Community Program Planning, Implementation, and Evaluation Assessment

View Set

Sociology 105-Immigration Menchaca

View Set