Java Help with Java Classes for Blog App Project

  • Thread starter Thread starter esmeco
  • Start date Start date
  • Tags Tags
    Classes Java
AI Thread Summary
The discussion centers around the design of a blog application that includes user post management. Key requirements include the structure of a blog, which consists of a title and a collection of posts, each with attributes such as author, date, title, text, and an automatically generated code. The posts are categorized into four specialties: Information, Version, Debate, and Answer, each with specific characteristics and functionalities. The application must support user login identification (without passwords), display post information, create new posts and blogs, and handle storage and loading of blogs from the hard drive. The provided class structure outlines an abstract Post class and its subclasses for each post type, along with a Blog class. The discussion seeks feedback on the design and any additional specifications needed for the project.
esmeco
Messages
144
Reaction score
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 that 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(just the user id,no password or other features).
-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 { 
Version ver; 
Answer ans; 
} 

public class Answer extends Post 
{ 
} 

public class Blog { 
String btitle; 
Post pst; 
}


Does this look ok?Does it need any more specification?
Any help is very appreciated!
 
Technology news on Phys.org
Any help is really appreciated!
 
looks like a good start. what's next on your design?
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top