Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package stackOverflow;
- import java.util.Date;
- import java.util.List;
- public class StackOverFlow {
- public enum AccountStatus {
- ACTIVE, BLOCKED, BANNED, COMPROMISED, BLACKLISTED, CLOSED, CANCELLED;
- }
- public enum QuestionStatus {
- OPEN, CLOSE, DELETED, ONHOLD;
- }
- public enum QuestionClsoingTag {
- DUPLICATED, OFF_TOPIC, NOT_A_REAL_QUESTION, TOO_BROAD, INVALID;
- }
- public class Address {
- String street, city, state, country, pincode;
- }
- public class Account {
- String userName;
- String password;
- String email;
- String mobile;
- String fullName;
- AccountStatus accountStatus;
- Address address;
- Date creationDate;
- int reputation;
- // reset password
- }
- public class Badge {
- String name;
- String description;
- }
- public class Member {
- Account accontDetails;
- List<Badge> badges;
- // create Question
- // setTag
- // getReputation
- // addAnswer
- // addCOmment
- // acceptAnswer
- // delete answer
- // undelete answer
- }
- public class Admin extends Member {
- // block memener
- // unblock member
- }
- public class Moderator extends Member {
- // delete question
- // undelete Question
- }
- public class Tag {
- String name;
- String description;
- int noOfTimesUsedInQuestion;
- int frequencyDaily;
- int weeklyFrequnecy;
- }
- public class Bounty {
- int reputation;
- Date expiryDate;
- // modifyExpiryDate
- }
- public class Photo {
- private int photoId;
- private String photoPath;
- private Date creationDate;
- private Member creatingMember;
- // public boolean delete();
- }
- public interface Search {
- List<Question> getQuestionListByQuery(String query);
- }
- public class Question implements Search {
- private String title;
- private String description;
- private int viewCount;
- private int voteCount;
- private Date creationTime;
- private Date updateTime;
- private QuestionStatus status;
- private QuestionClsoingTag closingRemark;
- private Member askingMember;
- private Bounty bounty;
- List<Answer> answers;
- List<Comment> comments;
- List<Photo> photos;
- // public boolean close();
- // public boolean undelete();
- // public boolean addComment(Comment comment);
- // public boolean addBounty(Bounty bounty);
- @Override
- public List<Question> getQuestionListByQuery(String query) {
- // TODO Auto-generated method stub
- return null;
- }
- }
- public class Answer {
- String description;
- int flagCOunt;
- int voteCOunt;
- private Date creationTime;
- private Date updateTime;
- private Member writingMember;
- private boolean accepted;
- List<Photo> photos;
- // incrementVoteCOunt
- }
- public class Comment {
- String text;
- int flagCOunt;
- int voteCOunt;
- private Date creationTime;
- private Date updateTime;
- private Member writingMember;
- List<Photo> photos;
- }
- }
Add Comment
Please, Sign In to add comment