UML III - Object-Oriented Programming II - Notes | CMSC 132, Study notes of Computer Science

Material Type: Notes; Professor: Padua-Perez; Class: OBJECT-ORIENTED PROG II; Subject: Computer Science; University: University of Maryland; Term: Unknown 2006;

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-81q-1
koofers-user-81q-1 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC 132:
Object-Oriented Programming II
UML III
Department of Computer Science
University of Maryland, College Park
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download UML III - Object-Oriented Programming II - Notes | CMSC 132 and more Study notes Computer Science in PDF only on Docsity!

CMSC 132:

Object-Oriented Programming II

UML III

Department of Computer Science

University of Maryland, College Park

UML Examples

Read UML class diagram Try to understand relationships Examples

Pets & owners Computer disk organization Banking system Home heating system

UML Example โ€“ Veterinary System Try to read & understand UML diagram โ€ข^

1 or more Pets associated with 1 PetOwner

UML Example โ€“ Computer System

Try to read & understand UML diagram

UML Example โ€“ Banking System

Try to read & understand UML diagram

UML Example โ€“ Banking System

-^

1 Bank associated with 0 or more Accounts

-^

Checking, Savings, MoneyMarket are Accounts

UML Example โ€“ Home Heating System

โ€ข^

Each Thermostat is associated with 1 Room

-^

Each Thermostat associated with 0 or more Heaters

-^

ElectricHeater is a specialized Heater

-^

AubeTH101D is a specialized Thermostat

UML Class Diagrams

โ†”โ†”โ†”โ†”

Java

Different representation of

same

information

Name, state, behavior of class Relationship(s) between classes

Practice deriving one from the other

Accurately depicting relationship between classes

UML

โ†’โ†’โ†’โ†’

Java : Veterinary System

UML Java^ class Pet {

PetOwner myOwner;

// 1 owner for each pet

} class PetOwner {

Pet [ ] myPets;

// multiple pets for each owner

Java

โ†’โ†’โ†’โ†’

UML : Veterinary System

Java^ class Pet {

PetOwner myOwner;

// 1 owner for each pet

} class PetOwner {

Pet [ ] myPets;

// multiple pets for each owner

} UML

UML Class Diagrams

โ†”โ†”โ†”โ†”

Java

UML Java^ class Pet {

PetOwner myOwner;

// 1 owner for each pet

} class PetOwner {

Pet [ ] myPets;

// multiple pets for each owner

UML

โ†’โ†’โ†’โ†’

Java : Computer System

UML Java

UML

โ†’โ†’โ†’โ†’

Java : Computer System

UML Java

Design code using all available information in UMLโ€ฆ

UML

โ†’โ†’โ†’โ†’

Java : Computer System

Java^ class CPU {

Controller [ ] myCtlrs; } class Controller {

CPU myCPU; } class SCSIController extends Controller {

DiskDrive [ ] myDrives = new DiskDrive[4]; } Class DiskDrive {

SCSIController mySCSI; }