Skip to content

anuskagupta123/Online-Examination-System-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Online Examination System (Java + JDBC + MySQL)

A complete console-based online examination system developed as part of my Java Development Internship at Oasis Infobyte.

This project demonstrates user authentication, admin panel features, exam module, database integration, and result storage using Java & MySQL.


🚀 Features

Student Features

  • Login with username & password
  • Start exam
  • Answer MCQ questions
  • Type X anytime to exit exam early
  • Auto score calculation
  • Score saved automatically in database

Admin Features

  • Login as admin
  • Add new questions
  • View all questions
  • View student results
  • Logout safely

🛠️ Technologies Used

Component Technology
Programming Lang Java (JDK 25)
Database MySQL 8.0
JDBC Driver mysql-connector-j 9.5
IDE VS Code
Version Control Git & GitHub

📂 Project Structure

OnlineExam/
 ├── src/
 │    ├── Login.java
 │    ├── MainMenu.java
 │    ├── Exam.java
 │    ├── AdminPanel.java
 │── lib/
 │    ├── mysql-connector-j-9.5.0.jar
 ├── .vscode/
 ├── README.md

🗄️ Database Schema (MySQL)

users table

id (INT, PK, AUTO_INCREMENT)
username (VARCHAR)
password (VARCHAR)
role (ENUM: 'admin', 'student')

questions table

id (INT, PK, AUTO_INCREMENT)
question_text (TEXT)
option_a (TEXT)
option_b (TEXT)
option_c (TEXT)
option_d (TEXT)
correct_answer (CHAR)

results table

id (INT, PK, AUTO_INCREMENT)
username (VARCHAR)
score (INT)
exam_date (TIMESTAMP DEFAULT CURRENT_TIMESTAMP)

⚙️ Setup Instructions

✅ 1. Clone the Repository

git clone https://github.com/anuskagupta123/Online-Examination-System-Java.git

✅ 2. Import MySQL Database

Create database:

CREATE DATABASE online_exam;
USE online_exam;

Create tables (users, questions, results).

✅ 3. Configure JDBC Driver

Make sure the connector .jar exists in:

OnlineExam/lib/mysql-connector-j-9.5.0.jar

✅ 4. Compile the Project

javac -cp "lib/mysql-connector-j-9.5.0.jar" src/*.java

✅ 5. Run the Project

java -cp "lib/mysql-connector-j-9.5.0.jar;src" Login

🎯 How the System Works

✅ Student Flow

  1. Login
  2. Start exam
  3. Answer MCQs
  4. Exit anytime with X
  5. Score saved

✅ Admin Flow

  1. Login
  2. Add questions
  3. View questions
  4. View results

📸 Demo Screenshots (Add your images here)

You can add images like:

![Login Screen](screenshots/login.png)
![Admin Panel](screenshots/admin_menu.png)
![Exam Module](screenshots/exam.png)

📌 Future Enhancements

  • GUI version using JavaFX
  • Timer for each question
  • Random question selection
  • Email score to student
  • Export results to Excel

👩‍💻 Author

Anuska
Java Developer | Oasis Infobyte Intern
GitHub: @anuskagupta123


⭐ Support

If you like this project, don’t forget to star the repository ⭐ on GitHub!


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages