Skip to content

EmptyDust/Java-2024-fengling-OnlineJudge

Repository files navigation

Java Online Judge System

Java MySQL Swing Apache POI

📝 Description

The Online Judge System is a comprehensive educational platform designed for creating, managing, and evaluating programming assignments and exams. This system facilitates interaction between teachers and students, allowing teachers to create problem sets and papers while enabling students to submit their solutions for automatic evaluation.

✨ Features

For Administrators

  • 👨‍💼 User management (teachers and students)
  • 📊 System-wide monitoring and configuration

For Teachers

  • 📝 Create and manage various types of problems (multiple choice, fill-in-the-blank, true/false)
  • 📚 Organize problems into papers/exams
  • ⏱️ Set timing constraints for exams
  • 🔍 Review student submissions and performance
  • 📋 Import student data from Excel files

For Students

  • 📄 View assigned papers and problems
  • ✍️ Submit solutions to assigned problems
  • 📊 Track progress and view scores
  • 🧪 Practice with available problem sets

🔧 Technology Stack

  • Backend: Java
  • Database: MySQL
  • UI Framework: Java Swing
  • External Libraries:
    • Apache POI (for Excel file operations)
    • MySQL Connector/J

📋 Database Structure

The system uses a MySQL database with the following structure:

Table Description
teachers Stores teacher information including ID, name, password, and major
students Contains student details like ID, name, password, major, enrollment year, and class
problems Stores all problems with various attributes including type, content, options, and answers
papers Represents exams/assignments with problems, scores, duration, and status
task Links students to papers and tracks their grades
answer Records student responses to specific problems

🚀 Installation

Prerequisites

  • JDK 21 or higher
  • MySQL 8.0 or higher
  • MySQL Connector/J driver

Setup Instructions

  1. Clone the repository

    git clone https://github.com/emptydust/Java-2024-fengling-OnlineJudge.git
    cd Java-2024-fengling-OnlineJudge
  2. Set up the database

    • Create a MySQL database
    • Run the SQL script to set up the schema:
      mysql -u your_username -p < sql/setup.sql
  3. Configure database connection

    • Update the connection parameters in the DatabaseManager class (located at src/cn/edu/shiep/fengling/DatabaseManager.java)
    • Modify the following line with your MySQL credentials:
      String url = "jdbc:mysql://localhost:3306/mydb", user = "root", pwd = "root";
  4. Build and run the project

    • Using an IDE like IntelliJ IDEA or Eclipse
    • Or via command line with javac/java

💻 Usage

Administrator

  1. Launch the application and log in as an administrator
  2. Use the manager interface to manage teachers and students

Teacher

  1. Log in with teacher credentials
  2. Create problems via the Problem Management interface
  3. Organize problems into papers, set timing and access restrictions
  4. Review student submissions and assign grades

Student

  1. Log in with student credentials
  2. View available papers
  3. Complete assignments within the specified time frame
  4. Review grades and feedback

👥 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the Mozilla Public License Version 2.0 - see the LICENSE file for details.

📞 Contact

For any questions or feedback, please contact fenglingyexing@gmail.com.


Built with ❤️ by the fengling team

About

Java课设

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages