Skip to content

Class Diagrams

Emre Kılıç edited this page Mar 30, 2024 · 22 revisions
classDiagram

    class User{
        <<abstract>>
        -search_engine: SearchEngine
        +getSearchEngine() SearchEngine
        +login(username: String, password: String) int
    }
    class GuestUser{
        +register(username: String, email: String, password: String) int
    }

    class RegisteredUser{
        -username: String
        -profile: Profile
        -password: String
        -blocked_list: List~RegisteredUser~
        -muted_list: List~RegisteredUser~
        +getProfile() Profile
        +getUsername() String
        +blockUser(user:RegisteredUser) int
        +unblockUser(user:RegisteredUser) int
        +followUser(user: RegisteredUser) int
        +unfollowUser(user: RegisteredUser) int
        +muteUser(user: RegisteredUser) int
        +unmuteUser(user: RegisteredUser) int
        
    }
    class Profile{
        -email: String
        -biography: String
        -profile_picture: Image    
        -registration_date: Date
        -following_list: List~RegisteredUser~ 
        -follower_list: List~RegisteredUser~ 
        +getEmail() String
        +setEmail(email: String) int
        +getBiography() String
        +setBiography(biography: String) int        
        +getProfilePicture() Image
        +setProfilePicture(image: Image) int        
    }
    class Content{
        -text: String
        -publication_date: Date
        -edit_date: Date
        -author: RegisteredUser
        -comments: List~Comment~
        
        +getText() String
        +getPublicationDate() Date
        +getEditDate() Date
        +getAuthor() RegisteredUser

        +setText(text: String) int        
        +addComment(comment: Comment) int
        +removeComment(comment: Comment) int
    }
    class Post {
        -title: String
        -image: Image

        -comment_count: int

        -like_count: int
        -like_list: List~RegisteredUser~

        -bookmark_count: int
        +getTitle() String
        +getImage() Image
        +getComments() List~Comment~
        +getLikeCount() int
        +getLikeList() List~RegisteredUser~
        +getBookmarkCount() int
        +getCommentCount() int
        
        +setTitle(title: String) int
        +setImage(image: Image) int


        +likePost(user: RegisteredUser) int
        +unlikePost(user: RegisteredUser) int
        +bookmarkPost(user: RegisteredUser) int
        +unbookmarkPost(user: RegisteredUser) int

    }  
    class Comment{
        -parent: Content

        +getParent() Content
    }
    class Feed{
        -post_list
        +populateFeed(user: User) int
    }
    class SearchEngine{
        -search_history: List~String~

        +query(keyword: String) SearchResult
    }
    class SearchResult{
        -result_list: List~Content~
        -wiki_data_result: WikiData
        +getResultList() List~Content~
        +getWikiDataResult() WikiData

        +sortResultsByDate() int
        +sortResultsByPopularity() int
    }
    class WikiData{
        -content: Hashmap~String, String~
        +getKeySet() Set~String~
        +getValueFromKey(key: String) String
    }
    class Image {
        -alt_text: String
        -url: String
        
        +getUrl() String
        +getAltText() String
    }

    Content "1" -- "1" RegisteredUser : owns
    User <|-- RegisteredUser
    Post "1" -- "0..*" RegisteredUser : likes
    Profile "1" *-- "1" RegisteredUser : has
    SearchEngine "1" --* "1" SearchResult : returns
    RegisteredUser "0..*" -- "0..*" RegisteredUser : interacts
    Content <|-- Post
    Content <|-- Comment
    Content "1" --* "0..*" Comment : has
    Feed "1" *-- "1" User : has
    User "1" --* "1" SearchEngine : uses
    SearchResult "0..*" -- "0..*" Content : is_result_of
    SearchResult "0..*" -- "0..*" WikiData : is_result_of
    Post "0..*" --* "0..*" Image
    User <|-- GuestUser

Loading

BOUNSWE2024 - G11

Logo Turquiz App

⏳ Status

DONE

🧑🏼‍💻 Team

📝 Diagrams

📆 Lab Reports

📆 Meeting Notes

📍 Milestones

📎 Planning

📚 User Scenarios / Stories

📚 Resources

🔎 Research

🗂️ Templates

Clone this wiki locally