-
Notifications
You must be signed in to change notification settings - Fork 0
CMPE352‐Sequence Diagrams ‐ Tips and Recommendations
Selman Akman edited this page Oct 15, 2025
·
1 revision

@startuml
actor User
participant ":System" as System
participant ":Tip" as Tip
participant "Database" as DB
User -> System: viewTips(categoryID)
System -> Tip: viewTips(categoryID)
Tip -> DB: queryTipsByCategory(categoryID)
alt Tips Found
DB --> Tip: return tipsList
Tip --> System: return tipsList
System --> User: display tipsList
else No Tips Found
DB --> Tip: return emptyList or error
Tip --> System: return emptyList or errorMessage
System --> User: display "No tips found"
end alt
@enduml
@startuml
actor User
participant "System" as System
participant "Tip" as Tip
participant "Database" as DB
User -> System: searchTips(query)
System -> Tip: searchTips(query)
alt Valid Query
Tip -> DB: queryTipsByKeyword(query)
alt Tips Found
DB --> Tip: List
Tip --> System: List
System --> User: displaySearchResults(List)
else No Tips Found
DB --> Tip: emptyList
Tip --> System: emptyList
System --> User: displayMessage("No tips found")
end alt
else Invalid Query
Tip --> System: errorMessage
System --> User: displayMessage("Invalid search query")
end alt
@enduml
@startuml
actor User
participant ":System" as System
participant ":User" as UserClass
participant ":Tip" as Tip
participant "Database" as DB
User -> System: submitTips(content, category)
' Check if User is authenticated
System -> UserClass: getUserID()
alt User Authenticated
UserClass --> System: return userID
System -> Tip: submitTips(content, category, userID)
alt Valid Input
Tip -> DB: saveTip(content, category, userID)
alt Tip Saved Successfully
DB --> Tip: return tipID
Tip --> System: return tipID
System --> User: display "Tip submitted successfully"
else Database Error
DB --> Tip: return error
Tip --> System: return errorMessage
System --> User: display "Failed to submit tip"
end alt
else Invalid Input
Tip --> System: return errorMessage
System --> User: display "Invalid content or category"
end alt
else User Not Authenticated
UserClass --> System: return error
System --> User: display "Please log in to submit tips"
end alt
@enduml
@startuml
actor User
participant ":System" as System
participant ":User" as UserClass
participant ":Tip" as Tip
participant "Database" as DB
User -> System: saveTips(tipID)
System -> UserClass: getUserID()
alt User Authenticated
UserClass --> System: userID
System -> Tip: saveTips(tipID)
Tip -> DB: checkTipExists(tipID)
alt Tip Exists
DB --> Tip: tipExists
Tip -> DB: storeTipForUser(userID, tipID)
alt Save Successful
DB --> Tip: success
Tip --> System: true
System --> User: displayMessage("Tip saved successfully")
else Save Failed
DB --> Tip: error
Tip --> System: false
System --> User: displayMessage("Failed to save tip due to database error")
end alt
else Tip Does Not Exist
DB --> Tip: tipNotFound
Tip --> System: false
System --> User: displayMessage("Invalid tip ID")
end alt
else User Not Authenticated
UserClass --> System: error
System --> User: displayMessage("Please log in to save tips")
end alt
@enduml
@startuml
actor User
participant ":System" as System
participant ":User" as UserClass
participant ":Tip" as Tip
participant "Database" as DB
participant "ExternalPlatform" as Platform
User -> System: shareTips(tipID, platform)
System -> UserClass: getUserID()
alt User Authenticated
UserClass --> System: userID
System -> Tip: shareTips(tipID, platform)
Tip -> DB: checkTipExists(tipID)
alt Tip Exists
DB --> Tip: tipContent
Tip -> Platform: shareTipContent(tipContent, platform)
alt Share Successful
Platform --> Tip: success
Tip --> System: true
System --> User: displayMessage("Tip shared successfully")
else Share Failed
Platform --> Tip: error
Tip --> System: false
System --> User: displayMessage("Failed to share tip due to platform error")
end alt
else Tip Does Not Exist
DB --> Tip: tipNotFound
Tip --> System: false
System --> User: displayMessage("Invalid tip ID")
end alt
else User Not Authenticated
UserClass --> System: error
System --> User: displayMessage("Please log in to share tips")
end alt
@enduml
@startuml
actor User
participant ":System" as System
participant ":User" as UserClass
participant ":RecommendationEngine" as RecEngine
participant ":Tip" as Tip
participant "Database" as DB
User -> System: viewRecommendations()
System -> UserClass: getUserID()
alt User Authenticated
UserClass --> System: userID
System -> RecEngine: generateRecommendations(userID)
RecEngine -> Tip: viewTipsForUser(userID)
Tip -> DB: queryTipsByUserWasteData(userID)
DB --> Tip: List<Tip>
Tip --> RecEngine: List<Tip>
RecEngine -> DB: queryEcoProductsByUserWasteData(userID)
DB --> RecEngine: List<Product>
RecEngine --> System: combinedRecommendations(List<Tip>, List<Product>)
alt Recommendations Found
System --> User: displayMessage("Combined recommendations", List<Tip>, List<Product>)
else No Recommendations Found
System --> User: displayMessage("No recommendations available")
end alt
else User Not Authenticated
UserClass --> System: error
System --> User: displayMessage("Please log in to view personalized recommendations")
end alt
@enduml
@startuml
actor User
participant ":System" as System
participant ":User" as UserClass
participant ":RecommendationEngine" as RecEngine
participant "Database" as DB
User -> System: viewEcoProducts()
System -> UserClass: getUserID()
alt User Authenticated
UserClass --> System: userID
System -> RecEngine: getEcoProductRecommendations(userID)
RecEngine -> DB: queryEcoProductsByUserWasteData(userID)
alt Products Found
DB --> RecEngine: List<Product>
RecEngine --> System: List<Product>
System --> User: displayMessage("Eco-friendly products displayed", List<Product>)
else No Products Found
DB --> RecEngine: emptyList
RecEngine --> System: emptyList
System --> User: displayMessage("No eco-friendly products available")
else Database Error
DB --> RecEngine: error
RecEngine --> System: error
System --> User: displayMessage("Failed to retrieve products due to database error")
end alt
else User Not Authenticated
UserClass --> System: error
System --> User: displayMessage("Please log in to view personalized product recommendations")
end alt
@enduml
@startuml
actor Admin
participant ":System" as System
participant ":Admin" as AdminObj
participant ":Tip" as Tip
participant ":User" as User
participant "Database" as DB
Admin -> System: rewardTipContribution(tipID, rewardPoints)
System -> AdminObj: verifyAdmin()
alt Admin Authorized
AdminObj --> System: adminID
System -> AdminObj: rewardTipContribution(tipID, rewardPoints)
AdminObj -> Tip: checkTipAndContributor(tipID)
Tip -> DB: checkTipExists(tipID)
alt Tip Exists
DB --> Tip: contributorID
Tip --> AdminObj: contributorID
AdminObj -> User: updateReward(contributorID, rewardPoints)
User -> DB: storeReward(contributorID, rewardPoints)
alt Reward Saved Successfully
DB --> User: success
User --> AdminObj: true
AdminObj --> System: true
System --> Admin: displayMessage("Reward assigned successfully")
else Reward Save Failed
DB --> User: error
User --> AdminObj: false
AdminObj --> System: false
System --> Admin: displayMessage("Failed to assign reward due to database error")
end alt
else Tip Does Not Exist
DB --> Tip: tipNotFound
Tip --> AdminObj: null
AdminObj --> System: false
System --> Admin: displayMessage("Invalid tip ID")
end alt
else Admin Not Authorized
AdminObj --> System: error
System --> Admin: displayMessage("Unauthorized: Admin access required")
end alt
@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