Difference between revisions of "OOP Class6"

esse quam videri
Jump to: navigation, search
m (UML)
Line 1: Line 1:
==UML==
+
==What is UML==
 +
;UML : Unified Modeling Language.
 +
:"A modeling language is a language whose vocabulary and rules focus on the conceptual and physical representation of a system"
 +
The Unified Modeling Language User Guide, Booch Rumbaugh Jacobson
 +
ACM Press, Addison Wesley 1999 ISBN 0201571684
 +
[http://www.amazon.com/gp/product/0201571684/104-7742183-3467114?v=glance&n=283155 The Unified Modeling Language User Guide]
 +
==Simple Notation==
 +
Class notation in UML
 +
 
 +
The name of the Class should go inside of a box
 +
 
 +
{| align="center" style="border:2px solid black;"
 +
|Shape
 +
|-
 +
| style="border-bottom:2px solid black;" | 
 +
|-
 +
| 
 +
|}
 +
 
 +
 
 +
==UML Resources==
 
[http://www.gnome.org/projects/dia/ Dia A Drawing Program]
 
[http://www.gnome.org/projects/dia/ Dia A Drawing Program]
  
Line 5: Line 25:
  
 
[http://iam.colum.edu/oop/browser/browser.aspx?f=/classsource/class6/DiagramDog Dog Diagrams with Dia]
 
[http://iam.colum.edu/oop/browser/browser.aspx?f=/classsource/class6/DiagramDog Dog Diagrams with Dia]
 
==What is UML==
 
 
==Simple Notation==
 
  
 
==Dog Exmaples==
 
==Dog Exmaples==

Revision as of 17:01, 28 February 2006

What is UML

UML 
Unified Modeling Language.
"A modeling language is a language whose vocabulary and rules focus on the conceptual and physical representation of a system"

The Unified Modeling Language User Guide, Booch Rumbaugh Jacobson ACM Press, Addison Wesley 1999 ISBN 0201571684 The Unified Modeling Language User Guide

Simple Notation

Class notation in UML

The name of the Class should go inside of a box

Shape
 
 


UML Resources

Dia A Drawing Program

Dia for windows

Dog Diagrams with Dia

Dog Exmaples

Simple Dog Class from week 5 DogSimple.cs - source
DogSimple.png <csharp>using System;

//Dog simple class definition public class Dog {

	public string Name;		// the dog's name

public int Age; // the dog's age public int Weight; // the dog's weight public string BarkSound; // the sound of the dog's bark

public Dog() { BarkSound = "Woof!!!"; }

public void Bark() { //put bark code here } public void Eat() { //put eat code here } }</csharp>


Dog UML with Types

Dog Class with Types from week 4 DogWithTypes.cs - source

DogWithTypes.png <csharp>using System;

//Dog simple class definition public class Dog {

	public string Name;		// the dog's name

private int Age; // the dog's age public int Weight; // the dog's weight public string BarkSound; // the sound of the dog's bark private int barkCount; //The number of time the dog has barked public Dog() { BarkSound = "Woof!!!"; }

public string Bark() { string strBark = this.BarkSound;

       barkCount ++;
       return strBark;

}

public void Eat() { //put eat code here } }</csharp>

OOP Full Dog Diagram