Merge branch 'documentation' into 'main'

Merge entire documentation branch into main

See merge request felixalb/dcst1008-2022-group1!2
This commit is contained in:
Kristoffer Juelsenn 2022-04-26 15:52:59 +02:00
commit 71e29ad73b
51 changed files with 355 additions and 40 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,57 +2,46 @@
' Internal development class diagram
' Describes database fields and object methods required
title Tournament System - Group 1
skinparam Linetype ortho
class User {
*user_id: Integer
google_id: String
name: String
email: String
isManager: Boolean
}
class Match {
*match_id: Integer
tournament_id: Integer
team_ids: Integer[]
scores: Integer[]
parentMatch_id: Integer
team1_id: Integer
team2_id: Integer
winner_id: Integer
Match constructor(tournament_id: Integer, team_ids: Integer[])
void setScore(team_id: Integer, score: Integer)
void setWinner(winner_id: Integer)
tier: Integer
}
class Team {
*team_id: Integer
tournament_id: Integer
name: String
tournament_ids: Integer[]
Team constructor(name: String)
void joinTournament(tournament_id: Integer)
void addPlayer(player_id: Integer)
void removePlayer(player_id: Integer)
void leaveTournament(tournament_id: Integer)
}
class Player {
*player_id: Integer
name: String
team_id: Integer
Player constructor(name: String)
void joinTeam(team_id: Integer)
void leaveTeam()
}
class Tournament {
*tournament_id: Integer
name: String
description: String
prize: String
teamLimit: Integer
start_date: Date
end_date: Date
manager_ids: Integer[]
team_ids: Integer[]
Tournament constructor(name: String, start_date: Date, end_date: Date)
void addTeam(team_id: Integer)
void removeTeam(team_id: Integer)
}
Team "2..*" -- "1..*" Tournament : "Plays in"
Tournament "1" -- "1..*" Match : contains
Player "1..*" -- "1..1" Team : "Belongs to"
Team "2..2" -- "1..*" Match : "Competes in"
Team "2..*" --- "1..1" Tournament : "Plays in"
Team "2..2" --- "1..*" Match : "Competes in"
@enduml
left to right direction
Tournament "1" --- "3..*" Match : contains
@enduml

View File

@ -5,9 +5,9 @@ class Match {
*match_id: Integer
Tournament
Teams
Scores
Winner
}
class Team {
*team_id
Name
@ -15,6 +15,7 @@ class Team {
Players
Matches
}
class Player {
*player_id
Name
@ -37,10 +38,16 @@ class Administrator {
Manager-status
}
Team "2..*" -> "1..*" Tournament : "Plays in"
Tournament "1" --> "1..*" Match : contains
Player "1..*" --> "1..1" Team : "Belongs to"
Team "2..2" --> "1..*" Match : "Competes in"
class User {
}
Team "2..*" - "1..*" Tournament : "Plays in"
Tournament "1" -- "1..*" Match : contains
Player "1..*" -- "1..1" Team : "Belongs to"
Team "2..2" -- "1..*" Match : "Competes in"
Administrator "1..*" -- "0..*" Tournament : "Manages"
Administrator "1..*" -- "0..*" Team : "Manages"
User "0..*" --> "0..*" Tournament : "View overview"
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

View File

@ -0,0 +1,27 @@
@startuml Create Tournament
title Create Tournament
Actor Admin #palegreen
participant Website
database Server #brown
hide footbox
Admin->Website: createTournament(Tournament)
activate Admin
activate Website
Website->Server: sendInfo(Tournament)
activate Server
Server-->Website: {status: success | failure}
deactivate Server
alt status = success
Website->Server: fetchInfo(Tournament)
activate Server
Server-->Website: sendInfo(Tournament)
deactivate Server
Website-->Admin: displayTournament(Tournament)
end
alt status = failure
Website-->Admin: displayError(error)
end
deactivate Admin
deactivate Website
@enduml

View File

@ -0,0 +1,26 @@
@startuml Asura Tournament System
title Login
Actor Admin #palegreen
participant Website
database Server #brown
hide footbox
Admin->Website: login(username, passwd)
activate Admin
activate Website
Website->Server: Login Request
activate Server
Server-->Website: {status: success | failure}
deactivate Server
alt status = success
Website-->Admin: "Login Successful"
opt if (isManager(user))
Website->Admin: redirect(managerPage)
else
Website->Admin: redirect(adminPage)
end
end
deactivate Website
deactivate Admin
@enduml

View File

@ -0,0 +1,101 @@
@startuml Manage Tournament
title Manage Tournament
Actor Admin #palegreen
participant Website
database Server #brown
hide footbox
alt Manage Teams
Admin->Website: manageTeamsButton()
activate Admin
activate Website
Website-->Admin: redirect(/tournament/id/teams)
opt Add
Admin->Website: addTeam(name,members)
opt Error
Website-->Admin: displayError(error)
end
Website->Server: addTeam(id,name,members)
activate Server
Server-->Website: postTeam(team)
deactivate Server
Website-->Admin: updateTeamList(team)
deactivate Admin
deactivate Website
end
opt Edit
Admin->Website: selectTeam(team)
activate Admin
activate Website
Website->Server: getTeam(team)
activate Server
Server-->Website: postTeam(team)
deactivate Server
Website-->Admin: showTeam(team,members)
opt Add Member
Admin->Website: addMember(name)
activate Server
Website->Server: updateTeam(team,member:name)
Website-->Admin: showTeam(team,member)
deactivate Server
end
opt Remove Member
Admin->Website: removeMember(id)
activate Server
Website->Server: updateTeam(team,member:id)
Website-->Admin: showTeam(team,member)
deactivate Server
deactivate Admin
deactivate Website
end
end
opt Delete
activate Admin
activate Website
Admin->Website: deleteTeam(team)
Website-->Admin: confirm ? Yes : No;
opt Error
Website-->Admin: displayError(error)
end
opt Yes
Website->Server: removeTeam(team:id)
activate Server
Server-->Website: postTeam(team)
deactivate Server
Website-->Admin: updateTeamList(team)
end
opt No
Website-->Admin: redirect(/tournament/tournament/id/teams)
end
deactivate Admin
deactivate Website
end
end
alt Select Match Winner
Admin->Website: chooseWinner(match,team)
Website->Server: updateMatch(id:matchID,winner:teamID)
activate Server
Server-->Website: updateParentOf(child:matchID)
deactivate Server
Website-->Admin: displayTournament(Tournament)
end
alt Delete Tournament
Admin->Website: removeTournament(tournament)
Website-->Admin: confirm ? Yes : No;
opt Yes
activate Server
Website->Server: removeTournament(tournament:id)
Website-->Admin: redirect(/homePage)
deactivate Server
end
opt No
Website-->Admin: redirect(/tournaments/id/)
end
deactivate Admin
deactivate Website
end
@enduml

View File

@ -0,0 +1,67 @@
@startuml Manger View
title Manager View
Actor Manager #lime
participant Website
database Server #brown
note left of Manager #white
**Managers can do**
**everything an admin can,**
**these are additions**
end note
alt View Admins
activate Manager
activate Website
Manager->Website: viewAdmins()
activate Server
Website->Server: requestList(Admins)
Website<--Server: sendList(Admins)
deactivate Server
Manager<--Website: displayAdmins()
end
alt Add Admins
Manager->Website: addAdmin(name,passwd)
activate Server
Website->Server: addUser(id,name,passwd)
Website<--Server: {status: success | failure}
deactivate Server
opt status = success
Manager<--Website: displayInfo(Success)
activate Server
Website->Server: requestList(Admins)
Website<--Server: sendList(Admins)
deactivate Server
Manager<--Website: displayAdmins()
else status = failure
Manager<--Website: displayError(error)
end
end
alt Remove Admins
Manager->Website: removeAdmin(name)
activate Server
Website->Server: removeUser(id)
Website<--Server: {status: success | failure}
deactivate Server
opt status = success
Manager<--Website: displayInfo(Success)
activate Server
Website->Server: requestList(Admins)
Website<--Server: sendList(Admins)
deactivate Server
Manager<--Website: displayAdmins()
else status = failure
Manager<--Website: displayError(error)
end
deactivate Manager
deactivate Website
end
@enduml

View File

@ -1,7 +1,9 @@
@startuml User View
title User View
actor User #LightBlue
participant Website
database Server #Brown
hide footbox
User->Website: viewTournament(Tournament)
activate User

View File

@ -0,0 +1,81 @@
@startuml Tournament System
title Tournament System - Group 1
skinparam actorStyle awesome
skinparam linetype ortho
package Administrators {
actor Manager as mgr
actor Admin as adm
note "Manager extends admin" as MgrNote
mgr .l. MgrNote
MgrNote .l.|> adm
}
actor User as u1
left to right direction
rectangle System {
usecase "Login" as SysLogin
usecase "Manage admins" as SysMngAdm
usecase "Create admin" as SysCrtAdm
usecase "Delete admin" as SysDelAdm
usecase "View home page" as HomeView
package Tournament {
usecase "Manage tournament" as MngTou
usecase "Create tournament" as TouCreateT
together {
usecase "Edit tournament" as TouEdit
usecase "Delete tournament" as TouDelete
usecase "View teams" as TeamView
}
together {
usecase "Add team" as TeamAdd
usecase "Delete team" as TeamDel
usecase "Manage team" as TeamMng
usecase "Add members" as MembAdd
usecase "Remove members" as MembDel
}
together {
usecase "View tournaments" as TouVtou
usecase "View matches" as TouVmatch
}
}
note "If logged in as manager" as SysCrtAdmNote
SysLogin .r. SysCrtAdmNote
SysCrtAdmNote ..> SysMngAdm
}
mgr --> SysLogin
adm --> SysLogin
adm --> HomeView
u1 --> HomeView
SysLogin --> MngTou
SysLogin --> TouCreateT
SysMngAdm -l--> SysCrtAdm
SysMngAdm -l--> SysDelAdm
MngTou --> TouEdit
MngTou --> TouDelete
MngTou --> TeamView
TeamView --> TeamAdd
TeamView --> TeamDel
TeamView --> TeamMng
TeamMng --> MembAdd
TeamMng --> MembDel
HomeView --> TouVtou
HomeView --> TouVmatch
@enduml