ObjectOriented Design - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

ObjectOriented Design

Description:

ObjectOriented Design – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 15
Provided by: robert1778
Category:

less

Transcript and Presenter's Notes

Title: ObjectOriented Design


1
Object-Oriented Design
Review Goals and Principles of OOP and Recursion
and Investigate Inheritance and Polymorphism,
Templates, and Exceptions
2
Object-Oriented Design
  • Challenge for software engineers create software
  • that is itself complex
  • that appears conceptually simple
  • that is easy to integrate with other applications
  • that allows for future modifications
  • that can be written by a large team of
    programmers

3
Object-Oriented Design
  • This methodology has been developed to address
    the challenge of achieving a balance with regard
    to producing designs that are
  • conceptually simple enough to understand
  • powerful enough to solve hard problems
    efficiently

4
Goals and Principles ( 2.1)
  • The fundamental goal of dealing with the
    complexity of building modern software gives rise
    to several subgoals and principles
  • robustness
  • adaptability
  • reusability
  • abstraction
  • encapsulation
  • modularity

5
Object-Oriented Design Goals ( 2.1.1)
  • Researchers and software engineers agree software
    implementations should achieve
  • robustness
  • adaptability
  • reusability

6
Robustness ( 2.1.1)
The property that a software application is
capable of handling unexpected inputs that are
not explicitly defined for its application. Examp
le If an application expects a positive input
from a user, but is instead given a negative
input, the program should be able to recover
gracefully from this error! In life-critical
applications, where errors can lead to injury or
loss of life, software that is not robust is
deadly! http//courses.cs.vt.edu/cs3604/lib/Thera
c_25/Therac_1.html
7
Robustness ( 2.1.1)
Robustness involves more than just handling
unexpected inputs. For example, a program should
be able to store more elements in a data
structure than originally anticipated. If our
Datatel system allowed for a limited number of
student records, then that could become a serious
issue for the institution (considering we need to
store transcripts indefinitely).
8
Adaptability ( 2.1.1)
Most software, like word processors, is expected
to last for many years. Therefore it needs to be
able to respond to changing conditions over time.
This concept is adaptability. Software should
also be portablerun on different platforms.
9
Reusability ( 2.1.1)
  • Code should be usable as a component of different
    systems in various applications to save
  • time
  • money
  • But not at the expense of correctness!

10
Object-Oriented Design Principles ( 2.1.2)
  • Main principles
  • abstraction
  • encapsulation
  • modularity

11
Abstraction ( 2.1.2)
  • Reduce a complicated system down to its most
    fundamental parts, and describe these parts in
    simple, precise language.
  • name the parts
  • describe their functions
  • Abstract Data Type (ADT)
  • a model of a data structure that specifies the
    type(s) of data stored, operations supported with
    types of parameters
  • specifies an interface (the what but not the how)
  • realized by a concrete data structurea class

12
Abstraction Example ( 2.1.2)
  • Most GUIs provide an abstraction of an edit menu
    that offers several text-editing operations,
    including
  • cutdelete selected text and graphics and place
    in external storage buffer
  • pasteinsert contents of external storage buffer
    in selected location
  • Thus the abstract functionality of an edit menu
    and its cutting and pasting operations is
    specified in a language precise enough to be
    clear, but simple enough to abstract away
    details regarding implementation.

13
Encapsulation ( 2.1.2)
Also known as information hiding, encapsulation
is a principle of OOP that states that different
components of a software system should not reveal
the internal details of their respective
implementations. The edit menu is useful since we
can completely understand how to use it without
knowing exactly how implemented. Programmer must
maintain the abstract interface users see, but
free to modify specific implementation.
14
Modularity ( 2.1.2)
  • Modularity refers to an organizing structure in
    which different components of a software system
    are divided into separate functional units.
  • helps to enable software reusabilitywhen modules
    written in an abstract way to solve general
    problems, code can be reused when instances of
    same general problem arise in different settings
  • often involves a hierarchical system, grouping
    together common functionality at the most general
    level, and viewing specialized behavior as an
    extension of the general one
Write a Comment
User Comments (0)
About PowerShow.com