Top Banner
Object Oriented Design
20

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

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Object Oriented Design. Goals  Levels of abstraction  Workshop: group meeting for Pragmatic Web homework.

Object Oriented Design

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

Goals

Levels of abstraction Workshop: group meeting for Pragmatic

Web homework

Page 3: 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)

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

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)

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

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

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

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)

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

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

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

Levels of Abstraction

Semantic Level

Syntactic Level

Machine LevelGeneration

Specification

Implementation

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

Specification Level: UML Sequence Diagram

die ()

X

[see shrimp]

octopus:animal

Generation

Specification

Implementation

shrimp:animal

try-to-eat ()

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

Implementation Level: VAT

Generation

Specification

Implementation

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

Generation Level: Java Byte Code generated by Ristretto®

Generation

Specification

Implementation

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

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

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

Specification for End-Users

Specify agent classes from predefined types

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

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

support for particular applications

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

Generation for End-Users

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

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

Meta-Specification: creating templates

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

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

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

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

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

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

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

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

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