Computer Science Project SESSION: 2024-2025: Don Bosco H.S School, Kokrajhar
Computer Science Project SESSION: 2024-2025: Don Bosco H.S School, Kokrajhar
PROJECT
SESSION: 2024-2025
Submitted by:
Name: Karanjit Brahma
Roll no: 16
Class: XII (Science)
Subject: Computer science
Subject Teacher: Mam Sarojini Basumatary
ACKNOWLEDGMENT
I would like to express my sincere gratitude to
Sarojini Mam, my Computer Science teacher, for
their guidance and support throughout the
development of this project. I would also like to
thank my friends and family for their encouragement
and support.
CERTIFICATE
This certifies that Karanjit Brahma, a dedicated student of Class 12,
has successfully completed the "Weather Forecast Application"
project during the academic year 2023-2024. This project was
undertaken as a part of the curriculum under the meticulous
guidance and supervision of Sarojini Mam.
1. Planning
The planning phase is crucial as it sets
the foundation for the entire project. The
main objective was to create a robust
application capable of fetching and
displaying real-time weather information
for a given city. To enhance user
experience and functionality, the idea was
to integrate a database that would store
the user's search history. This phase
involved brainstorming sessions to outline
the project's scope, goals, and timeline.
Additionally, resource allocation, risk
management strategies, and preliminary
budget considerations were addressed to
ensure the project's feasibility and
alignment with user needs.
2. Analysis
During the analysis phase, detailed
requirements for the application were
gathered and analysed. This involved
understanding user needs and translating
them into specific, actionable
requirements. Key requirements identified
were:
- A graphical user interface (GUI) for
user-friendly interaction.
- Integration with the OpenWeatherMap
API to fetch real-time weather data.
- A MySQL database to store and
manage the search history of users.
This phase also included feasibility
studies, requirement validation, and
creating a requirement specification
document to guide the design and
development process.
3. Design
The design phase focused on creating a
blueprint for the application. This involved:
- Developing a database schema to
define the structure of the search history
table.
- Planning the user interface to ensure it
is intuitive and easy to use.
- Designing the interaction between
different components of the application.
- Creating wireframes and mockups for
the GUI to visualise the end product.
The design also addressed performance
considerations, ensuring the application
could handle multiple users and large
amounts of data efficiently.
4. Implementation
In the implementation phase, the actual
coding of the application took place. The
project was developed using Python, with
the Tkinter library employed for the GUI
and mysql-connector-python for database
connectivity. Key steps included:
- Setting up the development
environment.
- Writing and testing individual modules.
- Integrating the modules to form a
cohesive application.
- Implementing error handling and user
input validation to enhance robustness.
- Conducting initial testing to identify
and fix bugs early in the development
process.
5. Testing
The testing phase ensured the
application was functional, reliable, and
met the specified requirements. Various
testing methods were employed:
- Unit testing to verify the functionality of
individual components.
- Integration testing to ensure different
modules worked seamlessly together.
- System testing to validate the
application as a whole.
- User acceptance testing (UAT) to gather
feedback from potential users.
- Performance testing to ensure the
application could handle concurrent users
and large datasets without significant
delays.
6. Maintenance
The maintenance phase involves
ongoing support and updates to the
application post-deployment. This
includes:
- Monitoring the application for any
issues or bugs reported by users.
- Releasing patches and updates to fix
bugs and improve performance.
- Enhancing the application based on
user feedback and evolving requirements,
such as adding new features like multi-day
weather forecasts.
- Ensuring compatibility with API
updates from OpenWeatherMap and other
third-party services.
- Regularly updating the database
schema and optimising queries to
maintain performance and scalability.
Project Details
Database Design
sql
CREATE DATABASE weather_forecast;
USE weather_forecast;
# Constants
API_KEY = "your_openweathermap_api_key"
BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
# Database connection
conn = mysql.connector.connect(
host="localhost",
user="root",
password="your_mysql_password",
database="weather_forecast"
)
c = conn.cursor()
class WeatherApp:
def __init__(self, root):
self.root = root
self.root.title("Weather Forecast Application")
self.create_widgets()
def create_widgets(self):
self.frame = tk.Frame(self.root)
self.frame.pack(padx=10, pady=10)
def get_weather(self):
city = self.entry_city.get()
if not city:
message box.show error("Error", "Please enter a
city name")
return
params = {
"q": city,
"appid": API_KEY,
"units": "metric"
}
def main():
root = tk.Tk()
app = WeatherApp(root)
root.mainloop()
if __name__ == "__main__":
main()