Code Monkey home page Code Monkey logo

facebook-management-system's People

Contributors

rehab-k-bahnasy avatar abdllrhmanzedan avatar alhassan04 avatar

Watchers

 avatar

facebook-management-system's Issues

Comment

Objective:

allow users to add comments to existing posts.

Specifications:

Create a Comment class to represent individual comments. The Comment class should include the following attributes:

id: Unique identifier for the comment
userId: Identifier for the user who created the comment
postId: Identifier for the post to which the comment belongs
content: The text content of the comment
createdAt: Timestamp indicating the time the comment was created

Modify the Post class to include a list of Comment objects, representing the comments associated with that post.

Modify the Post class to include the following methods:

addComment(Comment comment): This method should add the provided Comment object to the list of comments associated with the specified postId.
getCommentsByPostId(Long postId): This method should retrieve all comments associated with the specified postId.

Acceptance Criteria:

  • The GUI should provide a dedicated area for users to enter comments for a specific post.
  • Users should be able to enter comment content and submit the comment by clicking the submit button.
  • Upon successful comment submission, the new comment should be displayed in the list of comments for the corresponding post.
  • The program should handle invalid input or data access issues gracefully.

Login Screen

Objective:

To create a login screen that allows users to log into his account via username and password

Zedan's design:
image

** Specifications:**

  • Design a login screen with two input fields: username and password.
  • Implement a validation mechanism to verify that the entered username and password match the stored credentials.
  • Upon successful authentication, redirect the user to the homepage.

Acceptance Criteria:

  • Users should be able to enter their username and password into the respective input fields.
  • The system should validate the entered credentials against the stored user information.
  • If the credentials are valid, redirect the user to the homepage.
  • If the credentials are invalid, display an error message prompting the user to re-enter their credentials.

Message

Objective:

Create a user-friendly JavaFX application that allows users to establish connections with their friends and send them messages within a graphical interface.

Specifications:

Design a GUI using JavaFX components, including a friend list panel for selecting the recipient of the message, a text area for composing the message, and a send button to transmit the message.

Create a Message class to represent individual messages. The Message class should include the following attributes:

id: Unique identifier for the message
senderId: Identifier for the user who sent the message
recipientId: Identifier for the user who received the message
content: The text content of the message
createdAt: Timestamp indicating the time the message was sent

The class should implement the following methods:

sendMessage(Message message): This method should send the provided Message object to the recipient and store it in a persistent storage mechanism ( file).
getAllMessages(): This method should retrieve all messages from the persistent storage mechanism.

Create a controller class to manage the interaction between the GUI components and the Message class.

Upon clicking the send button, extract the message content from the text area and create a Message object with the appropriate sender and recipient IDs.

Call the sendMessage method of the Message class to send the message to the recipient.

Upon successful message transmission, display a confirmation message or update the message list accordingly.

Implement error handling to gracefully handle invalid input or data access issues.

Acceptance Criteria:

  • The GUI should provide a user-friendly interface for selecting a recipient, composing a message, and sending the message.
  • Users should be able to choose a friend from their friend list and enter the message content in the text area.
  • Upon clicking the send button, the message should be sent to the selected recipient and displayed in the corresponding message area.
  • The program should handle invalid input or data access issues gracefully.

Register Screen

Objective:

To create a sign-up screen that allows new users to register and create an account.

image

Specifications:

Design a sign-up screen with the following input fields:

  • Username
  • Password
  • Email address
  • Phone number (optional)
  • Date of birth
  • Gender
  • First name
  • Last name

Implement validation mechanisms to verify the following:

  • Username uniqueness: Ensure the entered username is not already in use.
  • Valid email format: Check if the provided email address follows a valid email format.
  • Valid date of birth: Verify that the entered date of birth is a valid date.
  • Gender selection: Ensure the user has selected a gender from the provided options.
  • Non-empty first and last names: Check that both first and last name fields are not empty.
  • Once the registration is complete, display a confirmation message and redirect the user to the homepage

Acceptance Criteria:

  • Users should be able to enter their registration details into the respective input fields.
  • The system should validate the entered information against the defined validation rules.
  • If the registration data is valid, store the user's information and notify the user of successful registration.
  • If any validation rules fail, display appropriate error messages and prompt the user to correct the invalid information. (use try catch in java as it is a requirement in the project)

Post

Objective:

To create a user-friendly interface for users to interact with the post creation, retrieval, and management functionalities.

Specifications:

Create a Post class to represent individual posts. The Post class should include the following attributes:

id: Unique identifier for the post
userId: Identifier for the user who created the post
content: The text content of the post
createdAt: Timestamp indicating the time the post was created

The class should have the following methods:

createPost(Post post): This method should create a new post using the provided Post object and store it in a data storage mechanism (file).

getPostsByUserId(Long userId): This method should retrieve all posts created by the user with the specified userId.

getAllPosts(): This method should retrieve all posts from the data storage mechanism.

deletePost(Long postId): This method should delete the post with the specified postId from the data storage mechanism.

Specifications for GUI:

  1. Design and implement a GUI using JavaFX components to provide a user-friendly interface.

  2. Create a main application window with clearly labeled fields for user input, such as post content and user identification.

  3. Include a "Create Post" button that triggers the createPost method of the Post class to create a new post based on the user's input.

  4. Display a list of posts in a designated area of the GUI, utilizing the getAllPosts or getPostsByUserId method of the Postl class to retrieve and display relevant posts.

  5. Implement buttons or context menu options for post management, such as "Edit Post" and "Delete Post," allowing users to modify or remove existing posts.

  6. Implement appropriate error handling and feedback mechanisms to inform users of any errors or successful operations.

Acceptance Criteria:

  • The Post class should encapsulate the data related to a single post.
  • The class should provide methods for creating, retrieving, and deleting posts.
  • The program should allow users to create posts using the createPost method.
  • The program should allow users to retrieve their own posts using the getPostsByUserId method.
  • The program should allow users to view all posts using the getAllPosts method.
  • The program should allow users to delete their own posts using the deletePost method.

Additional Considerations:

  • Implement data validation to ensure that post content is not empty.
  • Implement error handling to gracefully handle invalid input or data access issues.(try catch)
  • Consider using file system to store post data persistently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.