Object Oriented Programming - Engineering Software | CS 2220, Study notes of Software Engineering

Material Type: Notes; Class: Engineering Software; Subject: Computer Science; University: University of Virginia; Term: Fall 2006;

Typology: Study notes

Pre 2010

Uploaded on 03/09/2009

koofers-user-mg4-1
koofers-user-mg4-1 🇺🇸

5

(1)

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
cs205: engineering software
university of virginia fall 2006
David Evans
www.cs.virginia.edu/cs205
Object-Oriented
Programming 2
cs205: engineering software
Midterm Exam
Out at end of class today
Due Monday at beginning of class
3
cs205: engineering software
Buzzword Description
“A simple, object-oriented,
distributed, interpreted,
robust, secure, architecture
neutral, portable, high-
performance, multithreaded,
and dynamic language.”
[Sun95]
Later in the course, we will
discuss how well it satisfies
these “buzzwords”.
from Class 2...
4
cs205: engineering software
What is
Object-
Oriented
Programming?
5
cs205: engineering software
What is an Object?
Packaging state and procedures
state: the rep
What a thing is
procedures: methods and constructors
What you can do with it
6
cs205: engineering software
“Object-oriented programming is programming
with inheritance. Data abstraction is
programming using user-defined types. With few
exceptions, object-oriented programming can and
ought to be a superset of data abstraction.
These techniques need proper support to be
effective. Data abstraction primarily needs
support in the form of language features and
object-oriented programming needs further
support from a programming environment. To be
general purpose, a language supporting data
abstraction or object-oriented programming must
enable effective use of traditional hardware.”
Bjarne Stroustrup (C++)’s Answer
pf3

Partial preview of the text

Download Object Oriented Programming - Engineering Software | CS 2220 and more Study notes Software Engineering in PDF only on Docsity!

cs205: engineering software university of virginia fall 2006

David Evans

www.cs.virginia.edu/cs

Object-Oriented

Programming cs205: engineering software 2

Midterm Exam

  • Out at end of class today
  • Due Monday at beginning of class

cs205: engineering software 3

Buzzword Description

“A simple, object-oriented,

distributed, interpreted,

robust, secure, architecture

neutral, portable, high-

performance, multithreaded,

and dynamic language.”

Later in the course, we willdiscuss how well it satisfies [Sun95]

these “buzzwords”.

from Class 2...

cs205: engineering software 4

What is

Object-

Oriented

Programming?

cs205: engineering software 5

What is an Object?

  • Packaging state and procedures
    • state: the rep
      • What a thing is
    • procedures: methods and constructors
      • What you can do with it

cs205: engineering software 6

“Object-oriented programming is programming with inheritance. Data abstraction is programming using user-defined types. With few exceptions, object-oriented programming can and ought to be a superset of data abstraction. These techniques need proper support to be effective. Data abstraction primarily needs support in the form of language features and object-oriented programming needs further support from a programming environment. To be general purpose, a language supporting data abstraction or object-oriented programming must enable effective use of traditional hardware.”

Bjarne Stroustrup (C++)’s Answer

cs205: engineering software 7

“I invented the term Object-

Oriented and I can tell you I

did not have C++ in mind.”

Alan Kay

cs205: engineering software 8

Programming Language History

  • Before 1954: twidling knobs, machine

code, assembly code

  • FORTRAN (John Backus, UVa dropout,

1954) – Formula Translation

  • Algol (Peter Naur, Alan Perlis, et. al.,
  • Most influential programming language
  • Many of the things Algol did first (types, while, blocks) are in Java

BNF Grammar

cs205: engineering software 9

Programming Language History

  • Simula (Dahl and Nygaard, 1962-7)
    • First language with subtyping and inheritance
  • CLU (Liskov et. al., 1970s)
    • First language with good support for data abstraction (but no subtyping or inheritance)
  • Smalltalk (Kay et. al., 1970s)
    • First successful language and programming system to support subtyping and inheritance

cs205: engineering software 10

Object-Oriented Programming

  • Object-Oriented Programming is a state of mind where you program by thinking about objects
  • It is difficult to reach that state of mind if your language doesn’t have: - Mechanisms for packaging state and procedures - Java has class - Subtyping - Java has extends (subtype and subclass) and implements (subtype)
  • Other things can help: dynamic dispatch, inheritance, automatic memory management, mixins, good donuts, etc.

cs205: engineering software 11

Who was the first

object-oriented

programmer?

cs205: engineering software 12

By the word operation, we mean any process which alters the mutual relation of two or more things, be this relation of what kind it may. This is the most general definition, and would include all subjects in the universe. Again, it might act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine... Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent. Ada, Countess of Lovelace, around 1843