Event Scheduling System
Event Scheduling System
viii
TABLE OF CONTENTS
CHAPTER NO. TITLE PAGE NO.
ABSTRACT
1 INTRODUCTION
1.1 Objective 1
1.2 Overview 2
2 PROJECT METHODOLOGY
3 MODULE DESCRIPTION
4.1 Conclusion 10
REFERENCES 24
APPENDIX B (SCREENSHOTS) 21
x
CHAPTER 1
INTRODUCTION
12.1 Objective
The program allows users to view all stored events, retrieve specific event details,
update event records based on their unique IDs, and delete events as needed.
Database connectivity is established using JDBC, ensuring smooth interaction
with the underlying Events table. To enhance reliability, the program validates
inputs for critical fields, such as restricting payment mode options to "Online" or
"Offline." It employs a menu-driven interface that guides users through each
operation step-by-step, providing clear instructions and feedback.
1
.
12.2 Overview
The program also enables users to view all stored events in the database, update
existing event records by specifying an event ID, and delete events as needed. A
menu-driven interface ensures user-friendliness, guiding users through the
operations with clear instructions and feedback. Each operation involves
executing SQL queries, ensuring robust interaction with the database.
Designed to streamline event scheduling and management, this project is ideal for
small organizations, academic institutions, or communities. It also serves as a
practical learning tool for developers and students to understand database
connectivity, SQL integration, and Java-based application development.
2
12.3 Java Programming Concepts
The program demonstrates several key Java concepts that are essential for
building real-world applications. Below is an overview of the Java concepts
applied in this program:
1. Object-Oriented Programming (OOP):
The program uses classes (EventManagement) and methods (e.g.,
createEvent, readEvents, updateEvent, deleteEvent) to organize
functionality logically and modularly.
2. JDBC (Java Database Connectivity):
JDBC is used to connect to a relational database and perform CRUD
operations through SQL queries. Key JDBC classes include
Connection, PreparedStatement, Statement, and ResultSet.
3. Exception Handling:
The program uses try-catch blocks to handle SQLException,
ensuring graceful handling of database-related errors and providing
meaningful error messages.
4. Input Handling:
The Scanner class is used to read user input from the command line,
allowing interaction with the user for event details and menu
navigation.
5. Control Flow:
The program employs switch statements and while loops to manage
the flow of the application, including menu navigation and repetitive
input prompts.
6. Validation:
Input validation ensures that critical fields like Payment Mode
3
accept only specific values ("Online" or "Offline"). Loops and
conditional statements enforce these rules.
7. SQL Query Execution:
SQL commands (INSERT, SELECT, UPDATE, DELETE) are
executed dynamically using PreparedStatement and Statement
objects, demonstrating how Java integrates with databases.
8. Modular Design:
Each CRUD operation is encapsulated within its own method,
promoting code reusability and separation of concerns.
9. Dynamic Querying:
The program uses placeholders (?) in PreparedStatement to
dynamically insert user inputs into SQL queries, preventing SQL
injection attacks.
10. Data Types:
Java's data types are mapped to SQL types (e.g., String for text
fields, int for IDs), demonstrating type compatibility between Java
and relational databases.
11. Loops and Iterations:
The program uses loops for tasks like displaying multiple events
from a ResultSet and repeatedly showing the menu until the user
exits.
12. System Integration:
The program showcases how Java applications can integrate with
external systems (databases) to manage and process real-world data.
These concepts make the program a comprehensive example of building
practical, database-driven applications in Java.
4
CHAPTER 2
PROJECT METHODOLOGY
In the first phase, the program will allow event creation by specifying key
details like the event name, date, and location. After the event is created,
users will have the option to register attendees for the event. The system will
prompt for attendee information, ensuring smooth and systematic
registration. It will allow users to add multiple attendees and keep track of
who has registered. The process will continue until there are no more
attendees to register.
Once registration is complete, the system will display a list of all registered
attendees, providing an overview of the event's participation. The flow of
this process will be guided by a user-friendly, step-by-step interface, and an
interactive menu will allow users to navigate the operations with ease.
5
Ultimately, this project aims to provide a scalable solution for small to
medium-sized event management, enabling organizations to streamline the
event organization process while maintaining an organized database for
event and attendee details.
Fig 2.1
6
CHAPTER 3
MODULE DESCRIPTION
The Event Management System consists of five modules: Create Event, View
Event, Update Event, Delete Event, and Exit Event. These modules have been
designed to handle various aspects of the event management process, ensuring
smooth operations from event creation to its removal. Each module serves a
specific function: the Create Event module allows users to add new events, the
View Event module enables users to view all the events, the Update Event module
allows for modifications to existing events, and the Delete Event module
facilitates the removal of events that are no longer needed. Finally, the Exit Event
module ensures a proper termination of the system. All these modules work
together cohesively, allowing users to efficiently manage event data throughout
its lifecycle.
This module allows users to create a new event by providing necessary details,
such as event name, date, start time, end time, description, location, WhatsApp
link, organizing college, and payment mode. Once the user enters the required
information, the event is stored in the database using an SQL INSERT query.
This module ensures that the event details are successfully captured and stored
for future use.
The view event module retrieves and displays all events stored in the database.
The program executes an SQL SELECT query to fetch all the event records, and
then it iterates over each record to display the event details to the user. This
module provides an overview of all events, showing information such as event
7
name, date, time, description, location, and more, allowing users to review the
event.
This module allows users to delete an event from the database by specifying its
Event ID. The program then executes an SQL DELETE query to remove the
selected event record from the database. This functionality is useful for removing
events that are no longer needed or have been canceled. It ensures that theevent
list remains up-to-date and accurate
8
3.5 EXIT EVENT
The exit module allows users to exit the program. When selected, the program
gracefully terminates, closing any active connections and exiting the application.
This module is important for properly ending the user session and ensuring that
the system shuts down without leaving any open resources.
9
CHAPTER 4
4.1 CONCLUSION
10
organizations of all sizes, offering a full range of capabilities to streamline
event planning and execution.
Ultimately, this system not only simplifies event management but also lays
the groundwork for a more advanced and feature-rich solution that can
address the evolving needs of event organizers and participants. It
demonstrates how core principles of software development can be applied to
create a useful and adaptable system that meets both current and future
requirements.
11
to navigate, even without technical expertise. Furthermore, by focusing on
security and validation at each step, the system ensures that user inputs are
safe, thereby preventing potential vulnerabilities such as SQL injection
attacks.
As technology continues to advance, the Event Management System
provides a strong foundation for future growth. By adding features such as
personalized event recommendations, social media integration, and
advanced data analytics, the system could cater to a wider range of users and
enhance the overall event experience for both organizers and attendees. This
system demonstrates how thoughtful design and modern programming
practices can come together to create an effective and sustainable solution
for event management needs.
12
.
APPENDIX A
1) EventManagement.java
import java.sql.*;
import java.util.Scanner;
// Create an event
public static void createEvent(String name, String date, String startTime,
String endTime, String description, String location, String whatsappLink, String
organizingCollege, String paymentMode) {
String query = "INSERT INTO Events (EventName, EventDate, StartTime,
EndTime, Description, Location, WhatsAppLink, OrganizingCollege,
PaymentMode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
try (PreparedStatement stmt = connection.prepareStatement(query)) {
stmt.setString(1, name);
stmt.setString(2, date);
stmt.setString(3, startTime);
stmt.setString(4, endTime);
stmt.setString(5, description);
stmt.setString(6, location);
stmt.setString(7, whatsappLink);
stmt.setString(8, organizingCollege);
13
stmt.setString(9, paymentMode);
stmt.executeUpdate();
System.out.println("Event created successfully!");
} catch (SQLException e) {
e.printStackTrace();
}
}
while (rs.next()) {
System.out.println("Event ID: " + rs.getInt("EventID"));
System.out.println("Event Name: " + rs.getString("EventName"));
System.out.println("Event Date: " + rs.getDate("EventDate"));
System.out.println("Start Time: " + rs.getTime("StartTime"));
System.out.println("End Time: " + rs.getTime("EndTime"));
System.out.println("Description: " + rs.getString("Description"));
System.out.println("Location: " + rs.getString("Location"));
System.out.println("WhatsAppLink:"
+rs.getString("WhatsAppLink"));
System.out.println("OrganizingCollege:"
+rs.getString("OrganizingCollege")); System.out.println("PaymentMode:"
+ rs.getString("PaymentMode")); System.out.println(" ");
}
14
} catch (SQLException e) {
e.printStackTrace();
}
}
public static void updateEvent(int eventId, String name, String date, String
startTime, String endTime, String description, String location, String
whatsappLink, String organizingCollege, String paymentMode) {
String query = "UPDATE Events SET EventName = ?, EventDate = ?,
StartTime = ?, EndTime = ?, Description = ?, Location = ?, WhatsAppLink = ?,
OrganizingCollege = ?, PaymentMode = ? WHERE EventID = ?";
try (PreparedStatement stmt = connection.prepareStatement(query)) {
stmt.setString(1, name);
stmt.setString(2, date);
stmt.setString(3, startTime);
stmt.setString(4, endTime);
stmt.setString(5, description);
stmt.setString(6, location);
stmt.setString(7, whatsappLink);
stmt.setString(8, organizingCollege);
stmt.setString(9, paymentMode);
stmt.setInt(10, eventId);
stmt.executeUpdate();
System.out.println("Event updated successfully!");
} catch (SQLException e) {
e.printStackTrace();
}
}
15
// Delete an event
public static void deleteEvent(int eventId) {
String query = "DELETE FROM Events WHERE EventID = ?";
try (PreparedStatement stmt = connection.prepareStatement(query)) {
stmt.setInt(1, eventId);
stmt.executeUpdate();
System.out.println("Event deleted successfully!");
} catch (SQLException e) {
e.printStackTrace();
}
}
while (true) {
System.out.print("Choose an option: ");
int choice = scanner.nextInt();
scanner.nextLine(); // Consume newline
switch (choice) {
case 1:
16
System.out.print("Enter Event Name: ");
String name = scanner.nextLine();
System.out.print("Enter Event Date (YYYY-MM-DD): ");
String date = scanner.nextLine();
System.out.print("Enter Start Time (HH:MM:SS): ");
String startTime = scanner.nextLine();
System.out.print("Enter End Time (HH:MM:SS): ");
String endTime = scanner.nextLine();
System.out.print("Enter Description: ");
String description = scanner.nextLine();
System.out.print("Enter Location: ");
String location = scanner.nextLine();
System.out.print("Enter WhatsApp Link: ");
String whatsappLink = scanner.nextLine();
System.out.print("Enter Organizing College: ");
String organizingCollege = scanner.nextLine();
System.out.print("Enter Payment Mode (Online/Offline): ");
String paymentMode;
while (true) {
paymentMode = scanner.nextLine();
if(paymentMode.equalsIgnoreCase("Online") ||
paymentMode.equalsIgnoreCase("Offline")) {
break;
} else {
System.out.println("Invalid input. Please enter 'Online' or
'Offline'.");
System.out.print("Enter Payment Mode (Online/Offline): ");
}
}
17
createEvent(name, date, startTime, endTime, description, location,
whatsappLink, organizingCollege, paymentMode);
break;
case 2:
readEvents();
break;
case 3:
System.out.print("Enter Event ID to update: ");
int updateId = scanner.nextInt();
scanner.nextLine(); // Consume newline
System.out.print("Enter New Event Name: ");
String newName = scanner.nextLine();
System.out.print("Enter New Event Date (YYYY-MM-DD): ");
String newDate = scanner.nextLine();
System.out.print("Enter New Start Time (HH:MM:SS): ");
String newStartTime = scanner.nextLine();
System.out.print("Enter New End Time (HH:MM:SS): ");
String newEndTime = scanner.nextLine();
System.out.print("Enter New Description: ");
String newDescription = scanner.nextLine();
System.out.print("Enter New Location: ");
String newLocation = scanner.nextLine();
System.out.print("Enter New WhatsApp Link: ");
String newWhatsappLink = scanner.nextLine();
System.out.print("Enter New Organizing College: ");
String newOrganizingCollege = scanner.nextLine();
System.out.print("Enter New Payment Mode (Online/Offline): ");
String newPaymentMode;
while (true) {
18
newPaymentMode = scanner.nextLine();
if (newPaymentMode.equalsIgnoreCase("Online") ||
newPaymentMode.equalsIgnoreCase("Offline")) {
break;
} else {
System.out.println("Invalid input. Please enter 'Online' or
'Offline'.");
System.out.print("Enter New Payment Mode (Online/Offline):
");
}
}
updateEvent(updateId, newName, newDate, newStartTime,
newEndTime, newDescription, newLocation, newWhatsappLink,
newOrganizingCollege, newPaymentMode);
break;
case 4:
System.out.print("Enter Event ID to delete: ");
int deleteId = scanner.nextInt();
deleteEvent(deleteId);
break;
case 5:
System.out.println("Exiting...");
System.exit(0);
default:
System.out.println("Invalid option. Try again.");
}
}
}
}
19
2) SQL queries
USE EventManagement;
20
APPENDIX B
(SCREENSHOTS)
1) CREATE EVENT
2) VIEW EVENT
21
3) UPDATE EVENT
4) DELETE EVENT
5) EXIT EVENT
22
SQL Tables
23
REFERENCES
https://stackoverflow.com/questions/5556664/how-to-fix-no-suitable-
driver-found-for-jdbcmysql-localhost-dbname-error-w
https://docs.oracle.com/javase/tutorial/
https://docs.oracle.com/javase/tutorial/
24