You are on page 1of 14

Sharing Picture Website

Class:

Group:

Group members:

Full Name Student ID Question(s) done Mark

1
1. Identify Objects and their attributes, operations in the problem
with the given Topic.

1.1 Identify Object

a. User f. Tag k. Notification

b. Role g. CategoryPicture l. Feedback

c. Picture h. Report m.Question

d. Album i. ReportCategory n.Answer

e. Post j.Like o. QuestionTag

1.2 Attributes and Operations


a. User
- Attributes:
+ Username: string
+ Fullname: string
+ Email: string
+ Address: string
+ Phone: string
+ Password: string
+ Gender: int
+ Status: int
+ ImageAvt: string
+ RoleId: int
+ ListNotification: List<Notification>
- Functions:
+ User(): Default constructor
+ User( string username, string fullname, string email, string address,
string phone, string password, int gender, int status, int roleId, string
imageAvt, List< Notification> listNotification): Constructor with full
parameter
+ getUsername(): return username
+ getFullname(): return fullname
+ getEmail(): return email
+ getAddress(): return address
+ getPhone(): return phone
+ getPassword(): return password
+ getGender(): return gender
+ getStatus(): return status
+ getRoleId(): return roleId
+ getImageAvt(): return image avatar
+ getListNotification(username): return list notifications of user
+ setUsername(string username): set username
+ setFullname(string fullname): set fullname
+ setEmail(string email): set email
+ setAddress(string address): set address

2
+ setPhone(string phone): set phone
+ setPassword(string password): set password
+ setGender(int gender): set gender
+ setStatus(int status): set status
+ setRoleId(int roleId): set roleId
+ setImageAvt(string imageavt): set image avatar
+ setListNotification( List<Notification> ListNotification): set list
notification

● createNewUser(user) : create new account


● updateUserInformation(user) :update information
● viewUserInformation(username) : return user information to view
● changePassword(username, oldPassword, newPassword): chang
password of user
● resetPassword(username): reset password of user
● deactiveAccount(username): deactivate account of user
● activeAccount(username): active account of user
● login(userName, password): login account of user
● register(user): register account of user
● logOut(): log out system
b. Role
- Attributes:
+ Id: int
+ Rolename: string
+ Status: int
+ ListUser: List<User>
- Functions:
+ Role(): default constructor
+ Role(int id, string roleName, int status, string[] username): Constructor
with full parameters
+ getId(): return id
+ getRoleName(): return roleName
+ getStatus(): return status
+ getListUser(): return list users
+ setId(int id): set Id
+ setRoleName(string roleName): set role name
+ setStatus(int status): set status
+ setListUser(List<User> ListUser): set list user
c. Picture
- Attributes:
+ Id: int
+ Name: string
+ Size: string
+ Url: string
+ Time_create: date
+ User_create: string
+ Album_id: int
+ Post_id: int
+ CategoryPicture_Id: int
+ ListTag: List<Tag>
+ ListLike: List<Like>
- Functions:

3
+ Picture(): Default constructor
+ Picture(int id, string name, string size, string url, Date time_create,
string user_create, int post_id, List<Tag> ListTag, int album_id,,
List<Like> ListLike, int CategoryPicture_Id): Constructor with
parameters
+ getId(): get id
+ getName(): get name
+ getSize(): get size
+ getUrl(): get url
+ getTimeCreate(): get time create
+ getUserCreate(): get user create
+ getListTag(): get list tag of picture
+ getAlbumId(): get album id
+ getPostId(): get post id
+ getListLike(): return list user like picture
+ getCategoryPictureId(): return CategoryPicture Id
+ setId(int id): set id
+ setName(string name): set name
+ setSize(int size): set size
+ setUrl(string url): set url
+ setTimeCreate(Date timeCreate): set time create
+ setUserCreate(string userCreate): set user create
+ setAlbumId(int album_id): set album id
+ setPostId(int post_id): set post id
+ setListTag(List<Tag> ListTag): set list tag
+ setListLike(List<Like> ListLike): set List user like picture
+ setCategoryPictureId(int CategoryPicture_Id): set category picture id
● uploadNewPicture(Picture): upload new picture
● deletePicture(id): delete picture
● editInformationPicture(Picture): update information of picture
● viewInfomationPicture(Picture): view information of picture
● viewListPostSharePicture(picture_id): view list post share picture
● viewListCommentPicture(picture_id): view list comment of picture
● viewListLikePicture(picture_id): view list user like picture
d. Album
- Attributes:
+ Id: int
+ Name: string
+ Description: string
+ Time_create: date
+ Username: string
+ ListPicture: List<Picture>
- Functions:
+ Albums(): Default constructor
+ Albums(int id, string name, string description, date TimeCreate,
List<Picture> ListPicture, string username): Constructor with
parameter
+ getId(): get id
+ getName(): get name
+ getDescription(): get description
+ getTimeCreate(): get time create
+ getUsername(): getUsername
+ getListPicture(): get list picture

4
+ setId(int id): set id
+ setName(string name): set name
+ setDescription(string description): set description
+ setTimeCreate(string timeCreate): set time create
+ setUsername(string username): set username
+ setListPicture(List<Picture> ListPicture): set list picture

● deactiveAlbum(album_id): deactive album


● activeAlbum(album_id): active album
● editAlbum(album_id): edit album
● deleteAlbum(album_id): delete album
● viewAlbum(album_id): view album
e. Post
- Attributes:
+ Id: int
+ Title: string
+ Posted_time: datetime
+ Posted_by: string
+ CategoryPicture_Id: int
+ Url: string
+ ListPicture: List<Picture>
+ ListTag: List<Tag>
- Functions:
+ Post(): Default constructor
+ Post(int Id, string Title, string Description, datetime Posted_time, string
Posted_by, int Privacy_id,string url, List<Picture>
ListPicture,List<Tag> ListTag, int CategoryPicture_Id): Constructor
with parameter
+ getId(): Get Post Id
+ getTitle(): Get Post Title
+ getDescription(): Get Post description
+ getPostedTime(): Get posted time of this post
+ getPostedBy(): Get author of the post
+ getListPicture(): Get list picture of the post
+ getListTag(): Get list tag of the post
+ getCategoryPictureId(): return CategoryPicture Id
+ setId(int Id): Set Post Id
+ setTitle(string Title): Set Post Title
+ setPostedTime(Datetime Posted_time): Set Posted date time
+ setPostedBy(string Posted_by): Set author of the post
+ setListPicture(List<Picture> ListPicture): Set list picture of the post
+ setListTag(List<Tag> ListTag): Set list tag of the post
+ setCategoryPictureId(int CategoryPicture_Id): set category picture id
● uploadNewPictureInPost(Picture): upload new picture in post
● deletePost(post_id): delete post
● editInformationPost(post_id): update information of post
● viewInfomationPost(post_id): view information of post
● viewListLikePosted(post_id): view list user like post
f. Tag
- Attributes:
+ Id: int

5
+ TagName: string
+ ListPicture: List<Picture>
- Functions:
+ Tags(): default constructor
+ Tags(int id, string tagname, List<Picture> ListPicture): Constructor
with full parameters
+ getId(): return id
+ getTagName(): return tagName
+ getListPicture(): return list picture
+ setId(int id): set Id
+ setTagName(string tagName): set tag name
+ setListPicture(List<Picture> ListPicture): set list picture

● createTag(tag): create new tag


g. CategoryPicture
- Attributes:
+ Id: int
+ CategoryName: string
+ ListPicture: List<Picture>
- Functions:
+ Category_Picture(): default constructor
+ Category_Picture(int id, string CategoryName, List<Picture>
ListPicture): Constructor with full parameters
+ getId(): return id
+ getCategoryName(): return categoryName
+ getListPicture(): return list picture
+ setId(int id): set Id
+ setCategoryName(string categoryName): set category name
+ setListPicture(List<Picture> ListPicture): set list picture
h. Report
- Attributes:
+ Id: int
+ User_report: string
+ Picture_id: int?
+ Post_id: int?
+ Time_report: date
+ Description: string
+ ListReportCategory: List<ReportCategory>
- Functions:
+ Report(): default constructor
+ Report(int id, string user_report, int? picture_id int? post_id, date
Time_report, List<ReportCategory> ListReportCategory, string
description): Constructor with full parameters
+ getId(): return id
+ getUserReport(): return user report
+ getTime_report(): return time report
+ getPicture_id(): return Picture id reported
+ getPost_id(): return Post id reported
+ getDescription(): return Description
+ getListReportCategory(): return list Report Category
+ setId(int id): set id report

6
+ setUserReport(string User_report): set user report
+ setTimeReport(date Time_report): set time report
+ setPicture_id(int Picture_id): set Picture id reported
+ setPost_id(int Post_id): set Postid reported
+ setDescription(string Description): set Description
+ setListReportCategory(List<ReportCategory> ListReportCategory): set
list Report Category

● createNewReport(report): user create new report post or picture


i. ReportCategory
- Attributes:
+ Id: int
+ Name: string
+ Description: string
+ ListReport: List<Report>
- Functions:
+ ReportCategory(): default constructor
+ ReportCategory(int id, string name, string description,
List<Report>ListReport): Constructor with full parameters
+ getId(): return id
+ getName(): return report category name
+ getDescription(): return description
+ getListReport(): return list report
+ setId(int id): set Id
+ setName(string name): set report category name
+ setDescription(string description): set description
+ setListReport(List<Report> ListReport): set list Report
j. Like
- Attributes:
+ Username: string
+ Picture_id: int?
+ Post_id: int?
- Functions:
+ Like(): default constructor
+ Like(string username,int? picture_id, int? post_id): Constructor with full
parameters
+ getUsername(): return username
+ getPictureId(): return Picture Id
+ getPostId(): return post Id
+ setUsername(int username): set username
+ setPicture_id(int picture_id): set picture id
+ setPost_id(int post_id): set post id

● createLike(Like): create new like of the post


● unLike(Like): delete like
k. Notification
- Attributes:
+ Id: int
+ Name: string
+ Description: string

7
+ Username: string
- Functions:
+ Notification(): default constructor
+ Notification(int id, string name, string description, string username):
Constructor with full parameters
+ getNotificationId(): return notification id
+ getNotificationName(): return Notification name
+ getDescription(): return Description of the notification
+ getUsername(): return Username of the notification
+ setNotificationId(int id): set notification id
+ setNotificationName(string name): set Notification name
+ setDescription(string description): set Description of the notification
+ setUsername(string username): set Username of the notification
+ GetNotification(int id): get Notification by Notification Id.
l. Feedback
- Attributes:
+ FeedbackID: int
+ Username: string
+ Description: string
+ Time_create: date
+ Star: int
- Functions:
+ Feedback(): Default constructor
+ Feedback(int feedbackID, string username, string description, Date
TimeCreate, int star): Constructor with parameter
+ getFeedbackId(): return id
+ getUserName(): return user name
+ getDescription(): return description
+ getTimeCreate(): return time create
+ getStar(): return star
+ setFeedbackId(int id): get id
+ setUserName(string UserName): set user name
+ setDescription(string Description): set description
+ setTimeCreate(Date Time_create): set time create
+ setStar(int Star): setStar

● createNewFeedBack(Feedback): Create new feedback


● updateFeedback(Feedback): update feedback
● deleteFeedback(Feedback): delete feedback
m. Question
- Attributes:
+ QuestionId: int
+ QuestionContent: string
+ QuestionStates: string
+ PostedAt: Datetime
+ LastModified: Datetime
+ Author: string
+ ListQuestionTag: List<QuestionTag>
- Functions:
+ Question(): Default constructor
+ Question(int QuestionId, string QuestionContent, string
QuestionStates, Datetime PostedAt, Datetime LastModified, string

8
PostedBy, string Author, List<QuestionTag ListQuestionTag):
Constructor with parameter
+ GetQuestionId(): Get question Id
+ GetQuestionContent(): Get question content
+ GetQuestionStates(): Get question states
+ GetPostedAt(): Get first post time
+ GetLastModified(): Get last modified time
+ GetAuthor(): Get question’s author
+ GetQuestionTags(): Get list question tag
+ SetQuestionId(int QuestionId): Set question Id
+ SetQuestionContent(string QuestionContent): Set question content
+ SetQuestionStates(string QuestionStates): Set question state
+ SetPostedAt(Datetime PostedAt): Set first time that question was
posted.
+ SetLastModified(Datetime LastModified): Set last time that question
was modified.
+ SetAuthor(int Author): Set author of question
+ SetQuestionTags( List<QuestionTag> ListQuestionTag): Set list tag of
question.

● AskedQuestions(): View all questions that are asked by supporters.


● CreateQuestion(): Create a new question.
● ViewQuestion(int QuestionId): View an existing question.
● UpdateQuestion(int QuestionId): Edit a question.
● DeleteQuestion(int QuestionId): Delete a question.
● Comment(QuestionId): Add comment to a question.
n. Answer
- Attributes:
+ AnswerId: int
+ AnswerContent: string
+ PostedAt: Datetime
+ ModifiedAt: Datetime
+ isChosen: bool
+ QuestionId: int
+ ProviderAuthor: int
- Functions:
+ Answer(): Default constructor
+ Answer(int AnswerId, string AnswerContent, Datetime PostedAt,
Datetime ModifiedAt, bool isChosen, int QuestionId, int
ProviderAuthor): Constructor with parameter
+ GetAnswerId(): get answer Id
+ GetAnswerContent(): Get answer content
+ GetPostedAt(): Get datetime that first time answer posted
+ GetModifiedAt(): Get datetime that last time answer modified.
+ GetProviderAuthor(): get author of the answer.
+ GetIsChosen(): get status of user is active or inactive.
+ GetQuestionId(): get question Id that this answer is answering
+ SetAnswerId(int Id): set answer id
+ SetAnswerContent(string AnswerContent): set answer content.
+ SetPostedAt(Datetime PostedAt): Set datetime of first time answer
posted.
+ setModifiedAt(Datetime PostedAt): Set datetime of last time answer
modified.

9
+ setIsChosen(bool isChosen): set status of the answer that is highlight
or not
+ SetQuestionId(int QuestionId): set question Id of the answer
2. Draw Use Case diagram

10
3. Draw Class Diagram
a. Admin Class Diagram

11
b. User diagram

12
c. Supporter Diagram

13
4. Make Identification of components

5. Draw Component Diagram

14

You might also like