Help with Java Classes for Blog App Project

  • Context: Java 
  • Thread starter Thread starter esmeco
  • Start date Start date
  • Tags Tags
    Classes Java
Click For Summary
SUMMARY

The forum discussion centers on the design of a Java-based blog application that manages user posts. The application requires classes for different post types, including Information, Version, Debate, and Answer, all extending an abstract Post class. Key functionalities include user login identification, post creation, and blog storage and retrieval. The provided class structure is a solid foundation, but further design specifications are necessary for complete functionality.

PREREQUISITES
  • Understanding of Java object-oriented programming concepts
  • Familiarity with abstract classes and inheritance in Java
  • Basic knowledge of file handling in Java for blog storage
  • Experience with data structures to manage collections of posts
NEXT STEPS
  • Implement user authentication methods in Java
  • Explore Java Collections Framework for managing posts
  • Learn about Java serialization for saving and loading blog data
  • Design a user interface for the blog application using Java Swing or JavaFX
USEFUL FOR

Java developers, software engineers, and students working on object-oriented programming projects, particularly those interested in building applications that manage user-generated content.

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?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
904
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K