Object Oriented Design. Goals Levels of abstraction Workshop: group meeting for Pragmatic Web...

20
Object Oriented Design
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    216
  • download

    0

Transcript of Object Oriented Design. Goals Levels of abstraction Workshop: group meeting for Pragmatic Web...

Object Oriented Design

Goals

Levels of abstraction Workshop: group meeting for Pragmatic

Web homework

What is Abstraction?

A design technique that focuses on the essential aspects of an entity and ignores or conceals less important or nonessential aspects.

(http://people.cs.vt.edu/~kafura/cs2704/abstraction.html)

What is Abstraction?

Programming in an appropriate level of abstraction means choosing ‘primitives’ that are appropriate for the problem (and to the programmer) at hand.

Separates the programming task into two nearly independent tasks solving the original problem in terms of “abstract

primitives” dealing with the details of implementing these abstract

primitives

(Leron, 1987)

What is Abstraction?

What we’ve been doing so far (e.g. in the design of Frogger and Space Invaders)!

A big part of OO design is about abstraction Creating classes (attributes, operations) and

specifying their interactions with other classes encapsulates functionality in meaningful high-level

chunks or groups abstracts functionality to a higher level where

concepts of the problem domain are better understood and communicated

A good abstraction is… Well named

meanings, intuitions, impressions, and expectations generated by a name accurately reflect the nature of the abstraction

Coherent contains a related set of attributes and behavior that

makes sense from the viewpoint of the modeler Complete

contains all of the attributes and behavior necessary to manipulate the abstraction for its intended purpose

Accurate & Minimal does not contain attributes or behavior extraneous to the

purpose for which it is defined

(http://people.cs.vt.edu/~kafura/cs2704/abstraction.html)

Why Abstraction? Crucial for creating tractable software

because the real-world objects are too complex to be captured and understood in complete detail

Creates a higher conceptual level that hides implementation details is closer to human cognition, how we think

about a problem => Promotes understanding and affords

communication

Levels of Abstraction

Semantic Level

Syntactic Level

Machine LevelGeneration

Specification

Implementation

Specification Level: UML Sequence Diagram

die ()

X

[see shrimp]

octopus:animal

Generation

Specification

Implementation

shrimp:animal

try-to-eat ()

Implementation Level: VAT

Generation

Specification

Implementation

Generation Level: Java Byte Code generated by Ristretto®

Generation

Specification

Implementation

Specification Level for AgentSheets

Behavior Wizard Specification tool at the level of

UML specifically for AgentSheets Specify agent classes from

predefined types Specify behavior at a high level

Generates behaviors at the implementation level (VAT)

Generation

Specification

Implementation

Specification for End-Users

Specify agent classes from predefined types

Specification for End-Users Specify behavior at a high level Implementation for End-Users High-level programming provides customized

support for particular applications

Generation for End-Users

Generates behaviors at the lower-level of implementation (VAT)

Meta-Specification: creating templates

Different aggregations of underlying behaviors Different points of user control (parameters) Overlapping or disjoint

Issues

Conceptual Finding the right level of abstraction

For EUP, knowing who the user is, is especially important

Deciding what to show, what to hide, how much detail, what should be visible to the user, what aspects of the behavior should be controllable by the user

Technical Providing the mapping from the specification to the

implementation level

Homework 4 Choose a name for your team. Design the project AS A TEAM. Use any design

methods/diagrams you find useful as a means to organize your work and communicate as a team.

Implement the project in AgentSheets AS A TEAM. You are responsible for finding meaningful ways to divide workload within your team.

ONE member of your team should turn in (via email): Team name and members Design diagrams AgentSheets Project folder (zipped or stuffed): Please follow naming

conventions (use your team's name) Description of your project including directions on how to use it.

Please include any insights on pragmatic web applications, accessing data, utilizing it in a simulation, and presenting it to the user.

Due: Oct. 1

Reading Assignment Download “ComponentWare” article from class

web site and read it before you come to class on Thursday 9/26.

We will use it as a basis for a class discussion on objects, components and reuse. Reminder: class participation counts towards your

grade Due: Sept. 26

Workshop

If you do not have a group, join an existing one or form new ones with other “groupless” classmates

Meet with your group Design project Divide workload among group members