Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Software Design: Class Diagram #49

Closed
BElifb opened this issue Apr 3, 2022 · 17 comments
Closed

Software Design: Class Diagram #49

BElifb opened this issue Apr 3, 2022 · 17 comments
Assignees
Labels
Design This issue is related to design Effort: High Handling this issue might take longer Priority: High This issue must be handled immediately Status: In Progress The issue is being handled.

Comments

@BElifb
Copy link
Contributor

BElifb commented Apr 3, 2022

  • As it was clearly stated that everyone should contribute to all different types of diagrams, we decided not to assign specific tasks.
  • We brainstormed and decided on the main classes in the Meeting - 7.
  • A preliminary list is as such:
    • Art item
    • Comment
    • User (Guest User) (Registered User)
    • Exhibition (Online - Offline)
    • Notification
    • Offer
    • Location
    • Tag
    • Search Engine
    • Message
    • Authorization Engine
    • Annotation
    • Profile
    • Moderator (Admin)

To Do:

  • Design (part of) the class diagram that specifies the classes and the relationships among them. Lucidchart is used to work on the diagram in a collaborative manner.
  • Please refer to the link of the working place available in our Discord.
  • Please comment down your contributions.
  • You may annotate questions or comments on the diagram.
  • After completing the diagram, it shall be exported and put into the related wiki page.

Deadline:
06.04.2022 @16.59

@BElifb BElifb added Effort: High Handling this issue might take longer Priority: High This issue must be handled immediately Status: In Progress The issue is being handled. Design This issue is related to design labels Apr 3, 2022
@BElifb BElifb self-assigned this Apr 3, 2022
@sinemKocoglu sinemKocoglu self-assigned this Apr 3, 2022
@KarahanS KarahanS self-assigned this Apr 3, 2022
@KarahanS
Copy link
Contributor

KarahanS commented Apr 3, 2022

  • Added Data datatype with day, month, year, hour, minute, second and dayOfWeek fields. It has following functions:

Date(year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int)
AddYear(year: Int) : Date
AddMonth(month: Int) : Date
AddDay(day: Int) : Date
AddHour(hour: Int) : Date
AddMinute(minute: Int) : Date
AddSecond(second: Int) : Date
ToString( ) : string

Since UML Diagrams are not language-specific, that would be appropriate for now to keep the detail level for our Date datatype as such.

  • Added following functions to the Moderator class.

deleteComment(comment: Comment):void
deleteArtItem(artItem: Art Item): void
banUser(user: User):void
sendMail(listOfUsers: List):void

Functions for the Moderator class will be updated.

@sinemKocoglu
Copy link
Contributor

sinemKocoglu commented Apr 3, 2022

Following classes are updated as stated below.

  • Registered user

userID: int
+username: string
+userEmail: string
userPassword : String


LogIn(userEmail:String, userPassword:String)
resetPassword(userPassword:String, newPassword:String)
forgotPassword(userEmail:String)
deleteAccount(userPassword:String)
LogOut()

  • Guest user

SignUp(userEmail:String, username:String,
userPassword: String)
SignUpwGoogleAccount( userGoogleAccount:String)

  • Bidding System

sellerID: Int
+buyerID:Int
amount: Double
datePosted:Date
bidList:List

Bid(sellerID:Int,buyerID:Int, amount:Double, artItemID: Int, datePosted:Date)
OrderBids(bidList: List)

  • Comment

userID : Int
username:String
commentBody:String
dateCreated:Date
dateModified: Date

Comment(userID: Int, ArtItemID: Int,commentBody: String, dateCreated:Date)
getComment(): String
setComment(commentBody: String)

  • Annotation

userID : Int
title:String
dateCreated:Date

-annotate(userID:Int, artItemID:Int,title:String)

  • Exhibition

exhibitionID:Int
contributerList: List
artItemList: List<Art_Item>
startDate:Date
endDate:Date
type:String(online/offline)
participants:List<Registered_User>

setStartDate(startDate:Date)
setEndDate(endDate:Date)
setType(String)
publish(exhibitionID:Int)

Following classes, their fields and methods are added as stated below.

  • Tag

tagTitle: String
tagID:Int

addCustomTag(userID:Int, userLevel:Int, tagTitle: String)
addSystemTag(userID:Int, userLevel:Int, tagTitle: String)

  • Popularity

userID:Int
numOfFollowers:Int
numOfCopyrightedItems:Int
numOfExhibitions:Int

popularityCalculator()

  • Art Item

artItemID:Int
artItemName: String
ownerID:Int
dateUploaded:Date
uploadArtItem()
isCopyrighted():Boolean

  • Location

geoTagHistory:List<>

@BElifb
Copy link
Contributor Author

BElifb commented Apr 3, 2022

Specified the fields and functions of Notification & <<enumeration>>NotificationType as below;

  • Notification

-UserID: int
-notificaitonDate: Date
-notificationTitle: String
-notificationMessage: String
-notificaitonType: NotificaitonType

+Notificaiton(User ID: int, notificaitonDate: Date, notificationTitle: String, notificationMessage: String, notificaitonType: NotificaitonType)

  • <<enumeration>> NotificationType

+receivedOffer
+offerOnItemYouBidOn
+OfferAccepted
+OfferDeclined
+ExhibitionAlert
+InvitatioonAlert
+ExhibitionItemAdded
+Error

@mumcusena
Copy link
Contributor

mumcusena commented Apr 3, 2022

Added classes

  • Message
    -senderID: Int
    -receiverID: Int
    -message: String
    -date: Date
    +Message(senderID: Int,
    receiverID: Int,
    message: String)
    +getMessage(): String
    +setMessage(message: String)

  • Comment

  • Notification

  • User

Also added relations between classes User and Notification.

@mumcusena
Copy link
Contributor

  • Added enumeration ArtItem Type:
    -photography
    -drawing
    -illustration
    -sculpture

  • Added missing methods to ArtItem class.

  • Added fields and methods to User class.

  • Created Recommendation Engine class and added fields - pastTags and a method recommend.

@kostanya
Copy link
Contributor

kostanya commented Apr 3, 2022

  • Created Level System class:
    +level_0: List< UserID:Int>
    +level_1: List< UserID:Int>
    +level_2: List< UserID:Int>
    +getLevel(UserID:Int): void
    +updateLevel(UserID:Int): void

  • Updated Recommendation Engine class:
    -tagHistory: List< Tag>
    -locationHistory: List<List< Locations>>
    -searchHistory: List<List< string>>
    -dateHistory: List<List< Date>>
    -likeHistory: List<List<< ArtItem>>
    -commentHistory: List<List< ArtItem, string>>
    +recommend(userID: Int): List< ArtItem>
    +getLocation(userID:Int): Location
    +getDate(UserID:Int): Date
    +addLocations(Location): void
    +addDates(Date): void
    +getLikeHistory(userID: Int): List< ArtItem>
    +getCommentHistory(UserID: Int): List<ArtItem, string>

  • Added fields and methods to User class regarding level and recommendation systems.

  • Reviewed the whole class diagram with @mumcusena and discussed about design ideas such as multiple inheritance and extensions.

@mumcusena mumcusena self-assigned this Apr 3, 2022
@mustafa-cihan
Copy link
Contributor

  • Updated Chat Class with @mumcusena and @KarahanS:
    -chatID: Int
    -user1ID: Int
    -user2ID: Int
    -listOfMessages1: List
    -listOfMessage2: List
    +getUser1ID(): Int
    +getUser2ID(): Int
    +getMessagesOfUser1(): List
    +getMessagesOfUser2(): List

  • Updated Comment Class with @mumcusena and @KarahanS. Added required fields and functions to provide reply to comment:
    +commentID: Int
    +userID : Int
    +username:String
    +commentBody:String
    +dateCreated:Date
    +dateModified: Date
    +artItem: ArtItem
    +parentID: commentID
    +numberOfLikes: Int
    +numberOfReplies: Int
    -Comment(userID: Int, ArtItemID: Int, commentBody: String, dateCreated:Date)
    -getComment(): String
    -setComment(commentBody: String)
    -getParent(): Int
    -setParent(parentID: Int): void
    -getNumberOfReplies(): Int
    +editComment(commentBody: String):void

  • Reviewed the whole class diagram with @mumcusena and @KarahanS. Discussed about the relations between classes. Defined the relations between Chat, Message and User class.

@kostanya
Copy link
Contributor

kostanya commented Apr 3, 2022

  • Almost concluded the existing inter-class connections with @mustafa-cihan. There are just a few issues to be discussed in the nearest meeting regarding Bidding System, Level System, Search and some User fields. Also marked designs need to be reviewed.
  • Redesigned Bidding System with @mustafa-cihan.
    -sellerIDs: List< Int>
    
-buyerIDs:List< Int>
    -amounts: List< Double>
    -datesPosted:List< Date>
    -bidLists:List<List< Bid>>
    -offeredArtItems: List< ArtItem>
    -SortBids(sellerIDs: List< Int>, buyersIDs: List< Int>, amounts: List< Double>, datesPosted: List< Date>, offeredArtItems: List< ArtItem>)
  • Decided with @mustafa-cihan that the Bidding System Class should act as a database for all biddings since Bid Class already provides the necessary functions for singular Bid Objects.

Note: Data privacy issues with respect to the Recommendation Engine should be discussed and necessary actions should be taken.

@BElifb
Copy link
Contributor Author

BElifb commented Apr 5, 2022

  • Bidding System replaced with ItemBids in Meeting#willaddlater.

  • Added some more fields and functions to ItemBids. Curent version is as below;

    • ItemBids

    -sellerID: int
    -itemID: int
    -datePosted:Date
    -activeBidLists:List
    -pastBidLists:List
    -acceptedBid:Bid
    -minPrice: double
    -saleDeadline: Date

    +ItemBids(minPrice: int, sellerID: int, itemID: int, saleDeadline: Date)
    +addNewBid(bidObject: Bid): void
    +acceptBid(bidToAccept:Bid):Boolean
    -expireBid(bidToExpire:Bid):Boolean
    #sortByPrice(acticePastOrAll: int):List
    #sortByDate(acticePastOrAll: int):List
    #changeMinPrice(): boolean
    #changeDeadline(newDeadline: Date): boolean
    +getMinPrice(): double
    +getDeadline(): Date

  • Reorganized inter-class connections regarding bidding system.

  • Added the following fields and functions to ArtItem regarding bidding actions.

-saleStatus: int
-itemBids: ItemBids  
+getSaleStatus(): int
+sortItemBids(activePastOrAll: int, sortBy: int ):List<Bid>
+openForSale(minPrice: int, duration: Date ):boolean
-closeForSale(deadline: this.itemBids.getDeadline()): boolean

@sinemKocoglu
Copy link
Contributor

sinemKocoglu commented Apr 6, 2022

Followings are added to Exhibition class in the class diagram because they are necessary in the sequence diagram for Holding an Exhibition:

tagList:List
createExhibition()
addArtItem(artItemName:String)
addCollaborator(userName:String)
tag(tagTitle:String)

setDescription(description:String):void

@BElifb
Copy link
Contributor Author

BElifb commented Apr 6, 2022

Added even more functions and changed the arguments and return types of some of the existing functions of RegisteredUser, ArtItem, ItemBids and Bid out of necessity for the sequence diagram for bidding on an item. Not including a list here because this is already lengthy so you may refer to lucid.app to view the current state.

@simsekhebun
Copy link
Contributor

simsekhebun commented Apr 11, 2022

-Created CopyrightTicket Class

  • -ticketID: int
  • -ticketBody: String
  • -userID: int
  • -artItem: Artitem
  • +addCopyrightTicket(artItem: Art item, userID: int, ticketBody: String)
  • +getCopyrightTicket(): CopyrightTicket

-Added ActiveUser the following:

  • +createCopyrightTicket(artItem: ArtItem, ticketBody: string)

@serdarakol
Copy link
Contributor

shareArtItem(artitem: ArtItem): void function is added to the registered user class
uploadArtItem():Boolean functions changed to uploadArtItem(artItemData: Data):Boolean ---> this method was used once in squence diagrams, It is also changed accordingly.
-tag: Tag is changed to -tagList: list
Below functions and fields are added to the class of artItem:
-artItemType: String

-isVisibile: Boolean

-title: String
+setTitle(title: String): void

+setExplanation(explanation: String): void

+setVisibility(visibility: Boolean): void
+setArtItemType(artitemtype: String):void

+addTag(tag: Tag): void

@kostanya
Copy link
Contributor

kostanya commented Apr 13, 2022

  • Made following mechanism related additions to Registered User Class.

-followerIds: List< int>
-followedByMeIds List< int>
-pendingFollowRequests: List< int>

+addFollower(requestSenderID:int): void
+addFollowedByMe(userToBeFollowedID: int): void
+sendFollowRequest(userToBeFollowedID: int): void
+receiveFollowRequest(requestSenderID:int): void
+acceptFollowRequest(requestSenderID:int): boolean
+rejectFollowRequest(requestSenderID:int): boolean
+addPendingFollowRequest(requestSenderID:int): void
+removePendingFollowRequest(requestSenderID:int): void
+removeAFollower(followerID:int): boolean
+unfollow(followedByMeID: int): boolean
+findUser(userToBeFoundID:int): User
+getUserID(): int

  • Made following mechanism related additions to NotificationType.

+ReceivedFollowRequest
+FollowRequestAccepted

@kostanya kostanya self-assigned this Apr 13, 2022
@BElifb
Copy link
Contributor Author

BElifb commented Apr 14, 2022

  • Added -comparePrice(): boolean to ItemBids
  • Added +ItemRemovalRequest to NotificationType

@sinemKocoglu
Copy link
Contributor

sinemKocoglu commented Apr 14, 2022

  • bookmarks:List<Annotation>

added to Registered User class.

  • annotateArtItem(userID:Int, artItemID:Int,title:String, description:String,tagID:int):Boolean
  • annotateComment(userID:int, commentID:int, content:String,tagID:int):Boolean
  • annotateExhibition(userID:int, exhibitionID:int, title:String, description:String,tagID:int):Boolean
  • bookmarkArtItem(userID:Int, artItemID:Int):Boolean
  • bookmarkExhibition(userID:int, exhibitionID:int):Boolean
  • bookmarkComment(userID:int, commentID:int):Boolean

are added to Annotation class.

@KarahanS
Copy link
Contributor

You can find class diagram here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design This issue is related to design Effort: High Handling this issue might take longer Priority: High This issue must be handled immediately Status: In Progress The issue is being handled.
Projects
None yet
Development

No branches or pull requests

8 participants