Professional Documents
Culture Documents
Team members
NAME REG NO
P Manoj 16MIS0155
V.VAMSI 16MIS0170
A.V 16MIS0324
NAGARJUNA
HARISH M 16MIS0087
Submitted to,
Prof Rama Prabha kp
Introduction :-
As of the course title is concerned as process and tools ,we were going to
develop the application/interface with the help of the tool called NETBEANS
where we can build the java applications in a easy manner ,maintain them ,we
can connect to the back end say SQL and even we can test our entire project.
WEATHER FORCASTING
The title it self says that it is something that belongs to the weather.
As mentioned ,in this project we are going to forecaste the weather conditions
of the various areas.
Abstract :-
In this we develop and interface of weather forecasting with a back end that
supports the data entry.
We can input the city name and the preferred day to know the weather details
as a input
Output of this can be various weather aspects like fogg,mist ,temperature etc of
the weather forecasting .
SAMPLE DATA FLOW DIAGRAM
1.General description :-
This section describes the system being developed with respect to the main
features of its functionality as well as the intended user characteristics
Client Program: Client Program represents a web service client that requests
data. Initially, we anticipate the client to be the descriptive statistics system .
This actor provides the necessary input to initiate a request for historical
weather data or a list of weather stations.
Local Database: Local Database stores historical weather data that was
retrieved recently from the historical weather data source. The intent is to
reduce the workload on the historical weather source by keeping data that we
have acquired.
Weather Data Source: This actor provides weather data to the system if the
requested data are not stored in the local database.
Product Features
The weather data tool will be vital to the analysis of climate data; it will provide
access historical weather data necessary to perform statistical and trend
analysis. In order for the tool to access these data, it must also keep knowledge
of what weather stations are available for querying. The tool will also maintain
a local database which is intended to reduce the number of requests to the
historical weather data sources. When data is returned from sources such as
NOAA it will be stored in the local database; in the event that another user
requests the same data the tool can obtain the data from the local database.The
system administrator will also have access to an activity log to monitor system
activity and the completion/incompletion of tasks.
1.2.1. Use Case Description
A use case describes the interactions between the actors and the system. This
subsection describes the use cases for this system.
Precondition: The system is idle and waiting for a request from the Client
Program.
Trigger condition: The Client Program makes a historical weather data request
specifying weather station(s), data type(s), and time range.
Steps:
1. The system verifies that the request contains all necessary parameters,
which include a non-empty weather stations list, a non-empty set of
instrument data types for each weather station, and time range
2. The system creates a database search query using parameters provided in
the request and queries the local database for the requested data.
3. The local database returns the requested data
4. The system processes data into a formatted file.
5. The system returns the formatted file to the Client Program.
6. End of use case.
Steps:
4.2.1Weather Station
1.Each weather station shall have a unique ID and a unique location, which is
specified by longitude and latitude.
2.Each weather station shall have a set of instruments that collect weather data.
4.2.2 Weather Data
Weather data is recorded for a weather station at a given time.
1.The types of instruments possible for a weather station shall include those
that measure temperature in C, relative humidity, wind speed in mph, wind
direction, precipitation, weather condition visibility in km.
2.A weather data element shall be identified by a weather station, a date and
time, and the data value for an instrument on the weather station at that time.
4.4 Stimulus
Transitions between the states of the system are often initiated by a stimulus.
State transition diagram that that motivates the requirements described in this
section can be found in Appendix B.
1.When the system receives a request from the Client Program, the system shall
verify that the request is either for a list of weather stations or for a table of
historic weather data.
4.5 Functional
No further functional requirements have been identified.
5.1.1Security
1.The server system shall require the Administrator to login.
2.The system shall be delivered with a default sys admin.
3.The system shall require the system admin to change password on first
login.
5.2.2 Maintainability
The parts of the system coded in JAVA be coded using NETBEANS.
5.2.3 Portability
The user interface shall run on Microsoft Internet Explorer 8.0, Mozilla
Firefox 3.5, Google Chrome 3.0, and Apple Safari 4.0.
6.1 Database
1.The system shall store the weather data in the CEON Weather Database
managed by MYSQL.
2. The system shall not store duplicate set of data into the database.
3.The database schema shall be based on the existing database schema,
presented in netbeans Operations
No operations requirements have been identified.
Log Error
when: Data found/ Return data to the query source and store data in database
Local
Historical Time Range
List of Weather Stations Weather Weather Station(s)
Data Type(s)
Database
Historical Weather Data Query
Error Message
Retrieved Weather Data
Acquire List of Weather Station List
Station ID, State, Location,
Weather Statistical Package
Longitude, Latitude, or Priority List
Stations
Error Message
Request(report)
acknowledge
reportWeather()
acknowledge
get(summary)
summarize()
send(report)
acknowledge
reply(report)
acknowledge
Class diagram
Implementation:
Code :
/*
*/
package jdbc_connectivity;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
/**
*/
/**
*/
public jdbc() {
initComponents();
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
*/
@SuppressWarnings("unchecked")
jTable1.setModel(new javax.swing.table.DefaultTableModel(
},
new String [] {
));
jScrollPane1.setViewportView(jTable1);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
getContentPane().add(jLabel1);
jLabel2.setText("COUNTRY");
getContentPane().add(jLabel2);
jLabel3.setText("TEMPERATURE");
getContentPane().add(jLabel3);
jLabel4.setText("HUMIDITY");
getContentPane().add(jLabel4);
jLabel5.setText("WIND");
getContentPane().add(jLabel5);
getContentPane().add(jTextField2);
getContentPane().add(jTextField3);
jTextField4.addActionListener(new java.awt.event.ActionListener() {
jTextField4ActionPerformed(evt);
});
getContentPane().add(jTextField4);
getContentPane().add(jTextField5);
getContentPane().add(jTextField6);
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
getContentPane().add(jButton1);
jLabel7.setText("PRESSURE");
getContentPane().add(jLabel7);
getContentPane().add(jTextField1);
getContentPane().add(jTextField7);
getContentPane().add(jTextField8);
getContentPane().add(jLabel6);
jLabel8.setText("jLabel8");
getContentPane().add(jLabel8);
pack();
}// </editor-fold>
String un=jTextField1.getText();
String bn=jTextField8.getText();
Connection conn=null;
PreparedStatement pstmt=null;
ResultSet rs=null;
try{
Class.forName("com.mysql.jdbc.Driver");
conn=DriverManager.getConnection("jdbc:mysql:///weather_report","root","");
pstmt.setString(1,un);
rs=pstmt.executeQuery();
while(rs.next()){
jTextField2.setText(rs.getString("country"));
jTextField3.setText(rs.getString("temp"));
jTextField4.setText(rs.getString("humidity"));
jTextField5.setText(rs.getString("wind"));
jTextField6.setText(rs.getString("pressure"));
jTextField7.setText(rs.getString("climate"));
catch(Exception u){
JOptionPane.showMessageDialog(null , u);
JOptionPane.showMessageDialog(null , i);
finally{
try{
conn.close();
pstmt.close();
rs.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null ,i);
/**
*/
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
*/
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(jdbc.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(jdbc.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(jdbc.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(jdbc.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
new jdbc().setVisible(true);
});
Output:
Test cases that we have generated:
Here we will be tsting our java project using the tools called as the JUNIT
testing tool .where the test cases will be generated for each and every module
and execustion will be done accordingly .
We have the code such that it fails for the main class
Then we have written the code for the test case to pass the given scenario
Therefore the test cases have been generated for each module and have tested
accordingly with the pass case and the fail case
Method of development :
Here as of in the view of the simple project we have selected the development
style of water fall model .
Since our is a small scale project and our requirements were well defined by the
client so that we can choose the development style of water fall model .
Process stimulation:
Whenever we were doing the project in the large scale a brief outline should be
present in order to develop in an effective manner.
how the process flow will be happening from one module to the other module
were explained in a neat manner .
Conclusion:-
Therefore ,the neat explanation of the project weather forecasting was done with
the necessary class diagrams ,sequence diagrams ,with neat implementation
along with the generation of the test cases with the process stimulation was
made in a neat manner .
THANK YOU