Now Loading...

Dapatkan info terbaru via Facebook. Silahkan klik LIKE / SUKA.

?

Thursday, May 31, 2012

Tangram::Tour 2.10


Tangram::Tour Tangram::Tour is a guided tour.

Tangram::Tour is a guided tour.

INTRODUCTION

In this tour, we add persistence to a simple Person design.

A Person is either a NaturalPerson or a LegalPerson. Persons (in general) have a collection of addresses.

An address consists in a type (a string) and a city (also a string).

NaturalPerson - a subclass of Person - represents persons of flesh and blood. NaturalPersons have a name and a firstName (both strings) and an age (an integer). NaturalPersons sometimes have a partner (another NaturalPerson) and even children (a collection of NaturalPersons).

LegalPerson - another subclass of Person - represents companies and other entities that the law regards as 'persons'. A LegalPerson has a name (a string) and a manager (a NaturalPerson).

All this is expressed in the following UML diagram:

+---------------------+ +--------------+
| Person | | Address |
| { abstract } |1-->-*|--------------|
|---------------------| | kind: string |
+---------------------+ | city: string |
| +--------------+
|
+--------------A--------------+
| |
+-------------------+ +---------------+
+--*| NaturalPerson | | LegalPerson |
| |-------------------|manager |---------------|
V | firstName: string |1------+

Requirements:

· Perl



Product's homepage

Requirements:



· Perl


Download Tangram::Tour 2.10 Free
Tags: guided tour   , Tanagram tour   , Perl module   , Tangram   , guided   , tour   ,
string, person, naturalperson, legalperson, city, collection, persons, subclass person, subclass person represents, +--------------+, person represents, firstname, +---------------------+, address, subclass, represents, another, naturalpersons, name, abstract , abstract, perlproduct's, uml, diagram, abstract

No comments:

Post a Comment