Skip to content

Online Examination System is a Java-based command-line app that enables secure, automated exams. Administrators can create/manage tests, while students take timed quizzes and view results through a simple interface.

Notifications You must be signed in to change notification settings

sniperras/OnlineExamSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Online Examination System

πŸš€ Overview

Online Examination System is a Java-based command-line application designed to facilitate secure, efficient, and automated online exams for educational institutions. This system allows administrators to create and manage exams, students to take timed quizzes, and view their resultsβ€”all from a simple, intuitive interface.

Why This Project?

βœ… Educational Tool – Perfect for universities, colleges, and online learning platforms βœ… Secure Authentication – Role-based access (Admin/Student) with password protection βœ… Flexible Exam Management – Create custom topics, add questions, and assign exams βœ… Time-Bound Testing – Auto-submit exams when time expires βœ… Result Tracking – View scores and attempt history βœ… Open-Source & Extensible – Built with Java and plain-text file storage for easy customization


✨ Features

For Admins

  • πŸ”‘ Admin Login – Secure access with hardcoded credentials (for demo purposes)
  • πŸ“ Student Registration – Add new students with IDs and passwords
  • πŸ“š Exam Topic Creation – Define new subjects (e.g., OOP, Database, IP)
  • πŸ“‹ Question Management – Add multiple-choice questions to topics
  • πŸ“Š Exam Assignment – Assign topics to students

For Students

  • πŸ‘€ Student Login – Secure authentication with ID and password
  • πŸ“ Take Exams – Answer questions within a time limit
  • πŸ“Š View Results – Check scores after submission
  • πŸ”’ Password Change – Update credentials securely

Core Functionality

  • πŸ•’ Exam Timer – Auto-submits answers when time expires
  • πŸ“Š Attempt Tracking – Limits retakes per topic
  • πŸ“ Result Storage – Saves scores in structured files

πŸ› οΈ Tech Stack

Category Technology
Language Java (JDK 11+)
Storage Plain-text files (CSV-like format)
Build Maven (for dependency management)
IDE IntelliJ IDEA / Eclipse / VS Code
OS Windows, macOS, Linux

System Requirements

  • Java JDK 11+ (OpenJDK or Oracle JDK)
  • Text Editor / IDE (IntelliJ, Eclipse, VS Code)
  • Basic Terminal / Command Prompt (for running the app)

πŸ“¦ Installation

Prerequisites

  1. Java JDK 11+ installed (Download JDK)
  2. Git (for cloning the repository) (Download Git)
  3. Basic Java knowledge (for running and modifying the code)

Quick Start (Step-by-Step)

1. Clone the Repository

git clone https://github.com/yourusername/OnlineExamSystem.git
cd OnlineExamSystem

2. Set Up the Project

  • Option A: Using IntelliJ IDEA

    1. Open IntelliJ β†’ File β†’ Open β†’ Select the cloned folder.
    2. Wait for Maven to download dependencies (if any).
    3. Run Main.java from the src folder.
  • Option B: Using Command Line

    # Compile the Java files
    javac -d bin src/*.java
    
    # Run the application
    java -cp bin Main

3. Run the System

  • The app will prompt you to choose between Student Login or Admin Login.
  • Follow the on-screen instructions to register students, create exams, or take tests.

Alternative: Run via Docker (Coming Soon!)

(Future feature: Dockerize the app for easy deployment in containers.)


🎯 Usage

1. Admin Workflow

Register a Student

// Admin calls AdminService.registerStudent()
AdminService adminService = new AdminService();
Scanner sc = new Scanner(System.in);
adminService.registerStudent(sc);
// Input: Student ID (e.g., adma/1311/24), Name, Password

Assign an Exam to a Student

// Admin assigns a topic (e.g., "OOP") to a student
adminService.assignExamToStudent(sc);
// Input: Student ID, Topic Name (e.g., "OOP")

Create a New Topic & Add Questions

// Admin creates a new topic (e.g., "Networking")
adminService.createTopic(sc); // Input: "Networking"

// Admin adds questions to the topic
adminService.addQuestion(sc);
// Input:
// - Topic: "Networking"
// - Question: "What is HTTP?"
// - Options: A) FTP, B) HTTP, C) SMTP, D) TCP
// - Correct Answer: B

2. Student Workflow

Take an Exam

// Student logs in and takes an exam (5-minute timer)
Exam examService = new Exam();
Student student = new Student("adma/1311/24", "Natnael Bizuneh", "123456");
examService.startExam(student, 5); // 5-minute duration

View Results

// Student checks their score after submission
StudentService studentService = new StudentService();
studentService.viewResult(student);
// Output:
// Student Name: Natnael Bizuneh
// Score: 2/5
// Date: Wed Dec 17 15:20:13 EAT 2025

3. Example Exam Session

===== ONLINE EXAMINATION SYSTEM =====
1. Student Login
2. Admin Login
3. Quit
Select option: 1

Student ID: adma/1311/24
Password: 123456
βœ… Login successful. Welcome, Natnael Bizuneh!

----- STUDENT DASHBOARD -----
1. Take Exam
2. View Result
3. Change Password
4. Logout
Select option: 1

===== EXAM STARTED =====
Topic: OOP
Duration: 5 minutes

Question 1: What is the main purpose of encapsulation in OOP?
A) Data hiding
B) Code duplication
C) Memory allocation
D) Inheritance
Your Answer (A/B/C/D): A

[Time Remaining: 04:58]
...

πŸ“ Project Structure

OnlineExamSystem/
β”‚
β”œβ”€β”€ .github/                  # GitHub workflows & prompts
β”œβ”€β”€ data/                     # Stores all exam data (users, questions, results)
β”‚   β”œβ”€β”€ admin.txt             # Admin credentials (for demo)
β”‚   β”œβ”€β”€ assignments.txt       # Student-topic assignments
β”‚   β”œβ”€β”€ attempts.txt          # Attempt tracking
β”‚   β”œβ”€β”€ questions/            # Topics & questions (e.g., OOP.txt, DATABASE.txt)
β”‚   β”œβ”€β”€ results/              # Student results
β”‚   └── users/                # Student accounts
β”‚
β”œβ”€β”€ src/                      # Java source code
β”‚   β”œβ”€β”€ model/                # Data models (Student, Question, Topic)
β”‚   β”œβ”€β”€ service/              # Business logic (AdminService, Exam, StudentService)
β”‚   └── Main.java             # Entry point
β”‚
β”œβ”€β”€ .gitignore                # IDE & OS-specific ignore rules
β”œβ”€β”€ README.md                 # This file!
└── LICENSE                   # Project license

πŸ”§ Configuration

Customizing Exam Data

All exam-related data is stored in plain-text files under data/. You can:

  • Edit data/questions/*.txt to add/remove questions.
  • Modify data/assignments.txt to assign topics to students.
  • Update data/admin.txt (for demo purposes onlyβ€”not secure for production).

Environment Variables (Future Feature)

(Planned: Move credentials to .env file for better security.)


🀝 Contributing

We welcome contributions from the community! Here’s how you can help:

How to Contribute

  1. Fork the Repository β†’ GitHub Fork Guide
  2. Clone Your Fork
    git clone https://github.com/sniperras/OnlineExamSystem.git
  3. Create a Branch
    git checkout -b feature/your-feature
  4. Make Changes β†’ Follow Java coding standards.
  5. Test Your Code β†’ Ensure no regressions.
  6. Commit & Push
    git add .
    git commit -m "Add: New feature X"
    git push origin feature/your-feature
  7. Open a Pull Request β†’ Describe your changes clearly.

Development Setup

  • Use Maven for dependency management (if any).
  • Follow Java best practices (e.g., encapsulation, clean code).
  • Write unit tests (JUnit) for new features.

Code Style Guidelines

  • Indentation: 4 spaces (no tabs)
  • Naming Conventions:
    • Classes: PascalCase (e.g., StudentService)
    • Variables: camelCase (e.g., studentId)
  • Comments: Explain why, not what (code should be self-documenting).

πŸ“ License

This project is licensed under the MIT License – feel free to use, modify, and distribute it freely.

View LICENSE


πŸ‘₯ Authors & Contributors

Role Name GitHub
Creator Natnael Bizuneh @natnaelbizuneh
Contributors Bezanesh Melka [@bezanesh]
Meskereme Abako [@meskereme]
Genete Amsal [@geneteamsal]
Mahlet Tamirat [@mahlet]

Thank you to all contributors! πŸ™


πŸ› Issues & Support

Reporting Bugs

Found an issue? Open a GitHub Issue with:

  • Steps to reproduce
  • Expected vs. actual behavior
  • Screenshots/logs (if applicable)

Getting Help

FAQ

Question Answer
Is this for production? No (demo purposes only). Use for learning.
How secure is the admin password? Not secure (hardcoded for demo). Use .env in future.
Can I add more question types? Yes! Extend Question.java for new formats.

πŸ—ΊοΈ Roadmap

Planned Features

Feature Status Description
User Database ⚠️ In Progress Replace text files with SQLite/MySQL
Docker Support πŸš€ Coming Soon Containerize the app for easy deployment
GUI Interface 🎨 Future JavaFX/Swing frontend
Multi-Language 🌍 Future Support for non-English questions
Admin Dashboard πŸ“Š Future Web-based admin panel

Known Issues

  • Hardcoded admin password (security risk for demo).
  • No error handling for file operations (to be improved).
  • Limited question types (only multiple-choice).

πŸ’‘ Final Notes

This Online Examination System is a great starting point for learning Java, file I/O, and object-oriented design. Whether you're a student, educator, or developer, you can: βœ… Extend it with new features. βœ… Deploy it in a classroom setting. βœ… Contribute to make it better!

Star ⭐ this repo if you found it useful! πŸš€



---
### **Key Improvements in This README:**
1. **Engaging & Professional** – Uses emojis, clear headings, and a friendly tone.
2. **Developer-Friendly** – Includes **step-by-step installation**, **code examples**, and **contribution guidelines**.
3. **Structured & Scannable** – Uses **badges**, **tables**, and **collapsible sections** (if supported).
4. **Future-Proof** – Mentions **Docker, GUI, and database support** to attract contributors.
5. **Security Note** – Warns about **hardcoded admin password** (important for transparency).
6. **Roadmap** – Shows **planned improvements** to keep the project dynamic.

Would you like any refinements (e.g., more screenshots, a demo video link, or additional badges)? 😊

About

Online Examination System is a Java-based command-line app that enables secure, automated exams. Administrators can create/manage tests, while students take timed quizzes and view results through a simple interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages