-
Notifications
You must be signed in to change notification settings - Fork 3
Class Diagram
oguzhekim edited this page May 2, 2024
·
6 revisions
---
title: Art-i-fact
---
classDiagram
Profile "1" *-- "*" Post
Profile "1" *-- "*" Like
Profile "1" *-- "*" Comment
Profile "1" *-- "*" Collection
Post "1" o-- "*" Label
Post "1" *-- "*" Like
Post "1" *-- "*" Comment
Collection "1" o-- "*" Post
RegisteredUser "1" *-- "1" Profile
Administrator -- Notification
Image -- Post
Image -- Profile
Image -- WikiDataResult
User <|-- RegisteredUser
User <|-- GuestUser
User <|-- Administrator
Search -- WikiDataResult
User : -String username
User : +getFeed() List~Post~
class RegisteredUser{
-String email
-String password
-String name
-String surname
-Profile profile
-bool isSuspended
+logout()
+changePassword(String oldPassword, String newPassword)
}
class GuestUser{
+login(String username, String password)
+register(String username, String email, String password)
}
class Administrator{
-String email
-String password
-String registrationDate
+logout()
+changePassword(String oldPassword, String newPassword)
+sendNotification(Notification notification)
+suspendUser(String username, String suspensionDate)
+getNumberOfUsers() int
+getNumberOfPosts() int
}
class Profile{
-int profileId
-RegisteredUser user
-String registrationDate
-String bio
-Image profilePicture
-List~Post~ posts
-List~Comment~ comments
-List~Like~ likes
-List~RegisteredUser~ followers
-List~RegisteredUser~ following
-List~RegisteredUser~ blockedUsers
-List~Collection~ collection
+getFollowers(int profileId) List~RegisteredUser~
+getFollowing(int profileId) List~RegisteredUser~
+getNumberOfFollowers(int profileId) int
+getNumberOfFollowing(int profileId) int
+follow(RegisteredUser userToFollow)
+unfollow(RegisteredUser userToUnfollow)
+blockUser(RegisteredUser userToBlock)
}
class Post{
-int postId
-RegisteredUser user
-String title
-String content
-Image image
-List~Comment~ comments
-List~Label~ labels
+createPost(RegisteredUser user, String title, String content, Image image, List~Label~ labels) Post
+getPost(int postId) Post
+getAllPosts() List~Post~
+editPost(int postId, String title, String content, Image image, List~Label~ labels)
+deletePost(int postId)
+getPostsOfUser(RegisteredUser user) List~Post~
+getComments(postID) List~Comment~
+addLabel(int postId, Label label)
+deleteLabel(int postId, Label label)
}
class Like{
-int likeId
-Post post
-RegisteredUser user
+getLike(int likeId) Like
+getNumberOfLikesForPost(Post post) int
+getNumberOfLikesForComment(Comment comment) int
+getLikedPostsForUser(RegisteredUser user) List~Post~
+likePost(Post post, RegisteredUser user)
+likeComment(Comment comment, RegisteredUser user)
+deleteLike(int likeId)
}
class Comment{
-int commentId
-Post post
-RegisteredUser user
-String content
+getComment(int commentId) Comment
+getCommentsOfUser(RegisteredUser user) List~RegisteredUser~
+createComment(String content)
+editComment(String content)
+deleteComment(int commentId)
}
class Label{
-int labelId
-String name
-String type
+getName(labelID: int) String
+getType(labelID: int) String
}
class Collection{
-int collectionId
-String name
-RegisteredUser user
-List~Post~ listOfPosts
+createCollection(String name, RegisteredUser user)
+addPostToCollection(int collectionId, Post post)
+deletePostFromCollection(int collectionId, Post post)
+deleteCollection(int collectionId)
}
class Notification{
-int notificationId
-String title
-String content
}
class Search {
+search(String query) List~WikiDataResult~
}
class WikiDataResult {
-String title
-String content
-Image image
-List~Label~ labels
+getTitle() String
+getContent() String
+getImage() Image
+getLabels() List~Label~
}
class Image {
-URL image
+getURL()
}
-
📝 Plan
-
📝 Project
-
📝 Customer Milestone Reports
-
✨ Team Members
-
📋 Templates
Cmpe 352 Archive
-
🔍 Researches
-
📝 Project