23
1 SFTW 372 Object-Oriented Analysis and Design Project D-A7-2886 Xu Tian Chen D-A7-2903-2 Li Chao Zheng D-A7-2758 Ng Chi Wai D-A7-2819 Cao Han D-A7-2829 Xie Ming

SFTW 372 Object Oriented Analysis and Design Project file1 SFTW 372 Object -Oriented Analysis and Design Project D-A7-2886 XuTian Chen D-A7-2903-2 LiChao Zheng D-A7-2758 NgChi Wai

  • Upload
    lethuan

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

1

SFTW 372

Object-Oriented Analysis

and Design Project

D-A7-2886 Xu Tian ChenD-A7-2903-2 Li Chao ZhengD-A7-2758 Ng Chi WaiD-A7-2819 Cao HanD-A7-2829 Xie Ming

2

Catalog

Introduction---------------------------------------------2

Program Objective--------------------------------------2

Use case-----------------------------------------------2

Use case diagram-------------------------------------16

Class diagram-----------------------------------------17

Sequence diagram------------------------------------18

Conclusion-------------------------------------------20

3

IntroductionIntroductionIntroductionIntroductionOur project is a music player, before our music player it is a lot of music

player, for example: the Window Media Player, the KMPlayer, the TTPlayer

etc. The TTPlayer is a music player, it can support webpage to play music

and sync play lyric. The Window Media Player is a multimedia player, it can

play sync music. The KMPlayer is a multimedia player, it is very easy to

control and can support more common codes such as map3, AVI, MPEG

etc, so it can replace most media player. However, our music player can

add songs, delete songs search by song and singer, update songs and match

song.

ProgramProgramProgramProgram ObjectiveObjectiveObjectiveObjectiveIn our music player, we possess many functions, which are dedicated

to facilitate the customer operation. Here is the outline of the functions:

(1) Add songs to music player.

(2) Delete songs from music player.

(3) Sort songs in the music player.

4

(4) Find out songs which are needed by customers.

(5) Similarly, we can implement the four operations above to singer,

composer, author, album, instrument, style. For example, add singers to

music player, etc.

Therefore, in the following steps, we will use UML to complete system

design. In the process, use-case diagram, sequence diagram and class

diagram are added to describe how to make the music player in details.

UUUUsesesese casecasecasecaseUseUseUseUse CaseCaseCaseCase UC1:UC1:UC1:UC1: AddAddAddAdd TrackTrackTrackTrack

ScopeScopeScopeScope New music classification system

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Provider

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Provider: The provider needs this function toadd a new track.- Administrator: The administrator needs thisfunction to manage the system to add newtracks.

PreconditionsPreconditionsPreconditionsPreconditions User is identified and authenticated.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee The track is saved to the database. The track issuccessfully identified and classified.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. User opens the music player.2. User wants to add a track to the database.3. User calls the add_track function.4. The system performs the add_trackfunction.

5

5. The system performs the classify function.6. The add_music success to add track to thedatabase.

ExtensionsExtensionsExtensionsExtensions a. Override: If an accident occurs, then thesystem should remind user by dialogue boxand go back to override.

b. System fail: If the adding track alreadyexists in the library, then the system shouldremind the Administrator by dialogue box.

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

Language internationalization on the textdisplayed.

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariationsListListListList

a. Administrator enters by entering anauthorization code.

b. Automatically classify track by evaluation.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous Can the Administrator add a track, or just theuser can add a track?

UseUseUseUse CaseCaseCaseCase UCUCUCUC2222:::: DeleteDeleteDeleteDelete TrackTrackTrackTrack

ScopeScopeScopeScope New music classification system

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Provider

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Provider: The provider needs this function todelete music.- Administrator: The administrator needs thisfunction tomanage the system to delete someinvalid tracks.

PreconditionsPreconditionsPreconditionsPreconditions User is identified and authenticated as theoriginal up-loader of the track.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee The music delete from the database.

6

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. User opens the system.2. User wants to delete track from thedatabase.3. User calls the delete_track function.4. The system performs the delete_trackfunction.5. The delete_track success to delete musicfrom the database.

ExtensionsExtensionsExtensionsExtensions a. Override: If an accident occurs, then thesystem should remind user by dialogue boxand go back to override.

b. System fail: If the track does not exist inthe library, then the system should remindthe Administrator by dialogue box.

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

Language internationalization on the textdisplayed.

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariations ListListListList

Administrator enters by entering anauthorization code.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous Can the Administrator delete the track, or justthe user can delete the track?

UseUseUseUse CaseCaseCaseCase UCUCUCUC3333:::: UpdateUpdateUpdateUpdate TrackTrackTrackTrack

ScopeScopeScopeScope New music classification system

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Provider

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Provider: The provider needs this function toupdate the tracks, and has privilege to updatethem.- Administrator: The administrator needs thisfunction to manage the system to keep itup-to-date.

7

PreconditionsPreconditionsPreconditionsPreconditions User is identified and authenticated as theoriginal up-loader of the track.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee The music delete from the database.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. User opens the system.2. User wants to update track from thedatabase.3. User calls the update_track function.4. The system performs the update_trackfunction.5. The update_track success to update musicin the database.

ExtensionsExtensionsExtensionsExtensions a. Override: If an accident occurs, then thesystem should remind user by dialogue boxand go back to override.

b. System fail: If the track does not exist inthe library, then the system should remindthe Administrator by dialogue box.

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

Language internationalization on the textdisplayed.

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariations ListListListList

a. Administrator enters by entering anauthorization code.

b. Automatically adjust the classifying byevaluation.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous Can the Administrator update the track, orjust the user can update the track?

UseUseUseUse CaseCaseCaseCase UCUCUCUC4444:::: ModifyModifyModifyModify TrackTrackTrackTrack InformationInformationInformationInformation

ScopeScopeScopeScope New music classification system

LevelLevelLevelLevel Sub-function

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Administrator

8

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

Administrators: Wants to modify tracks orrelated information.

PreconditionsPreconditionsPreconditionsPreconditions Tracks which are going to be operated areexisted

SuccessSuccessSuccessSuccessGuaranteeGuaranteeGuaranteeGuarantee

The search algorithm should be efficient. Theclassification of the track information should beright. The capacity of the song library should belarge enough.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. Administrators open the system2. Administrators enter ID and password.3. Administrators modified the relatedinformation.

4. Administrators save the behavior.5. Administrators check the modifiedinformation.

6. Administrators log out the system.

ExtensionsExtensionsExtensionsExtensions a. If the computer is shut down, when systemrunning, the system should have a ability torecovery avoid losing data.

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

- Language internationalization on the text

displayed.

- Recovery to get the deleted song and related

information on song library system

- The system should have simplified GUI instead of

code line.

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariationsListListListList

a. The related information should be hold indata structure.

b. The song library was built by database onwebsite.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - Explore the remote operation by mobile

9

phone.

- How many Administrators are appropriate forcontrol the library

- Do we have to set the mortar forAdministrators

UseUseUseUse CaseCaseCaseCase UCUCUCUC5555:::: FilterFilterFilterFilter TrackTrackTrackTrackssss

ScopeScopeScopeScope New music classification system.

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Common User

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Common User: want to search for a certaintrack as soon as possible or search aspecific type of tracks quickly.

- Administrators: want an easier way topack different kinds of music.

- Provider: want an easier way to find thetrack.

PreconditionsPreconditionsPreconditionsPreconditions User is identified and authenticated.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee Track are correctly indexed and saved in thedatabase. No overlapped indices.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. User enters classification system.2. User pack the expected track2.1 Search by keywords.2.2 Search in classified folder tree.3. List out the filtering results.4. Calculate the number of the results.5. User log out.

ExtensionsExtensionsExtensionsExtensions Search failed: The track does not exist.

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

Every user has to log in before using thisfunction.

10

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariations ListListListList

a. Data are well organized in data structure.b. An efficient search algorithm isimplemented.

c. Managing data by Database.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - Explore more efficient classification.- How to protect and maintain the datacompleteness?

UseUseUseUse CaseCaseCaseCase UCUCUCUC6666:::: ManageManageManageManage TracksTracksTracksTracks

ScopeScopeScopeScope New music classification system.

LevelLevelLevelLevel Sub-function

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Administrator

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

Administrators: want an easier way to packand manage different kinds of music.

PreconditionsPreconditionsPreconditionsPreconditions Administrator is identified and authenticated.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee Every folder administrator created exists.Every folder holds the corresponding type ofsongs. Every track index is belonging to onecategory.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. Administrator enters classification system.2. Administrator begins to classify or packtracks.

3. Administrator creates various folders withdifferent functions.

4. Drag the wanted songs into thecorresponding folders.

Administrator repeats until tracks enteringtheir own category.5. Show the tree interface with informationcounter.

6. When logout, the system displays all song

11

information in different folders, confirm.7. Succeed in modification.

ExtensionsExtensionsExtensionsExtensions a. The same track does not belong to anyfolder: the system will give a warning.b. The folder is empty: the system will give awarning: “some folder is empty!”

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

- Every administrator has to logout after theymodify the content.

- Every administrator only has a limited timeto login the system, and he or she will berepelled from the system with a logoutconfirmation.

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariationsListListListList

a. Item identifiers entered by keyboard.b. Dragging songs to folders by mouse.c. Managing data by Database.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - What if the system collapsed when theoperation is going on?

- Explore more efficient classification.- Must limit the time the administrator usesthe system?

- Is data lost when administrator closes thesystem carelessly?

- How to protect and maintain the datacompleteness?

UseUseUseUse CaseCaseCaseCase UCUCUCUC7777:::: PlayPlayPlayPlay TracksTracksTracksTracks

ScopeScopeScopeScope New music classification system.

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Common User

12

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Common User: Play and listen thetrack.- Administrator: Play and test the track.- Provider: Play and test the track.

PreconditionsPreconditionsPreconditionsPreconditions User is identified and authenticated.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee Correct player for the format is found inuser’s computer.

MainMainMainMain SuccessSuccessSuccessSuccess ScenarioScenarioScenarioScenario 1. User log in the system.2. User finds the track for playing.3. User plays the track.4. User closes the player.5. User log out.

ExtensionsExtensionsExtensionsExtensions System fails:1. The track does not exist.2. The decoder or the player doesnot exist.

3. Raise the error report.

SpecialSpecialSpecialSpecial RequirementsRequirementsRequirementsRequirements - Deal the problem with special format.

TechnologyTechnologyTechnologyTechnology andandandand DataDataDataDataVariationsVariationsVariationsVariations ListListListList

a. Automatically match the playerregistered in user’s computer.b.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - How could the decoder be found?- What to do if the format can’t beidentified.

UseUseUseUse CaseCaseCaseCase UCUCUCUC8888:::: MatchMatchMatchMatch LyricsLyricsLyricsLyrics

ScopeScopeScopeScope New music classification system.

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Common User

13

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Customers: want to see lyrics while listeningto tracks and have comprehensive feelings.

- Administrator: want better services forcustomers.

PreconditionsPreconditionsPreconditionsPreconditions Administrator is identified and authenticated.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee Every piece of song is linked with web libraryof lyrics correctly.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. Administrator enters the system.2. Administrator begins to enter every folder,respectively.3. Check whether there are lyrics of a specificsong.4. Administrator matches every song with weblibrary of lyrics if available, otherwise, note: noweb lyrics.Administrator repeats until all songs arematched.5. Count the number of songs matched inevery folder with system tool and record thenumber.6. Check whether there exist songs withoutmatching.7. When administrator logouts the system, thesystem displays all song information indifferent folders, confirm.8. Succeed in modification.

ExtensionsExtensionsExtensionsExtensions a. The same song is linked with different weblyrics: the system will give a warning: “alreadymatched!”

b. A song is not matched when you logout: thesystem will give a warning: “some songs arenot matched, please check!”

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

- Every administrator has to logout after they

14

modify the content.

- Every administrator only has a limited timeto login the system, and he or she will berepelled from the system with a logoutconfirmation.

TechnologyTechnologyTechnologyTechnology andandandandDataDataDataData VariationsVariationsVariationsVariations ListListListList

a. Item identifiers entered by keyboard.

b. Open folders by mouse.

c. Managing data by Database.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - What if the system collapsed when theoperation is going on?

- Explore more efficient access.- Must limit the time the administrator usesthe system?

- Explore an effective warning way whensome song is not matched butadministrator does not know.

- How to protect and maintain the datacompleteness?

UseUseUseUse CaseCaseCaseCase UCUCUCUC9999:::: SearchSearchSearchSearch bybybyby typetypetypetype

ScopeScopeScopeScope New music classification system.

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Common User

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Customers: want to search the specifiedtype of songs in the data base and list themtogether

- Administrator: want better services forcustomers.

15

PreconditionsPreconditionsPreconditionsPreconditions Index of one specified type constructedalready.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee Every piece of song is linked with weblibrary.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. Users enters the system.2. System match the key words and theidentifier in the object of the class type3. Followng the link list in the object, findthe songs information in the data base.4. List the all songs information on thescreen.5. Close the data base6. Succeed in Searching.

ExtensionsExtensionsExtensionsExtensions a. mixd search: search by multiple keywords

b.A song with multiple type, supportmultiple type search

SpecialSpecialSpecialSpecial RequirementsRequirementsRequirementsRequirements - Multiple search should be constructed.

TechnologyTechnologyTechnologyTechnology andandandand DataDataDataDataVariationsVariationsVariationsVariations ListListListList

a. Item identifiers should be designed foreach type.

b.link list of addresses of songs should bedesigned for each type.

c. Managing data by Database and ClassType.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - What if the system collapsed when theoperation is going on?

- Explore more efficient access.

16

- How about predicting the time cost?- Explore an effective warning way whensome song is not listed but user does notknow.

- How to protect and maintain the datacompleteness?

UseUseUseUse CaseCaseCaseCase UCUCUCUC10101010:::: SearchSearchSearchSearch thethethethe musicmusicmusicmusic bybybyby composercomposercomposercomposer

ScopeScopeScopeScope New music classification system.

LevelLevelLevelLevel User-goal

PrimaryPrimaryPrimaryPrimary ActorActorActorActor Common User

StakeholdersStakeholdersStakeholdersStakeholders andandandandInterestsInterestsInterestsInterests

- Customers: want to find out what theywant to listen.

- Administrator: want better services forcustomers.

PreconditionsPreconditionsPreconditionsPreconditions Administrator is identified andauthenticated.

SuccessSuccessSuccessSuccess GuaranteeGuaranteeGuaranteeGuarantee Every piece of song is linked with web librarycorrectly.

MainMainMainMain SuccessSuccessSuccessSuccessScenarioScenarioScenarioScenario

1. Common user opens the system.2. User inputs the composer name in thecorresponding position.3. Check whether or not there is the specificsong.User repeats until the song exists.4. Display all songs composed by the specificcomposer.6. Choose one song you are interested in.7. Add the song in the song list and start toplay.8. Succeed in finding out the specific song.

ExtensionsExtensionsExtensionsExtensions a. A song does not exist when you search:

17

the system will give a warning: “the songdoes not exist!”

SpecialSpecialSpecialSpecialRequirementsRequirementsRequirementsRequirements

- Every user needs to input precisecomposer name to search the song.

TechnologyTechnologyTechnologyTechnology andandandand DataDataDataDataVariationsVariationsVariationsVariations ListListListList

a. Item identifiers entered by keyboard.

b. Open folders by mouse.

c. Managing data by Database.

FrequencyFrequencyFrequencyFrequency ofofofofOccurrenceOccurrenceOccurrenceOccurrence

Could be nearly continuous.

MiscellaneousMiscellaneousMiscellaneousMiscellaneous - What if the system collapsed when theoperation is going on?

- Explore more efficient access.- Must limit the time the administratoruses the system?

- Explore an effective warning way whensome song is not matched butadministrator does not know.

- How to protect and maintain the datacompleteness?

18

UseUseUseUse----CaseCaseCaseCase DiagramDiagramDiagramDiagram

A use case diagram in the UML is a type of behavioral diagram defined

by and created from a Use-case analysis. Its purpose is to present a graphical

overview of the functionality provided by a system in terms of actors, their

goals (represented as use cases), and any dependencies between those use

cases.

The main purpose of a use case diagram is to show what system functions

are performed for which actor. Roles of the actors in the system can be

depicted.

In my system, there are three actors—administrator, provider, visitor.

They perform different tasks:

(1)Administrator: could manage tracks, search tracks by style, search tracks

by singer and play track.

(2) Provider: could add track, delete track, update track, add singer, delete

singer, search track and play track.

(3) Visitor: could search track by style, by singer,…, and play track.

Here is the use-case diagram as follows:

19

20

CCCClasslasslasslass diagramdiagramdiagramdiagramIn software engineering, a class diagram in the UML is a type of static

structure diagram that describes the structure of a system by showing the

system's classes, their attributes, and the relationships between the classes.

In my system, we use SystemManager as a handling interface including

some basic operations, and all subtasks are released to other classes, and

they accomplish the task through the cooperation between the classes.

21

SSSSequenceequenceequenceequence diagramdiagramdiagramdiagramA sequence diagram in Unified Modeling Language (UML) is a kind of

interaction diagram that shows how processes operate with one another and

in what order.

In my system, we use AddTrack and DeleteTrack as examples. In these

sequence diagrams, we get to know the details of the whole execution through

the diagrams.

AddTrack:

22

DeleteTrack:

23

ConclusionConclusionConclusionConclusionUML is an industry standard for system design and analysis. As we use

this object-oriented technology to establish especially with the increasing

development of complex applications. UML-based notations are used for

design patterns. Secondly, we presented a new UML-based design language

which aims at establishing a useful and personal structure for music player.

We wish that we can design our own system by applying related models.

In our system design, we combine the useful information with common

functions. As long as user wants to find what he or she wants, our system

will help to realize the goal. In the end, the analysis and design for the system

leads to a wider understanding about UML.