Oops Project
Oops Project
Oops Project
DEPARTMENT OF CSE-A.I.M.L
AN REPORT
ON
MINOR PROJECT
APPROVED BY:-
Dr. AK Sachan
Principal
APPROVED BY:-
Dr. AK Sachan
Principal
We would like to extend our special thanks to Dr. Megha Kamble, (Head of the
Department, CSE AIML) for her continued support and for creating an
environment that fosters learning and research. Additionally, we are deeply
grateful to our respected subject teacher, Lastly, we want to acknowledge the
unwavering support and understanding of our families, who stood by us during
this challenging endeavour. Their encouragement and belief in us were our
constant motivation. This project would not have been possible without their
collective support, and for that, we are truly thankful.
Lastly I would also like to thank my friends who helped me a lot in finalizing
this project within the limited time frame.
MUSKAN VERMA
KUNDAN SINGH
HIMANSHU SAKALLE
ABSTRACT
Nowadays we face a huge problem that knowing real weather status instantly
in such a place we need to know.it is often complex and challenging skill that
involves observing and processing vast amount of data Weather systems can
range from small, short lived thunderstorms only a few miles in diameter that
last a couple of hours to large scale rain and wind up to a thousand miles in a
diameter, and lasting for days. So most of the time we cannot get the real
weather forecast and face a lot of troubles. We have another problem in
weather forecasting. To do this effectively technology can help a lot. In this
android app is developed with the help of Android Studio and API we will help
the user to get to know about real-time weather updates of a particular place.
The main aim of this project “WEATHER APP” is to provide knowledge about
the real-time weather updates of a particular place.
S.NO. CONTENTS PAGE NO.
1. DESCRIPTION 07
4. OUTPUT 24-26
DESCRIPTION
Our WEATHER APP provides the real-time weather updates of different locations .
The interface of ours comes with the facility that help us to find the weather updates
of a particular place . First feature of its allow us to enter the location whose weather
updates we want . After the location is enter it shows the temperature , description ,
humidity and wind-speed of that particular location. And the next feature change the
image of weather as per the description .
The last feature of it shows in any case if we enter some wrong location it will
immediately display the image with location not found .
“WEATHER APP”
This proposed system provides the weather of different cities
around the world and the user can view weather for which they
search for. The system can track Local and National Weather .
PROJECT CATEGORY: Language used in this project are HTML, CSS and
JAVASCRIPT.
HTML
HyperText Markup Language(HTML) is the most basic building block of the Web. It
defines the meaning and structure of web content. Other technologies besides HTML
are generally used to describe a web page's appearance/presentation (CSS) or
functionality/behavior (Javascript).
"Hypertext" refers to links that connect web pages to one another, either within a
single website or between websites. Links are a fundamental aspect of the Web. By
uploading content to the Internet and linking it to pages created by other people, you
become an active participant in the World Wide Web.
HTML uses "markup" to annotate text, images, and other content for display in a
Web browser.
You can write HTML using annotations called tags. Tags give HTML a structure and
make it easy for humans and browsers to read the document efficiently. They also
enable a browser to apply CSS (Cascaded StyleSheets) to the digital document,
making it a powerful visual combination.
While HTML comes with 100s of tags inbuilt, only a handful of them that a developer
needs to learn for everyday use. Of course, all tags hold value; most of them don’t
find usage in normal development.
2. Semantic Structure
HTML5 defines unique tags to annotate different elements for their specific purposes.
The <article> tag, for example, is used to annotate content on a page. The <aside> tag
represents some content that is indirectly related to the document’s primary content.
Other noteworthy elements are <header>, <footer>, <div>, the paragraph
tag <p>, and the one most used for navigation between pages, the <a> tag.
SEO is by far the biggest USP (Unique Selling Point) of HTML5. With the advent of
search engines like Google, Yahoo!, DuckDuckGo etc., you have so much information
literally at your fingertips. These search engines accumulate information on the
World Wide Web using computer programs that crawl the internet (also called web
crawlers) and map keywords with respective documents in which they find it. These
web crawlers can assimilate this data only because HTML is well structured, and you
can optimise your web pages for searchability.
To highlight SEO, let me bring to your attention that this page is also SEO optimised
and should appear for the search query “Top features of HTML”. You can even make
use of the semantic structure of HTML for Search Engines using tags
like <title>, <meta> with description, <header> etc., to let the web crawler know
about the critical keywords in the document.
IndexedDB takes client-side storage a step beyond what localStorage does. While you
could potentially store a lot of data with localStorage in a key-value form where both
are strings, you can store more complex and significant data in the key-value form
using IndexedDB. The key is a string, and the value to be stored is a native JavaScript
object. Oh, and this object will persist through the IndexedDB until someone explicitly
removes it.
IndexedDB enables the web application to store data on the client-side, i.e. the
browser, and allows your web application to continue functioning even with flaky or a
dropped internet connection. Let us talk more about this in the next feature.
Imagine if you could build a web application that works even when the user’s internet
is down. Well, you don’t have to imagine because, with the advent of Service
Workers, IndexedDB and Cache API, you could very well make this a reality. Your web
application could offer a native-like experience to your users. Many applications
like Flipkart already do this, and it’s called a PWA (Progressive Web Application).
Service Workers act as a proxy between the user’s machine and the internet. They
can store files locally and fetch them when needed via the Cache API and can also
bring information from the IndexedDB to provide the application with data. So, when
there’s no internet on a user’s device, the Service Worker intercepts these requests
and serves them from the locally stored data. You can configure your service worker
to update these files periodically or on-demand.
You can use HTML5 to build some simple games; however, if you’re looking to make a
good video game, you can utilise the <canvas> element along with CSS and
JavaScript. Canvas enables you to build 2D and 3D games. You can make these games
as interactive as you’d like.
7. Platform Independent
HTML runs on a browser, and you can find a browser on almost any device with a
simple Operating System. If you had used mobile phones before smartphones were a
thing, you would know that even old Nokia phones that ran Symbian OS could open
HTML pages.
8. Media Support
HTML can display images, video and audio; therefore, it enjoys excellent media-
running capabilities. HTML5 came up with <video> and <audio> tags making this a lot
easier than before. Of course, with HTML5, you can go beyond just playing media;
you can specify controls, images for buttons and even control the playback
programmatically.
CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing
the presentation of a document written in a markup language such
as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a
cornerstone technology of the World Wide Web, alongside HTML and Javascript.
Separation of formatting and content also makes it feasible to present the same
markup page in different styles for different rendering methods, such as on-screen, in
print, by voice (via speech-based browser or screen reader ), and on Braille
based tactile devices. CSS also has rules for alternate formatting if the content is
accessed on a mobile devices.
More code means slower page speed. And CSS enables you to use less code. CSS
allows you to use one CSS rule and apply it to all occurrences of a certain tag within
an HTML document.
CSS not only makes web pages easy on the eye, it also allows for user-friendly
formatting. When buttons and text are in logical places and well organized, user
experience improves.
With CSS, you can apply specific formatting rules and styles to multiple pages with
one string of code. One cascading style sheet can be replicated across several website
pages. If, for instance, you have product pages that should all have the same
formatting, look, and feel, writing CSS rules for one page will suffice for all pages of
that same type.
4) Easy Formatting Changes
If you need to change the format of a specific set of pages, it’s easy to do so with CSS.
There’s no need to fix every individual page. Just edit the corresponding CSS
stylesheet and you’ll see changes applied to all the pages that are using that style
sheet.
Responsive web design matters. In today’s day and age, web pages must be fully
visible and easily navigable on all devices. Whether mobile or tablet, desktop, or even
smart TV, CSS combines with HTML to make responsive design possible
JAVASCRIPT
Dynamic Typing
Functional Style
Platform Independent
Prototype-based
Interpreted Language
Single-threaded
Async Processing
Web Workers
Client-Side Validation
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather App </title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="header">
<div class="search-box">
<input type="text" placeholder="Enter your location" class="input-box">
<div class="location-not-found">
<h1>Sorry, Location not found!!!</h1>
<img src="/images/ 404.png" alt="404 Error">
</div>
<div class="weather-body">
<img src="/images/cloud.png" alt="Weather Image" class="weather-img">
<div class="weather-box">
<p class="temperature">0 <sup>°C</sup></p>
<p class="description">light rain</p>
</div>
<div class="weather-details">
<div class="humidity">
<i class="fa-sharp fa-solid fa-droplet"></i>
<div class="text">
<span id="humidity">45%</span>
<p>Humidity</p>
</div>
</div>
<div class="wind">
<i class="fa-solid fa-wind"></i>
<div class="text">
<span id="wind-speed">12Km/H</span>
<p>Wind Speed</p>
</div>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
<script src=" https://kit.fontawesome.com/788ac56b09.js "
crossorigin="anonymous"></script>
</body>
</html>
JAVASCRIPT
console.log("run");
location_not_found.style.display = "none";
weather_body.style.display = "flex";
temperature.innerHTML = `${Math.round(weather_data.main.temp - 273.15)}°C`;
description.innerHTML = `${weather_data.weather[0].description}`;
humidity.innerHTML = `${weather_data.main.humidity}%`;
wind_speed.innerHTML = `${weather_data.wind.speed}Km/H`;
switch(weather_data.weather[0].main){
case 'Clouds':
weather_img.src = "/images/cloud.png";
break;
case 'Clear':
weather_img.src = "/images/clear.png";
break;
case 'Rain':
weather_img.src = "/images/rain.png";
break;
case 'Mist':
weather_img.src = "/images/mist.png";
break;
case 'Snow':
weather_img.src = "/images/snow.png";
break;
console.log(weather_data);
}
searchBtn.addEventListener('click', ()=>{
checkWeather(inputBox.value);
});
CSS
*{
margin: 0;
padding: 0;
box-sizing: border-box;
border: none;
outline: none;
font-family: sans-serif;
}
body{
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #000;
}
.container{
width: 400px;
height: min-content;
background-color: #fff;
border-radius: 12px;
padding: 28px;
}
.search-box{
width: 100%;
height: min-content;
display: flex;
justify-content: space-between;
align-items: center;
}
.search-box input{
width: 84%;
font-size: 20px;
text-transform: capitalize;
color: #000;
background-color: #e6f5fb;
padding: 12px 16px;
border-radius: 14px;
}
.search-box input::placeholder{
color: #000;
}
.search-box button{
width: 46px;
height: 46px;
background-color: #e6f5fb;
border-radius: 50%;
cursor: pointer;
font-size: 20px;
}
.search-box button:hover{
color: #fff;
background-color: #ababab;
}
.weather-body{
justify-content: center;
align-items: center;
flex-direction: column;
margin-block: 20px;
display: none;
}
.weather-body img{
width: 60%;
}
.weather-box{
margin-block: 20px;
text-align: center;
}
.weather-box .temperature{
font-size: 40px;
font-weight: 800;
position: relative;
}
.weather-box .description{
font-size: 20px;
font-weight: 700;
text-transform: capitalize;
}
.weather-details{
width: 100%;
display: flex;
justify-content: space-between;
margin-top: 30px;
}
.humidity, .wind{
display: flex;
align-items: center;
}
.humidity{
margin-left: 20px;
}
.wind{
margin-right: 20px;
}
.weather-details i{
font-size: 36px;
}
.weather-details .text{
margin-left: 10px;
font-size: 16px;
}
.text span{
font-size: 20px;
font-weight: 700;
}
.location-not-found{
margin-top: 20px;
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
}
.location-not-found h1{
font-size: 20px;
color: #6b6b6b;
margin-block-end: 15px;
}
.location-not-found img{
width: 80%;
}
OUTPUT
(1)
(2)
(3)
(4)
(5)
IN CASE WE ENTER WRONG LOCATION: