-
Notifications
You must be signed in to change notification settings - Fork 0
Sequence Diagrams ‐ Waste Tracking and Scoring System
Selman Akman edited this page Oct 17, 2025
·
3 revisions

@startuml
actor User
participant ":WasteService" as WasteService
participant ":AchievementService" as AchievementService
participant ":User" as UserObj
participant ":WasteLog" as WasteLogObj
participant ":WasteCategory" as CategoryObj
User -> WasteService: logWaste(userID, categoryID, quantity, unit, date, location?, eventID?)
WasteService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> WasteService: userData
WasteService -> CategoryObj: getCategory(categoryID)
alt Category Exists
CategoryObj --> WasteService: categoryData(scorePerUnit, unit)
alt Valid Input
WasteService -> WasteLogObj: createWasteLog(userID, categoryID, quantity, unit, date, location?, eventID?)
WasteLogObj --> WasteService: logCreated(logID)
WasteService -> AchievementService: calculateScore(categoryID, quantity)
AchievementService --> WasteService: score
AchievementService -> UserObj: updateScore(userID, score)
UserObj --> AchievementService: scoreUpdated()
WasteService --> User: showConfirmation("Waste logged successfully, Score: " + score)
else Invalid Input
WasteService --> User: showError("Invalid quantity or unit")
end
else Category Not Found
CategoryObj --> WasteService: error("Category not found")
WasteService --> User: showError("Invalid category ID")
end
else User Not Authenticated
UserObj --> WasteService: error("User not found")
WasteService --> User: showError("Please log in to log waste")
end
@enduml
@startuml
actor User
participant ":WasteService" as WasteService
participant ":User" as UserObj
participant ":WasteLog" as WasteLogObj
User -> WasteService: viewWasteLogs(userID, filters, eventID?)
WasteService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> WasteService: userData
WasteService -> WasteLogObj: getWasteLogs(userID, filters, eventID?)
alt Logs Found
WasteLogObj --> WasteService: logList(categoryID, quantity, date, eventID?)
WasteService --> User: displayWasteLogs(logList)
else No Logs Found
WasteLogObj --> WasteService: emptyList
WasteService --> User: showMessage("No waste logs found")
end
else User Not Authenticated
UserObj --> WasteService: error("User not found")
WasteService --> User: showError("Please log in to view waste logs")
end
@enduml
@startuml
actor User
participant ":WasteService" as WasteService
participant ":User" as UserObj
participant ":WasteCategory" as CategoryObj
User -> WasteService: requestCustomCategory(userID, name, unit)
WasteService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> WasteService: userData
alt Valid Input
WasteService -> CategoryObj: createCustomCategory(name, unit, isCustom=true, isApproved=false)
CategoryObj --> WasteService: categoryCreated(categoryID)
WasteService --> User: showConfirmation("Custom category requested successfully")
else Invalid Input
WasteService --> User: showError("Invalid category name or unit")
end
else User Not Authenticated
UserObj --> WasteService: error("User not found")
WasteService --> User: showError("Please log in to request a custom category")
end
@enduml
@startuml
actor Admin
participant ":WasteService" as WasteService
participant ":Admin" as AdminObj
participant ":WasteCategory" as CategoryObj
Admin -> WasteService: approveCustomCategory(adminID, categoryID, scorePerUnit)
WasteService -> AdminObj: verifyAdmin(adminID)
alt Admin Authorized
AdminObj --> WasteService: adminData
WasteService -> CategoryObj: getCategory(categoryID)
alt Category Exists
CategoryObj --> WasteService: categoryData(isCustom=true, isApproved=false)
WasteService -> CategoryObj: updateCategory(categoryID, isApproved=true, scorePerUnit)
CategoryObj --> WasteService: categoryUpdated()
WasteService --> Admin: showConfirmation("Custom category approved successfully")
else Category Not Found
CategoryObj --> WasteService: error("Category not found")
WasteService --> Admin: showError("Invalid category ID")
end
else Unauthorized
AdminObj --> WasteService: error("Admin not authorized")
WasteService --> Admin: showError("Admin access required")
end
@enduml
@startuml
actor User
participant ":WasteService" as WasteService
participant ":User" as UserObj
participant ":WasteLog" as WasteLogObj
participant ":Media" as MediaObj
User -> WasteService: uploadWastePhoto(userID, logID, image)
WasteService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> WasteService: userData
WasteService -> WasteLogObj: getWasteLog(logID, userID)
alt Log Exists
WasteLogObj --> WasteService: logData
alt Valid Image
WasteService -> MediaObj: storePhoto(logID, image)
MediaObj --> WasteService: photoStored(photoURL)
WasteService --> User: showConfirmation("Photo uploaded successfully")
else Invalid Image
WasteService --> User: showError("Invalid image file")
end
else Log Not Found
WasteLogObj --> WasteService: error("Log not found")
WasteService --> User: showError("Invalid log ID")
end
else User Not Authenticated
UserObj --> WasteService: error("User not found")
WasteService --> User: showError("Please log in to upload a photo")
end
@enduml
@startuml
actor User
participant ":RecommendationService" as RecService
participant ":User" as UserObj
participant ":WasteLog" as WasteLogObj
User -> RecService: getWasteReductionSuggestions(userID, categoryID, eventID?)
RecService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> RecService: userData
RecService -> WasteLogObj: getSuggestions(categoryID, eventID?)
alt Suggestions Found
WasteLogObj --> RecService: suggestionList
RecService --> User: displaySuggestions(suggestionList)
else No Suggestions
WasteLogObj --> RecService: emptyList
RecService --> User: showMessage("No suggestions available")
end
else User Not Authenticated
UserObj --> RecService: error("User not found")
RecService --> User: showError("Please log in to view suggestions")
end
@enduml
@startuml
actor User
participant ":WasteService" as WasteService
participant ":User" as UserObj
participant ":WasteCategory" as CategoryObj
User -> WasteService: viewScoringSystem(userID)
WasteService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> WasteService: userData
WasteService -> CategoryObj: getScoringRules()
alt Rules Found
CategoryObj --> WasteService: ruleList(categoryID, scorePerUnit)
WasteService --> User: displayScoringRules(ruleList)
else No Rules Found
CategoryObj --> WasteService: emptyList
WasteService --> User: showMessage("No scoring rules available")
end
else User Not Authenticated
UserObj --> WasteService: error("User not found")
WasteService --> User: showError("Please log in to view scoring system")
end
@enduml- Lab1
- Lab 1 Meeting Notes
- Lab2
- Lab 2 Meeting Notes
- Lab3
- Lab 3 Meeting Notes
- Lab4
- Lab4 Meeting Notes
- Lab5
- Lab5 Meeting Notes
- Lab 5: MVP Implementation & Planning
- Lab6
- Lab6 Meeting Notes
- Lab7
- Lab7 Meeting Notes
- Lab 7: Milestone 2 Demo Preparation
- Lab8
- Lab8 Meeting Notes
- Lab 8: Requirements Review & Acceptance Planning
- Ahmet's Bio
- Barathan's Bio
- Berkay's Bio
- Berke's Bio
- Caglar's Bio
- Mehmet Emin's Bio
- Nilsu's Bio
- Ömer's Bio
- Selman's Bio
- Taha's Bio
Ahmet Okta
Barathan Aslan
Berke Kartal
Mehmet Çağlar Kurt
Mehmet Emin Atak
Muhammet Berkay Keskin
Mustafa Taha Söylemez
Nilsu Tüysüz
Selman Akman
Ömer Faruk Bayram
- Use Case Diagram
- Class Diagram
- Sequence Diagrams - Admin Management and Moderator Functions
- Sequence Diagrams - Rewards, Badges and Leaderboard System
- Sequence Diagrams - Notification System
- Sequence Diagrams - Tips and Recommendations
- Sequence Diagrams - Challenge and Activity Tracking
- Sequence Diagrams - Waste Tracking and Scoring System
- Sequence Diagrams - User and Account Management
- Sequence Diagrams - Goal Management
- Sequence Diagrams - Authentication
- Sequence Diagrams - Session Management
- Sequence Diagrams - Events Management
- Project Plan
- Requirements
- Elicitation Questions & Answers
- Scenario #1
- Scenario #2
- Scenario #3
- Scenario #4
- Scenario #5
- Scenario #6
- Scenario #7
- Scenario #8
- Scenario #9
- Scenario #10
- Scenario #11
- Scenario #12
- Scenario #13
- Scenario #14
- Use Case Diagram
- Class Diagram
- Sequence Diagrams - Admin Management and Moderator Functions
- Sequence Diagrams - Rewards,Badges and Leaderboard System
- Sequence Diagrams - Notification System
- Sequence Diagrams - Tips and Recommendations
- Sequence Diagrams - Challenge and Activity Tracking
- Sequence Diagrams - Waste Tracking and Scoring System
- Sequence Diagrams - User and Account Management
- Sequence Diagrams - Goal Management
- Sequence Diagrams - Auth
- Sequence Diagrams - Session Management
- User Manual for Frontend-Web
- System Manual for Frontend-Web
- Research Documentation for Frontend-Web
- Testing Manual for Frontend-Web