1/51
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Simula Project
Attempt to design a programming language that extended Algol60. Goal is to incorporate the notion of an object.
history of object-oriented programming languages begins (1960s)
Object
entity with certain properties that control its ability to react to events in predefined ways.
1970s
rise of structured programming and top-down design (year)
1980s
Surge in interest in object-oriented programming (year)
Abstraction
collection of similar operations from two different components into a new component.
Application framework
collection of related software resources, usually in object-oriented form, that developers modify and reuse for specific application services
Polymorphism
the extension of the type of data that operations can apply to.
Encapsulation
restricting access to internal details
Smalltalk
Arose from the Dynabook Project by Alan Kay at Xerox PARC in the early 1970s, later continued by Adele Goldberg and Daniel Ingalls
Dynabook Project
was conceived as the prototype of today’s laptop and tablet computers.
Include a WIMP (windows, icons, mouse, pull-down menus)
Message
request for a service
Receiver
object that receives a message and performs a service by invoking a method.
Parameters
Data supplied with a message by the sender.
Mutators
Messages that result in a change of state in the receiver object
Message Passing
The process of sending and receiving messages
Interface
The set of messages that an object recognizes.
Class
provides a definition of the properties and behavior of a set of objects.
Inheritance
supports the reuse of structure and behavior
Collections
containers whose elements are organized in a specific manner
Linear
Strings, arrays, lists, stacks, and queues
Unordered
Bags, sets, and dictionaries (maps in Java)
Sorted collections
elements have natural ordering
Java
Originally designed by _ and his team at Sun Microsystems for embedded systems in appliances like microwave ovens
For portability and small footprint for code
“Write once, run anywhere”
James Gosling
person who designed java along with the sun microsystems
Class
template that defined the form of an object
Objects
instances of class
Methods
subroutines that manipulate data defined by the class
Interface
set of operations on objects of a given type.
Glue that connects components in software systems
Dashed arrow
indicates that a class implements an interface
Solid arrow
indicates that a class extends another class and an interface extends another interface
C++
developed as an extension of C with simula-like classes.
Bjarne Stroustup
Developer of C++
Members
Instance variables (data members) and methods (member functions).
Subclasses
referred to as derived classes
Superclasses
called base classes
Static Binding
function called during the the compile-time of the program
Ex. Method overloading and operator overloading
Dynamic Binding
functions called during the execution of a program
Typless Entities
excluded from type checking
whose class membership would be maintained separately from the type system
type constructors
Classes as _ _: making class declarations a part of the language type system. (Adopted by C++)
type system
Class as __ _ : all other structured types are excluded from the language. (Adopted by Smalltalk)
Module Mechanisms
Independent of object-oriented mechanisms
Namespace Mechanism (C++)
orthogonal to the class mechanism
Package Mechanism (Java)
allows classes to be collected into groups.
Parametric Polymorphism
Type parameters remain unspecified in declarations.
Overloading, Ad Hoc
different functions or methods share the same name but are distinguished by parameter types.
Subtype Polymorphism
Operations of one type can be applied to another type.
Inheritance
A form of subtype polymorphism that also functions as overloading on the implicit object parameter
Multi-Dispatch Problem
when inheritance and overloading do not account for binary methods. That may need overloading based on class membership in 2 or more parameters
Multimethods
Methods that can belong to more than one class
Stack Allocation
the compiler is responsible for the automatic generation of constructor calls on entry into a block and destructor calls on exit,
Heap Allocation
explicit calls to new and delete cause constructor and destructor calls to be scheduled.
Garbage Collector
(Java, Smalltalk) - to return inaccessible storage to the heap.