CSE240 - Midterm 1 cribsheet

CSE240 - Midterm 1 cribsheet - Paradigms...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Paradigms Imperative/procedural - expresses computation by fully-controlled/specified manipulation of named data in a step-wise fashion. Foundation of these is the stored program concept. Languages include Fortran, Algol, Pascal, C. Object-oriented - Basically the same as imperative, but related variables and operations on variables are organized into classes called objects . Access privileges of vars and methods (operations) in objects can be defined to reduce (simplify) the interaction among objects. Objects considered the main building blocks of programs, which support features like inheritance, class hierarchy, polymorphism. Smalltalk, C++, Java, C# Functional/applicative - Expresses computation in terms of mathematical functions. Supposed to be easy to understand, simple to use. No concept of memory locations in functional programming languages. Each function takes in a number of values as input (parameters) and produces a single return value. Return values not stored. ML, SML, Lisp/Scheme Logic/declarative - Expresses computation in terms of logic predicates. A logic program is a set of facts, rules, questions. Programs compare a question to each fact and rule in given fact and rulebase. Receive yes/no. Prolog. Program Performance/Features Orthogonality, control structures, data types and data structures, syntax design, support for abstraction, expressiveness, type equivalence, strong vs weak type checking , exception handling, aliasing. Reliability, readability, writeability, reusability, efficiency. features\performance Efficiency Readability/reusability Writeability reliability orthogonality/ simplicity X X X X control structures X X X X data type/structures X X X X syntax design X X X support for abstraction X X X expressiveness X X strong checking X restricted aliasing X exception handling X Lexical Structure Lexical structure defines the vocabulary of a language. Units include: Identifiers (var names), Keywords (e.g. final, const), Operators (+,-,<, >, AND, NOT),
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/17/2008 for the course CSE 240 taught by Professor Balasooriya during the Spring '08 term at ASU.

Page1 / 3

CSE240 - Midterm 1 cribsheet - Paradigms...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online