Java classes help

Discussion in 'Java' started by esmeco, Mar 30, 2008.

  1. esmeco

    esmeco New Member

    Joined:
    Mar 27, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hello!

    I have a project in which I must simulate a blog application,with users' post mangament.
    These are the requirements:

    A blog has a title and a collection of posts.The posts have the following information:

    -author
    -data
    -title
    -text

    Each post has a code thet is generated automatically and which acts like the serial number within the speciality the post belongs to.
    The speciality are:

    -Information:This's a post with just text and an answer is forbiden.
    -Version: It's a post of an information's version that gets updated.
    -Debate: this's a post containing information and accepts one or more answers.
    -Answer: It's an answer to a specific debate.

    The program must support the following operations:

    -Ask for User login identification(no password involved) to later use as the author of given posts.
    -showing information about posts.
    -create new posts.
    -create new blog.
    -store blog in hard drive.
    -load blog.


    Here are my classes:


    Code:
    abstract public class Post 
    {
       private Date date;
       private String author;
       private String title;
       private String text;
       private int code;
        
    
    }
    
    public class Infor extends Post 
    {
       
        Version ver;
    }
    
    public class Version extends Post 
    {
       
    
    }
    
    public class Debate extends Post 
    {
        Answer ans;
        Version vers;
    }
    
    public class Answer extends Post 
    {
       
    }
    public class Debate extends Post 
    {
        String btitle;
        Post pst;
    }
    
    public class Answer extends Post 
    {
       
    }
    public class Debate extends Post 
    {
        String btitle;
        Post pst;
    }
    
    
    Does this look ok?Does it need any more specification?
    Any help is very appreciated!
     
  2. JobMatchNow

    JobMatchNow New Member

    Joined:
    Apr 10, 2008
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    0
    I dont know to much about codes but from my knowledge it seems ok looking.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice