Mad Microproject
Mad Microproject
Computer Engineering
BY:-
Ms. V. B. Maskar
SVERI’S
COLLEGE OF ENGINEERING (POLY),
PANDHARPUR 2024-25
CERTIFICATE
Submitted by:
1. Isha Abhijit Lokhande
2. Sakshi Kishor Huke
3. Ananya Dhananjay Asabe
4. Srushti Sachin Patil
5. Mayuri Mahesh Tapkire
Examiner Principal
(Prof. ) (Prof. Dr. N. D. Misal)
Place: Pandharpur
Date:
Annexure II
Evolution sheet for Micro Project
Academic Year: - 2024-25 Name of Faculty: -Ms. V. B. Maskar
Course: - Computer Engineering Course Code: - CO6I
Subject: -Mobile Application Development Subject Code: -22617
Semester:- 6th Scheme: - I
Title of Railway Reservation App
Project: -
COs addressed by the Micro Project:
CO3 Develop rich user interfaces by using layouts and controls.
(b) Unit Outcomes in 4a. Develop rich user interfaces for the given android application.
Cognitive domain:
5d.Write the query to perform the given database management
operation.
Marks out of
Marks out
6 for Total marks out
of 4 for
Roll No Name of student performance of 10
performance in
in group
activity oral/Presentation
3
ACKNOWLEDGEMENT
I take this opportunity to express my sincere thanks and deep sense of gratitude to my
guide, Ms. V. B. Maskar Madam for her constant support, motivation, valuable guidance and
immense help during the entire course of this work. Without her constant encouragement, timely
advice and valuable discussion, it would have been difficult in completing this work. I would also
like to acknowledge the Computer Engineering department who provided me the facilities for
completion of the project. We are thankful to her for sharing her experience in the research field
with me and providing constant motivation during entire project work.
Name of Student:-
1. Rationale:
The Railway Reservation App is designed to streamline the process of train reservations by
allowing users to add train schedules, view train details, book tickets, and check booked
reservations. The app stores all train details and booking information in an SQLite database,
ensuring efficient data management. Users can add train schedules with relevant details, which
can later be retrieved and displayed. The ticket booking feature enables users to reserve seats
for available trains, and all booked tickets are stored and displayed in a structured format. This
application simplifies the railway ticketing process, making it more convenient and accessible
for users.
4. Literature Review:
Research on railway reservation systems highlights the importance of efficient ticket booking
and train schedule management. Many applications focus on providing users with a seamless
experience for adding train details, making reservations, and retrieving booking information.
Overall, these systems aim to enhance convenience by ensuring smooth and organized railway
travel.
5. Actual Methodology Followed:
• MainActivity.java:
package com.example.railway2;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnAddTrain = findViewById(R.id.btnAddTrain);
btnBookTicket = findViewById(R.id.btnBookTicket);
btnViewBookings = findViewById(R.id.btnViewBookings);
btnViewTrains = findViewById(R.id.btnViewTrains); // Initialize button
btnAddTrain.setOnClickListener(v -> {
Intent intent = new Intent(MainActivity.this, AddTrainActivity.class);
startActivity(intent);
});
btnBookTicket.setOnClickListener(v -> {
Intent intent = new Intent(MainActivity.this, BookTicketActivity.class);
startActivity(intent);
});
btnViewBookings.setOnClickListener(v -> {
Intent intent = new Intent(MainActivity.this, ViewBookingsActivity.class);
startActivity(intent);
});
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_train);
etTrainNumber = findViewById(R.id.etTrainNumber);
etTrainName = findViewById(R.id.etTrainName);
etSource = findViewById(R.id.etSource);
etDestination = findViewById(R.id.etDestination);
etTime = findViewById(R.id.etTime);
btnSaveTrain = findViewById(R.id.btnSaveTrain);
btnSaveTrain.setOnClickListener(v -> {
String trainNo = etTrainNumber.getText().toString().trim();
String trainName = etTrainName.getText().toString().trim();
String source = etSource.getText().toString().trim();
String destination = etDestination.getText().toString().trim();
String time = etTime.getText().toString().trim();
• ViewTrainsActivity.java:
package com.example.railway2;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_trains);
listViewTrains = findViewById(R.id.listViewTrains);
dbHelper = new DBHelper(this);
loadTrainList();
}
builder.setView(layout);
int fare;
switch (classType) {
case "Sleeper": fare = 500; break;
case "AC 3 Tier": fare = 1200; break;
case "AC 2 Tier": fare = 1800; break;
default: fare = 2500;
}
builder.setNegativeButton("Cancel", null);
builder.show();
}
}
• ViewBookingsActivity.java:
package com.example.railway2;
import android.os.Bundle;
import android.widget.ListView;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
ListView listViewBookings;
DBHelper dbHelper;
ArrayList<String> bookingList;
BookingAdapter adapter; // Custom Adapter
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_bookings); // Your XML file
listViewBookings = findViewById(R.id.listViewBookings);
dbHelper = new DBHelper(this);
package com.example.railway2;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import java.util.ArrayList;
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE trains (trainNo TEXT PRIMARY KEY, trainName
TEXT, source TEXT, destination TEXT, time TEXT)");
db.execSQL("CREATE TABLE bookings (id INTEGER PRIMARY KEY
AUTOINCREMENT, passengerName TEXT, trainNo TEXT, trainName TEXT, seatNo
TEXT, classType TEXT, fare INTEGER)");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS trains");
db.execSQL("DROP TABLE IF EXISTS bookings");
onCreate(db);
}
public void insertTrain(String trainNo, String trainName, String source, String destination,
String time) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put("trainNo", trainNo);
values.put("trainName", trainName);
values.put("source", source);
values.put("destination", destination);
values.put("time", time);
db.insert("trains", null, values);
db.close();
}
public void deleteTrain(String trainNo) {
SQLiteDatabase db = this.getWritableDatabase();
db.delete("trains", "trainNo=?", new String[]{trainNo});
db.close();
}
• Train.java:
package com.example.railway2;
public Train(String trainNo, String trainName, String source, String destination, String
time) {
this.trainNo = trainNo;
this.trainName = trainName;
this.source = source;
this.destination = destination;
this.time = time;
}
• TrainAdapter.java:
package com.example.railway2;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null)
convertView = LayoutInflater.from(context).inflate(R.layout.train_item, parent, false);
btnDeleteTrain.setOnClickListener(v -> {
dbHelper.deleteTrain(train.getTrainNo());
trainList.remove(position);
notifyDataSetChanged();
Toast.makeText(context, "Train Deleted", Toast.LENGTH_SHORT).show();
});
return convertView;
}
}
• Dependencies in build.gradle:
dependencies {
implementation libs.appcompat
implementation libs.material
implementation libs.activity
implementation libs.constraintlayout
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
These dependencies help in building a modern, user-friendly UI, managing app components
efficiently, and ensuring robust testing for a seamless Android experience.
6. . Railway Reservation App:
The Railway Reservation App is a user-friendly and efficient solution designed to simplify
train booking and schedule management. When a user opens the app, they can add train details,
including train name, number, departure time, source and destination, which are then stored in
an SQLite database for easy retrieval. Users can also view the list of available trains, ensuring
they have access to up-to-date travel information. This structured approach allows seamless
management of train schedules, making the booking process more convenient and organized.
Once a user selects a train, they can proceed to book tickets, which are securely stored in the
SQLite database. The booked tickets are displayed in a structured format, allowing users to
view their reservations at any time. The app ensures fast and efficient data retrieval while
keeping all information accessible offline. With its intuitive interface, smooth navigation, and
essential features, the Railway Reservation App provides a hassle-free experience for managing
train travel and reservations.
7. Features :
1. Train Schedule Management – Users can add and store train details, including train name,
number, departure time, and destination.
2. Train Search and Listing – The app displays a list of available trains stored in the SQLite
database, making it easy to access train information.
3. Ticket Booking System – Users can book tickets for a selected train and save the
reservation details for future reference.
4. Booked Tickets Display – A dedicated section allows users to view their booked tickets in
a structured, scrollable format.
5. Offline Database Support – Uses SQLite for fast and efficient storage and retrieval of train
and booking details without requiring an internet connection.
6. User-Friendly Interface – Features a clean, intuitive design with smooth navigation for a
seamless booking experience.
8. Technical Specifications:
Database: SQLite
The Railway Reservation App is designed to simplify train bookings and schedule
management for users. The app’s main screen features a clean and intuitive interface where
users can add train details, including the train name, number, departure time, and
destination. After entering the necessary information, users can save the train details, which
are then stored in an internal SQLite database for easy access.
Once the train list is displayed, users can browse through available options and select a train
for booking. Tapping on a train opens a detailed screen that provides all relevant
information, including the train’s schedule and route details, ensuring users have all
necessary travel information before booking their tickets.
Additionally, the ticket booking screen includes an option to view booked tickets in a
structured list. Users can check their reservations at any time, making travel planning more
efficient. The app ensures a smooth and organized railway booking experience with offline
data storage, fast retrieval, and an easy-to-use interface.
1. User-friendly interface allowing seamless navigation for adding and managing train
details.
2. Efficient data storage using SQLite to save and retrieve train schedules and booking
records.
3. Train listing feature displaying available trains with essential travel information.
4. Detailed booking information providing train schedules, departure times, and destinations.
5. Booked ticket management enabling users to view and track their reservations easily.
10. Future developments:
• Advanced Search Filters: Implement filters for train type, travel class, departure time,
and availability to refine search results.
• User Reviews and Ratings: Let passengers rate trains and share travel experiences to
help others make informed choices.
• Interactive Booking Assistance: Provide a guided step-by-step booking process with
prompts and suggestions for a smooth experience.
• Alternative Route Suggestions: Recommend alternate trains and routes in case of
unavailability or delays.
• Integrated Payment System: Enable secure online payments for ticket bookings within
the app.
• Personalized Travel Recommendations: Suggest trains and routes based on user
preferences, past bookings, and travel patterns.
• Live Train Tracking: Provide real-time train status updates, including delays, arrivals,
and departures.
• Advantages:
1. Efficient Ticket Booking: Allows users to book train tickets seamlessly, ensuring a
hassle-free reservation process.
2. User-Friendly Interface: The app features a clean and intuitive design, making it easy
for everyone to navigate.
3. Detailed Train Information: Provides essential details such as departure time,
destination, and route for better travel planning.
4. Flexible Booking System: Users can book tickets for multiple trains and view their
reservations at any time.
• Disadvantages:
1. Limited Offline Functionality: While train details and bookings are stored in SQLite,
features like real-time train status and online payments require an internet connection.
2. Manual Data Entry: Train details need to be manually added to the database, which
can be time-consuming and may lead to outdated information if not regularly updated.
3. No Automated Seat Availability Updates: The app does not fetch live seat
availability, requiring users to manually check and update reservations.
4. Lack of Payment Integration: The app does not currently support direct ticket
purchases, requiring users to book externally through railway portals.
5. No User Feedback System: Users cannot directly provide reviews or report issues
within the app, limiting improvements based on user experiences.
11. Actual output:
12. Actual Resource Used:
This micro-project helped us develop essential skills in Android app development, including
creating user-friendly interfaces using Java and XML, managing an SQLite database for storing
train details and bookings, and handling data transfer between activities. We improved our
UI/UX design, integrated libraries for better functionality, and implemented features for train
management and ticket booking. Along the way, we enhanced our problem-solving abilities and
learned the importance of writing clean, efficient, and well-structured code to ensure a smooth
user experience.
The Railway Reservation App provides a simple and efficient solution for managing train
reservations. By integrating train search, ticket booking, and reservation management, the app
enhances user convenience and streamlines the booking process. Using SQLite for data storage, it
ensures offline accessibility while maintaining a user-friendly interface for seamless navigation.
Through this project, we gained valuable insights into Android app development, database
management, and UI/UX design. This application can be further enhanced with features like real-
time train tracking, payment integration, and automated seat availability updates, making it even
more functional and user-centric.
16. References:
1. https://www.irctc.co.in
2. https://www.makemytrip.com
3. https://www.redbus.in