This is a JavaFX-based Multiple Choice Question (MCQ) application that includes a login system. The application allows users to log in and participate in MCQ tests.
- User Authentication: Secure login functionality for users.
- MCQ Test: Users can take multiple-choice tests within the application.
- Java Development Kit (JDK) 8 or higher
- JavaFX library
- MySQL database
- MySQL Connector/J (e.g.,
mysql-connector-java-8.0.28.jar
)
-
Clone the Repository:
git clone https://github.com/MayankChoudhary21/MCQ-application.git cd MCQ-application
-
Set Up the Database:
- Install MySQL and create a database named
mcq_application
. - Create a table named
users
with the following structure:CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50) NOT NULL, password VARCHAR(50) NOT NULL );
- Insert user data as needed.
- Install MySQL and create a database named
-
Configure the Application:
- Ensure the MySQL Connector/J (
mysql-connector-java-8.0.28.jar
) is included in your project's classpath. - Update the database connection details in the
Jdbc.java
file:String url = "jdbc:mysql://localhost:3306/mcq_application"; String user = "your_mysql_username"; String password = "your_mysql_password";
- Ensure the MySQL Connector/J (
-
Compile and Run:
- Compile the Java files:
javac -cp .:mysql-connector-java-8.0.28.jar *.java
- Run the application:
java -cp .:mysql-connector-java-8.0.28.jar Main
- Compile the Java files:
- Login: Enter your username and password to access the application.
- MCQ Test: Once logged in, you can participate in the MCQ test provided by the application.
Main.java
: Entry point of the application.Login.java
: Handles the login functionality.WelcomePage.java
: Displays the welcome page after successful login.Jdbc.java
: Manages database connections.Result.java
: Displays the test results.mysql-connector-java-8.0.28.jar
: MySQL Connector/J library for database connectivity.
This project is open-source and available under the MIT License.
- Mayank Choudhary
- Venkatesh Indla