You are on page 1of 14

IO DESIGN

Sequence Diagram 1:
First User activates the Input Frame. Here it asks for which type of data you want to enter. User can
press the button1 in-order to enter the input file. In-order to enter the database file he can press the
button2. He can press the button3 to exit he current window.
Input Data Input Frame Input Frame1

User
< activate >
Click Button1 to
activate Input Frame

Click Button1 to
activate Input Frame1
Sequence Diagram 2:

Input Frame Read File Choose Algorithm

User
< activate >
Enter File name

Enter no of Clusters

Reads data from file


Read Data ()
to data points set

Press the Choose Algorithm button

First User activates the Input Frame. Here it asks for File Name Which contains the data points to be

cluster. And also it asks for number of clusters to be done. After entering the details it takes the data

from file and converts data into Vector of data points.

After User has to press the choose Algorithm button in order process the data points

in the vector by chosen algorithm. When user presses the choose algorithm button in the input frame it

will take the data from file into vector and gives the vector to chosen algorithm in order to process it.
Sequence Diagram 3:

Input Frame1 Database Choose Algorithm

User
< activate >

Choose table1, table2


from choice buttons

Enter no of Clusters

Read Data () Reads data from data


base to data points set

Press the Choose Algorithm button

First User activates the Input Frame1. Here it asks for tables names in select buttons. User can select the

tables from data bases. And also it asks for number of clusters to be done. After entering the details it

takes the data from file and converts data into Vector of data points.

After User has to press the choose Algorithm button in order process the data points

in the vector by chosen algorithm. When user presses the choose algorithm button in the input frame it

will take the data from file into vector and gives the vector to chosen algorithm in order to process it.
Sequence Diagram 4:

Choose Algorithm CURE K-Means

User
< activate >
Press the CURE button

Press the K-Means Algorithm button

Here first User activates the choose algorithm boundary object. Then it will prompts for two

algorithms to be done. First one is CURE algorithm and the second one is K-Means algorithm. User may

choose one of the buttons to process the input data.

If user clicks the CURE button the input data which is converted into Vector will be passed as

input to the CURE class.

If user clicks the K-Means algorithm button the input data which is converted into vector will be

passed as input to the K-Means class.


sequence Diagram 5:

CURE Cluster Heap Show Output

User
< activate >
Forms the initial
clusters

Form the min Heap with cluster distances

Get the Root Element from Heap

Merge the closest


clusters

Update the Heap

< Show Output >

Here first User activates the Cure Algorithm. Then first it forms the initial clusters with the given data

points and forms the initial min-heap with those clusters. After that it gets the root element from the

min-heap and then also gets the closest cluster of the root element and merges those clusters. And then

it updates the heap. It repeats this procedure until the number of clusters reached to the no of clusters

element.
Sequence Diagram 6:

K-Means Cluster Show Output

User
< activate >
< Start analysis >

Set initial centroids

Forms the initial clusters

Arrange the data points into


clusters in a random order

Update the clusters n-times


depending on the updated centroid.

< Show Output >

First user activates the K-Means algorithm. The memory will be allocated for clusters.

And then start analysis method will be called. In that first it sets the initial c4entroids and then it assigns

the data points to clusters in the random order. And repeat the assignment of data points to clusters

until n-times depending on the updated centroids. Finally it displays the output.
Sequence Diagram 7:

Show Output Show Graph

User
< activate >

Displays the output

Save the output

If the chosen algorithm is


< Show Graph >
CURE we can shrink the
representative points

Here first user activates the Show output boundary object. First it displays the output. We

can also save the output. And we can also view the graph by slicking the show graph button. If the

chosen algorithm is CURE then we can shrink the representative points.


3.5 Object Behavior:

The non-trivial behavior of the system can be modeled through building state chart
diagram. State Chart diagram represent behavior from perspective of single object.

State Chart Diagram for Input object:

Active

Choose Data

Give the no of clusters

Convert data into Vector

Inactive

Inactive Closed Archived


State Chart Diagram for Choose Algorithm object:

Active

Choose Algorithm K-Means Algorithm

CURE Algorithm

Show Output

Inactive Closed Archived


State Chart Diagram for CURE object:

Active

Choose CURE algorithm

Form Initial Clusters

Form the Min Heap with the Merge two closed clusters
cluster distances

no of clusters < present clusters

Update the Heap

Display Output

Inactive Closed Archived


State Chart Diagram for K-Means object:

Active

Choose K-Means Algorithm

Create clusters

Set Initial Centroids

Allocate data points to


clusters randomly

Update centroids and move data points


between clusters based on the centroids for
n-times

Display Output

Inactive Closed Archived


State Chart Diagram for Save Output object:

Active

Click Save output button

Write rules into file

Store file on disk

Inactive Closed Archived


state Chart Diagram for Show Graph object:

Active

Click Show Graph button

If CURE
Displays the Graph Shrink Representative points

If K-Means

Show Graph

Inactive Closed Archived

You might also like