Our teacher gave us this project and i have no idea about how to get started with it....can someone give me any guidelines about it please????!!!!
"You are required to implement an “Online Testing System” which should be able to store questions along with their answers in the question bank and allow the students to give test and get their scores."
"When the program runs, it should display a well formatted “Login Menu” containing two options: “Admin Login” and “Student Login”."

Dani AI

Generated

A compact, practical starting plan plus a tiny C++ skeleton to bridge the gap between the assignment and a first commit. As suggested, specific code and errors help responders; the outline below gives concrete pieces to implement and test before posting code.

Begin with a simple data model: a Question type holding an id, the question text, a vector of choices, and the index of the correct choice. Persist the question bank in a single file for now (CSV/quoted fields or a lightweight DB later). Admin actions are add/edit/delete/list; student actions are login, take test (select N questions, optionally randomize), and record score.

A minimal C++ sketch (illustrative only):

#include <string>
#include <vector>

struct Question {
    int id;
    std::string text;
    std::vector<std::string> choices;
    int correct; // 0-based
};

// Serialization and file I/O should escape delimiters and handle newlines.
// Use std::fstream for reading/writing persistence.

Storage choices:

  • Quick and simple: file-based CSV/quoted fields or newline-delimited JSON. Use std::fstream for basic persistence (std::fstream reference).
  • More robust: SQLite for concurrent access, queries, and durability (SQLite).

Implementation tips and pitfalls:

  • Keep the UI loop simple (text menu); separate logic from I/O for testability.
  • Randomize question order and answer order at runtime for fairness.
  • Never store plain-text passwords in a real system; at least hash them.
  • Escape/validate all file input to avoid corrupting the question bank.
  • When posting code later, include the compiler and version, OS, exact error messages, and a minimal reproducible snippet so replies can be specific and practical.

Recommended Answers

All 2 Replies

Please see this: http://www.daniweb.com/forums/announcement8-2.html

We'd be glad to help you with your assignment but you must bring at least some code to the table with specific questions.

okai i'll get my code up here in a day or two :]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.