Skip to content

OsamaRafat100/AskMe

Repository files navigation

askfm

first OOP project with C++.

I tried to use some of the topics of OOP.

Basically, the program depends on ID to answer. You should show the questions that were sent to you as they will not appear automatically. used file-based system.

Features

  • User Management

    • Sign up and log in functionality.
    • User data persistence via file storage.
  • Question Management

    • Ask and answer questions (anonymous or identified).
    • Manage threaded questions.
    • List questions for a user and questions asked by a user.
    • Delete questions.

How to Use

Prerequisites

  • A C++ compiler supporting C++11 or later.
  • users.txt and questions.txt files store user and question data.

Available Options

  • Sign Up: Create a new user account.
  • Log In: Log in to an existing account.
  • Ask Questions: Ask other users questions (anonymous or identified).
  • Answer Questions: View and answer questions directed to you.
  • Delete Questions: Remove questions directed to you.
  • List Users: Display a list of all registered users.

File Storage

  • users.txt: Stores user details.
  • questions.txt: Stores questions and their answers.

Code Overview

Key Classes

  1. User: Handles user details and serialization.
  2. UserManager: Manages user-related operations like sign-up and login.
  3. Question: Represents a question with support for threads and answers.
  4. QuestionManager: Handles all question-related operations including asking, answering, and deleting.

Utility Functions

  • WriteLine: Appends or overwrites a file with a line of text.
  • ReadLines: Reads all lines from a file.
  • SplitLine: Splits a string into parts based on a delimiter.

NOTE

  • The project still need alot of exceptions handling. (sorry for that)

  • Username consist from one string with no spaces.

  • Try system from diff. account to can understand how system work.

I will be thankful to U if you do that:

  1. you can tell me what precent of using opp in the project.
  2. tell me about any bugs that may be face you during testing .
  3. suggest features with some hint to do it(prefered).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages