Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Zounds International: Class Identification and Sketching, Lecture notes of Computers and Information technologies

The process of identifying classes and sketching their attributes and methods for zounds international, an audiovisual sales company with various divisions and staff. The identification of potential classes, their attributes and methods, ambiguities, and associations.

Typology: Lecture notes

2010/2011

Uploaded on 09/09/2011

rossi46
rossi46 🇬🇧

4.5

(10)

313 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
09/25/2019 System Building 2 PPSDench 1
System Building 2
Lecture 2
Class Associations
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Zounds International: Class Identification and Sketching and more Lecture notes Computers and Information technologies in PDF only on Docsity!

System Building 2

Lecture 2

Class Associations

Content

Classes

Associations

Roles

Generalisation

Specialisation

Aggregation

Composition

Types

Identify classes

All Potential or Candidate classes

Identify/Grade as to the likelihood of being a class

Look for and consolidate aliases

Ignore obvious Instances of classes

Look for kinds of thing

If you find aliases/groups then:

choose/create an encompassing abstraction then where appropriate:

Subclass the significant differences or create:

Interface (an interface class)

And/or Type (a Type Class)

Look for processes/actions/methods

that are not just a method/action of a class

Differentiate duplicate names for different classes/types

Start with those you are most sure of

Can you view these so that the others are redundant/roles/interfaces/types?

Do not worry about getting it right first time!

You can refine it again and again, especially in the light of subsequent analysis.

Part of the task is to identify what things you do not yet know enough about.

Which in this example is pretty much every thing!

Identify classes (Look for kinds of thing or process)

Probably, Probably not, Unsure, Not ( at the moment ), already accounted for/ irrelevant

Zounds international (ZI)

1. Zounds international (Audiovisual sales) has a number of (sub) divisions such as Purchasing,

NetSales, Stock, Retail etc. (Instances??) ‘Retail’ has outlets (e.g. in Malls and High street stores).

NetSales has both ‘Hard’ (CDs, DVDs…) and ‘soft’ (downloads) sales. Retail and Netsales co-operate

to produce ‘Personal mixes’ (Stock??) that they burn (Who, where?) onto CDs to produce items

(stock?) for individual customers.

2. Customers may open an account to facilitate the payment for multiple transactions or they may just

buy goods (Stock?) in individual purchases (Sale?) paying by cash, cheque or card. The staff selling

the goods are recorded.

3. The divisions and subdivisions each have a single manager and may have staff. Staff are employed

by Zounds international and are assigned to exactly one division. There are many types of staff and

their assignment/role (Cleaner, NetSales, Manager) may vary during their time with ZI.

4. All subdivisions have only one parent division but parent divisions may have many subdivisions.

Theoretically all the parent divisions have control over all their subdivisions, though in practice this is

seldom enforced for the mundane ‘day-to-day’ running of the company.

5. All Sub-divisions are cost centres, maintaining their own accounts but constrained to follow a

centralised accounting model with a standard way of maintaining the balance and transaction history

and recording transactions.

6. A sub-division may also be a parent division e.g. Zounds UK is a sub-division of Zounds international

but also a parent of Zounds Sweet (specialising in musical confectionary). ZI has no parent division.

7. Retail staff display and sell traditional stock (Why Traditional?) items (CD, DVD) in the retail outlets to

customers (these people may also be staff). The NetSales staff maintain and sell copies of ‘Soft Stock’

(check differences!) (digitally encoded mediaware that they are licensed to distribute) direct to

customers (or staff). The company’s retail outlets purchase ‘SoftStock’ for the mixes (another kind?).

Concurrently

Identify initial attributes/methods

Probably, (implied?), Probably not, Unsure, Not ( at the moment ) or already accounted for

Zounds international (ZI)

1. Zounds international (Audiovisual sales) Has A number of (sub) divisions ([]?) (id?) such as Purchasing,

NetSales, Stock, Retail etc. ‘Retail’ has outlets ([]?) (e.g. in Malls and High street stores ). NetSales has

both ‘Hard’ (CDs, DVDs…) and ‘soft’ (downloads) sales (type?) (id?). Retail and Netsales co-operate to

produce ‘Personal mixes’ ([]?) (content[]?) (id?) that they burn onto CDs to produce items for individual

customers.

2. Customers may open an account (where, how?) to facilitate the payment ([]?) (invoice) for multiple

transactions ([]?) (id?) or they may just buy goods in individual purchases paying by cash, cheque or card.

The staff selling the goods are recorded.

3. The divisions and subdivisions each have a single manager and may have staff ([]?) (id?). Staff are

employed by Zounds international and are assigned ([]?) (by whom) to exactly one division. There are many

types of staff and their assignment/role (Cleaner, NetSales, Manager) may vary during their time with ZI.

4. All subdivisions have only one parent division but parent divisions may have many subdivisions.

Theoretically all the parent divisions have control (Task/project[]?) over all their subdivisions, though in

practice this is seldom enforced for the mundane ‘day-to-day’ running of the company.

5. All Sub-divisions are cost centres, maintaining their own accounts ([]?) (id?) but constrained to follow a

centralised accounting model with a standard way of maintaining the balance and transaction history ([]?)

(id?) and recording transactions (recordTrans()?).

6. A sub-division may also be a parent division e.g. Zounds UK is a sub-division of Zounds international but

also a parent of Zounds Sweet (specialising in musical confectionary). ZI has no parent division.

7. Retail staff display and sell (makeSale()) traditional stock items (CD, DVD) in the retail outlets to customers

(these people may also be staff). The netSales staff maintain and sell copies of ‘softstock’ (digitally encoded

mediaware that they are licensed (Qty?) to distribute) direct to customers (or staff). The company’s retail

outlets purchase ‘SoftStock’ for the mixes.

Ambiguities/ technical choices

At this stage

Ambiguities appear

Are we viewing things from correct perspective?

Need resolution

Make sensible assumptions (but later…)

Question Customer

Create required (unworkable without) attributes

technical choices may need to be made

([]?) Array?, Collection?, Linked list?, Tree?, DB

Table?

Omit/defer but include accessor/mutator actions

Concurrently

identify associations

Probably, (implied?), Probably not, Unsure, Not ( at the moment ) or already accounted for

Zounds international (ZI)

1. Zounds international (Audiovisual sales) h as a number of ( sub) divisions such as Purchasing,

NetSales, Stock, Retail etc. ‘Retail’ has outlets (e.g. in Malls and High street stores). NetSales has

both ‘Hard’ (CDs, DVDs…) and ‘soft’ (downloads) sales. Retail and Netsales co-operate to produce

(«create»?) ‘Personal mixes’ that they burn onto CDs to produce items for individual customers.

2. Customers may open an account to facilitate the payment for multiple transactions or they may just

buy goods in individual purchases paying by cash, cheque or card. The staff selling the goods are

recorded.

3. The divisions and subdivisions each have a single manager and may have staff. Staff are employed

by Zounds international and are assigned to exactly one division. There are many types of staff and

their assignment/role (Cleaner, NetSales, Manager) may vary during their time with ZI.

4. All subdivisions have only one parent division but parent divisions may have many subdivisions.

Theoretically all the parent divisions have control (assigned tasks/projects?) over all their

subdivisions, though in practice this is seldom enforced for the mundane ‘day-to-day’ running of the

company.

5. All Sub-divisions are cost centres, maintaining their own accounts but constrained to follow a

centralised accounting model with a standard way of maintaining the balance and transaction history

and recording transactions.

6. A sub-division may also be a parent division e.g. Zounds UK is a sub-division of Zounds international

but also a parent of Zounds Sweet (specialising in musical confectionary). ZI has no parent division.

7. Retail staff display and sell traditional stock items (CD, DVD) in the retail outlets to customers (these

people may also be staff). The netSales staff maintain and sell copies of ‘softstock’ (digitally encoded

mediaware that they are licensed (required?) to distribute) direct to customers (or staff). The

company’s retail outlets purchase ‘SoftStock’ for the mixes.

09/25/2019 System Building 2 PPSDench 11

Concurrently

add associations to sketch

TraditionalStock

-lowLevel:int

-qty:int

Stock

-stockNo:int

SoftStock

-qtySold:int

Licence

-forQty:int

Mgr

Division

-mgr:Staff

-StaffMember[]:Staff

-acc:Account[]

-subDiv[]:Division

-parent:Division

-project[]:Project

Staff

-id:int

-div:Division

NetStaff

+maintain(stock)

RetailStaff

+display(Stock)

Cleaner

CustomerAcc

-id:int

-payment[]:

▲ Requires

*subDiv[not ZI]

parentDiv

▲ Controlls

◀manages

manager 1

▲ Assigned to

employee*

▲ Employed by

ZI

▼Purchase

SoftStock

retailOutlet

◀Sell

Open ▼

▲ Of

StockDiv

Purchasing

NetSales

Transaction

mj -time:

-type:

ModelAccount

-bal:Balance

transaction[]:Transaction

+recordTrans(Trans)

▲ Keeps

▼ Record

SaleslStaff

+makeSale():Sale

Outlet

-id

Retail

-outlet[]:Outlet

+purchase(SoftStock)

◀«create»

co-operate

◀Puchase Customer

Record▶ SalesStaff

Customer

-id:int

+openAcc():Account

+purchase(Stock):

+pay(amount):

Sale

-salesPerson:Staff

Person

-name

-address

+openAcc():Account

+purchase(Stock):

+pay(amount):

PersonalMix

-id

-content[]:SoftStock

+Produce(SoftStock[])

◀Puchase Customer

Record▶ SalesStaff

Customer

-id:int

+openAcc():Account

+purchase(Stock):

+pay(amount):

Sale

-salesPerson:Staff

Person

-name

-address

+openAcc():Account

+purchase(Stock):

+pay(amount):

09/25/2019 System Building 2 PPSDench 13

Type depiction

There is a problem with this

It conflicts with Generalisation

(I believe, semantically, typing is closer to realisation)

It is likely to introduce ambiguity

The stereotype is attached to the wrong element

It should be attached to the association

Consider

Person

«Type»

Candidate

«Type»

Employee

«Type»

Retiree

Salaried Casual

X

Z

«Type»

Y

Is Y a type of Z or a type of X or both?

Types

a new notation for Types was needed

suggestions

Person

Employee

T

Person

Employee

T

Person

Employee

T

Person

Employee

T

Person

Employee

T

Person

Employee

09/25/2019 System Building 2 PPSDench 16

So using standard notation

add the types…

TraditionalStock

-lowLevel:int

-qty:int

Stock

-stockNo:int

SoftStock

-qtySold:int

Licence

-forQty:int

«Type»

Mgr

Division

-mgr:Staff

-StaffMember[]:Staff

-acc:Account[]

-subDiv[]:Division

-parent:Division

-project[]:Project

«Type»

Staff

-id:int

-div:Division

«Type»

NetStaff

+maintain(stock)

«Type»

RetailStaff

+display(Stock)

«Type»

Cleaner

CustomerAcc

-id:int

-payment[]:

▲ Requires

*subDiv[not ZI]

parentDiv

▲ Controlls

◀manages

manager 1

▲ Assigned to

employee*

▲ Employed by

ZI

▼Purchase

SoftStock

retailOutlet

◀Sell

Open ▼

▲ Of

StockDiv

Purchasing

NetSales

Transaction

mj -time:

-type:

ModelAccount

-bal:Balance

-transaction[]:Transaction

+recordTrans(Trans)

▲ Keeps

▼ Record

«Type»

SaleslStaff

+makeSale():Sale

Outlet

-id

Retail

-outlet[]:Outlet

+purchase(SoftStock)

◀«create»

co-operate

«Type»

Customer

-id:int

+openAcc():Account

+purchase(Stock):

+pay(amount):

PersonalMix

-id

-content[]:SoftStock

+Produce(SoftStock[])

Sale

-salesPerson:Staff

◀Puchase Customer

Record▶ SalesStaff

Person

-name

-address

+openAcc():Account

+purchase(Stock):

+pay(amount):

FIN