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.
β 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
- π 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
- π€ 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
- π Exam Timer β Auto-submits answers when time expires
- π Attempt Tracking β Limits retakes per topic
- π Result Storage β Saves scores in structured files
| 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 |
- Java JDK 11+ (OpenJDK or Oracle JDK)
- Text Editor / IDE (IntelliJ, Eclipse, VS Code)
- Basic Terminal / Command Prompt (for running the app)
- Java JDK 11+ installed (Download JDK)
- Git (for cloning the repository) (Download Git)
- Basic Java knowledge (for running and modifying the code)
git clone https://github.com/yourusername/OnlineExamSystem.git
cd OnlineExamSystem-
Option A: Using IntelliJ IDEA
- Open IntelliJ β File β Open β Select the cloned folder.
- Wait for Maven to download dependencies (if any).
- Run
Main.javafrom thesrcfolder.
-
Option B: Using Command Line
# Compile the Java files javac -d bin src/*.java # Run the application java -cp bin Main
- 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.
(Future feature: Dockerize the app for easy deployment in containers.)
// 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// Admin assigns a topic (e.g., "OOP") to a student
adminService.assignExamToStudent(sc);
// Input: Student ID, Topic Name (e.g., "OOP")// 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// 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// 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===== 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]
...
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
All exam-related data is stored in plain-text files under data/. You can:
- Edit
data/questions/*.txtto add/remove questions. - Modify
data/assignments.txtto assign topics to students. - Update
data/admin.txt(for demo purposes onlyβnot secure for production).
(Planned: Move credentials to .env file for better security.)
We welcome contributions from the community! Hereβs how you can help:
- Fork the Repository β GitHub Fork Guide
- Clone Your Fork
git clone https://github.com/sniperras/OnlineExamSystem.git
- Create a Branch
git checkout -b feature/your-feature
- Make Changes β Follow Java coding standards.
- Test Your Code β Ensure no regressions.
- Commit & Push
git add . git commit -m "Add: New feature X" git push origin feature/your-feature
- Open a Pull Request β Describe your changes clearly.
- Use Maven for dependency management (if any).
- Follow Java best practices (e.g., encapsulation, clean code).
- Write unit tests (JUnit) for new features.
- Indentation: 4 spaces (no tabs)
- Naming Conventions:
- Classes:
PascalCase(e.g.,StudentService) - Variables:
camelCase(e.g.,studentId)
- Classes:
- Comments: Explain why, not what (code should be self-documenting).
This project is licensed under the MIT License β feel free to use, modify, and distribute it freely.
| 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! π
Found an issue? Open a GitHub Issue with:
- Steps to reproduce
- Expected vs. actual behavior
- Screenshots/logs (if applicable)
- Discussions: GitHub Discussions
- Email: natnaelbizuneh@gmail.com
- Community: Join our Telegram group (link in repo).
| 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. |
| Feature | Status | Description |
|---|---|---|
| User Database | 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 |
- Hardcoded admin password (security risk for demo).
- No error handling for file operations (to be improved).
- Limited question types (only multiple-choice).
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)? π