Graphics Editor Model

Interface Figure
Realization: ClosedFigure
Operations:
visibility return name
public void display
public void rotate
  parameters:
Point center
float angle
public void translate
  parameters:
float x
float y


Class Circle
Supertypes: Ellipse
Attributes:
visibility type name
Operations:
visibility return name
public float perimeter


Class ClosedFigure
Specification: Figure
Subtypes: Ellipse, Polygon
Associations:
visibility type properties
  Color Rolename: fillColor
Multiplicity: 1
Navigable: true
  Color Rolename: lineColor
Multiplicity: 1
Navigable: true
Attributes:
visibility type name
Operations:
visibility return name


Class Color
Associations:
visibility type properties
  ClosedFigure Rolename: (none)
Multiplicity: 1
Navigable: false
  ClosedFigure Rolename: (none)
Multiplicity: 1
Navigable: false
Attributes:
visibility type name
private float red
private float green
private float blue
private float alpha
Operations:
visibility return name


Class Ellipse
Supertypes: ClosedFigure
Subtypes: Circle
Attributes:
visibility type name
private Point focus1
private Point focus2
Operations:
visibility return name
public float perimeter
public void rotate
  parameters:
Point center
float angle
public void translate
  parameters:
float x
float y
public void display


Class Point
Associations:
visibility type properties
  Polygon Rolename: (none)
Multiplicity: 1
Navigable: false
Attributes:
visibility type name
private float x
private float y
Operations:
visibility return name
public void translate
  parameters:
float x
float y


Class Polygon
Supertypes: ClosedFigure
Subtypes: Triangle, Quadrangle
Associations:
visibility type properties
  Point Rolename: vertices
Multiplicity: 3..*
Navigable: true
Ordering: ordered
Attributes:
visibility type name
Operations:
visibility return name
public float perimeter
public void rotate
  parameters:
Point center
float angle
public void translate
  parameters:
float x
float y
public void display


Class Quadrangle
Supertypes: Polygon
Subtypes: Rectangle
Attributes:
visibility type name
Operations:
visibility return name


Class Rectangle
Supertypes: Quadrangle
Subtypes: Square
Attributes:
visibility type name
private float side1
private float side2
Operations:
visibility return name
public float perimeter


Class Square
Supertypes: Rectangle
Attributes:
visibility type name
Operations:
visibility return name
public float perimeter


Class Triangle
Supertypes: Polygon
Attributes:
visibility type name
Operations:
visibility return name
public float perimeter