-
Notifications
You must be signed in to change notification settings - Fork 0
Class Diagrams ‐ Archived
Ahmet Burkay KINIK edited this page Oct 20, 2024
·
1 revision
classDiagram
class User{
-username: String
-email: String
-name: String
-passwordHash: String
- favoriteGenres: List<String>
- favoriteAuthors: List<String>
- bookLists: List<Book>
+register(username: String, email: String, password: String) int
+login(username: String, password: String) int
+logout() int
+updateProfile(email: String, name: String, username: String) int
+viewProfile() UserProfile
+viewFollowers() List<User>
+viewFollowing() List<User>
+followUser(user: User) int
+unfollowUser(user: User) int
+createPost(content: String, book: Book) int
+bookmarkPost(post: Post) int
+likePost(post: Post) int
+dislikePost(post: Post) int
+rateBook(book: Book, rating: int) int
+participateInDiscussion(topic: String, content: String) int
}
class BookList{
-books: List~Book~
+addBook(book: Book) int
+removeBook(book: Book) int
+getBooks() List~Book~
}
class Book{
-title: String
-coverUrl: String
-authors: List~String~
-isbn: String
-description: String
-publicationYear: int
-genres: List~String~
-pageCount: int
+getDetails() String
}
class Post{
-content: String
-book: Book
-author: User
-likes: int
-dislikes: int
+likePost() int
+dislikePost() int
}
class ContentManager{
-posts: List~Post~
+createPost(content: String, user: User, book: Book) int
+bookmarkPost(post: Post, user: User) int
+rateBook(book: Book, rating: int) int
+viewPostsByBook(book: Book) List~Post~
+viewPostsByUser(user: User) List~Post~
}
class SearchEngine{
-searchIndex: Map~String, List~Book~
+searchBooks(query: String) List~Book~
+advancedSearch(options: SearchOptions) List~Book~
}
class SearchOptions{
-author: String
-genre: String
-publicationYearFrom: int
-publicationYearTo: int
-language: String
+setOptions(options: Map~String, String~) int
}
class FeedPage{
-posts: List~Post~
+displayFeed() void
+refreshFeed() void
}
class CommunityDiscussionForum{
-topics: List~String~
-posts: Map~String, List~Post~
+createTopic(topic: String) int
+createPost(topic: String, content: String, user: User) int
+viewPostsByTopic(topic: String) List~Post~
}
class Rating{
-user: String
-book: String
-rate: int
}
User "1" -- "*" Post : posts
User "1" -- "*" BookList : involves
User "1" -- "*" Rating: rates
Book "1" -- "*" Rating: has
ContentManager "1" -- "*" Post : manages
SearchEngine "1" -- "*" Book : searches
SearchEngine "1" -- "1" SearchOptions : uses
BookList "1" -- "*" Book : involves
FeedPage "1" -- "*" Post : displays
User "1" -- "*" CommunityDiscussionForum : participatesIn