Vehicle Reservation system

download Vehicle Reservation system

of 30

Embed Size (px)

Transcript of Vehicle Reservation system

  • 7/26/2019 Vehicle Reservation system

    1/30

    Student First name : Geerthana

    Student last name : Bhasgaran

    Student No : 2014225Date of submission :7/17/2015

    Department of computing

    Module Leader: Mr.Guganathan Poravi

    Car Pool Reservation

    nformatics nstitute

    of Technology

  • 7/26/2019 Vehicle Reservation system

    2/30

    2

    Content

    Introduction ..04

    Analysis

    I. Functional Requirements .......................05

    II. Non-functional Requirements 06

    Designing

    I. Use case diagram 07

    II.

    Activity diagram for functional requirement 08

    III.

    Class diagram 14

    Implementation

    I.

    User login ..15

    II. Add member (some as the add employee and vehicle) 16

    III.

    Search member (some as the employee) ..17

    IV. View vehicle 18

    V. Reservation .18

    Screenshots . 19

    Evaluation

    I.

    Black box Testing 26

    II. White box Testing . 29

  • 7/26/2019 Vehicle Reservation system

    3/30

  • 7/26/2019 Vehicle Reservation system

    4/30

    4

    Introduction

    This system is developed for reserve the vehicle for Car Pool Reservation firm which

    located in the Colombo. And it covers Western Province of Sri Lanka, works as the

    meeting point to the people who willing to share their vehicle to work and home.

    Main features of this system are to reserve the car for the people who need, and view

    the details of the reservation. Functionality of this system is adding vehicle by the

    owner, reserve the vehicle, add employee details, add member details, search customerdetails, view vehicle details, view driver details etc. Purpose of this system is to make

    automation of the Car Pool Reservation systems functionality.

  • 7/26/2019 Vehicle Reservation system

    5/30

    5

    Analysis

    Functional Requirements

    Reservation

    1. The System must allow the customer to register for reservation.

    2. The system shall allow the customer to view detail description of vehicle, driver,

    and reservation.

    3. The system must view list of available vehicles during reservation

    4. The system shall allow the employee and customer to view reservations made by

    customers.

    5.

    The system must be able to provide a unique reservation conformation number

    for all successful committed reservations.

    6. The system must be able to display reservation summary for successfully

    committed reservation.

    Login

    1. The system should allow staff and customers login to the system using their

    username and password.

    2.

    The system should allow staff to login to the system using their username andpassword and also already register customers are using their username and

    password.

    3. The system shall allow the members reserve the vehicle and change member

    details.

    4. The system shall allow the change vehicle details and employee details.

    Vehicle

    1. The system should allow staff and customers(vehicle owner) register new

    vehicles.

    2. The system shall allow staff and customers to select vehicles.

    3. Adding details of a vehicles

    o Vehicle no

    o Vehicle name

    o Vehicle model

    o Carrying capacity

    o Engine capacity

    o Colour of vehicle

  • 7/26/2019 Vehicle Reservation system

    6/30

  • 7/26/2019 Vehicle Reservation system

    7/30

    7

    DesigningUser case diagram

    Figure 1.1 use case diagram Figure

    Login

    Rent Registration

    Reserve vehicle

    Vehicle

    Registration

    Search VehicleUpdate vehicle

    View Vehicle

    Update Rent

    View Driver

    DriverRegistration

    Logout

    View Reservation

    Update driver

    Employee

    Registration

    Update Employee

    Admin

    Member

    Car Pool Reservation

  • 7/26/2019 Vehicle Reservation system

    8/30

    8

    Analysis Model

    Activity diagram

    Activity diagram - login

    Figure 2.1 activity diagram for login figure

    Login

    Enters Username & Password

    Checks Username, Password

    If input is

    invalid

    If input is

    valid

    Logged in to System

  • 7/26/2019 Vehicle Reservation system

    9/30

    9

    Activity diagram Reserve a vehicle

    Figure 2.2 activity diagram for reserve a vehicle figure

    RegistrationRese

    informationCustomers Enter

    StatusName, ID, Phone Number, Vehicle No,

    input is

    Empty

    input is not

    Empty

    vehicleCheck

    Available not

    Available

    SuccessReserv

    ation Success

    detailShow

    confirmation Number

  • 7/26/2019 Vehicle Reservation system

    10/30

    10

    Activity diagram - vehicle registration

    Figure 2.3 activity diagram for vehicle registration figure

    Vehicle Registration

    Customers or Employees

    Enter vehicle information

    Plate No, Model, Type, Engine Capacity, Insurance date,

    Insurance Ex -date

    If input is

    Empty

    If input is

    not Empty

    Check Plate No

    If

    Available

    If not

    Available

    Vehicle Registered Success

  • 7/26/2019 Vehicle Reservation system

    11/30

  • 7/26/2019 Vehicle Reservation system

    12/30

    12

    Activity diagram Search vehicle

    Figure 2.5 activity diagram for search vehicle figure

    Vehicle Registration

    Customers or Employees

    selects

    Select Plate No

    If Not Selected or

    Invalid Plate NoIf Selected or

    Valid Plate No

    Searches from Database

    Displays Vehicle

  • 7/26/2019 Vehicle Reservation system

    13/30

  • 7/26/2019 Vehicle Reservation system

    14/30

  • 7/26/2019 Vehicle Reservation system

    15/30

    15

    Implementation

    User Login

    publicvoidshowData(){String str1 = usernametxt.getText();char[] p = passwordtxt.getpassword();String str2 = newString (p);try{

    Class.forName("com.mysql.jdbc.Driver");Connection con;con =

    (Connection)DriverManager.getConnection("jdbc:mysql://localhost/car","root","root");

    PreparedStatement ps = con.prepareStatement("select name fromemployee where UserName =? and Password =?");

    ps.setString(1, str1);ps.setString(2, str2);ResultSet rs = ps.executeQuery();if(rs.next()){

    JOptionPane.showMessageDialog(null,"Login successfully! ...");

    }else{JOptionPane.showMessageDialog(null, "Incorrect username or

    password .. Try Again with correct detail");}

    }catch(Exception ex){

    System.out.println(ex);}

    }publicvoidshowDatamember(){

    String str1 = usernametxt.getText();char[] p = passwordtxt.getpassword();String str2 = newString (p);try{

    Class.forName("com.mysql.jdbc.Driver");Connection con;con =

    (Connection)DriverManager.getConnection("jdbc:mysql://localhost/car","root","root");

    PreparedStatement ps = con.prepareStatement("select name frommember where UserName =? and Password =?");

    ps.setString(1, str1);ps.setString(2, str2);ResultSet rs = ps.executeQuery();if(rs.next()){

    JOptionPane.showMessageDialog(null,"Login successfully! ...");

    }else{JOptionPane.showMessageDialog(null, "Incorrect username or

    password .. Try Again with correct detail");}

    }catch(Exception ex){

  • 7/26/2019 Vehicle Reservation system

    16/30

    16

    System.out.println(ex);}

    }

    Add Member

    publicstaticintaddMember(Members m)throwsClassNotFountException, SQlException{Connection con = ConnectionDB();String quary = "INSERT INTO member values('"+ m.getMemberId() +

    "','"+ m.getMemberName() + "','"+ m.getUsername() + "','"+ m.Password() + "','"+ m.getEmail() + "','"+ Integer.parseInt(m.getPhoneNo())+ "')";

    intres = DBHandler.setData(con, quary);returnres;

    }

    privatevoidaddBtnActionPerformer(java.awt.event.ActionEvent evt){

    if(!memberIdTxt.getText().isEmpty() &&!mbnametxt.getText().isEmpty()&&!mbusernametxt.getText().isEmpty()

    &&!mbpasswordtxt.getText().isEmpty()&&!mbMobileNoTxt.getText().isEmpty() &&!mbEmailtxt.getText().isEmpty() &&

    !addressTxtArea.getText().isEmpty()){String memberId = memberIdTxt.getText();String memberName = mbnametxt.getText();String memberUserName = mbusernametxt.getText();String memberPassword = mbpasswordtxt.getText();String teleNo = mbMobileNoTxt.getText();String email = mbEmailtxt.getText();String address = addressTxtArea.getText();

    Members m = newMembers(memberId, memberName, memberUserName,memberPassword, teleNo , email, address);

    try{inti = memberController.addMember(m);if(i == 1){

    memberIdTxt.setText("");mbnametxt.setText("");mbusernametxt.setText("");mbpasswordtxt.setText("");mbMobileNoTxt.setText("");mbEmailtxt.setText("");addressTxtArea.setText("");JOptionPane.showMessageDialog(rootPane, "Added

    Successfully :)!");}

    }catch(ClassNotFoundException | SQLException ex ){

    Logger.getLogger(Memberview.class.getName()).log(Level.SEVERE,null, ex);}nextIDgenForMember();

    }else{JOptionPane.showMessageDialog(rootPane, "Please fill all

    fields !");}

    }

  • 7/26/2019 Vehicle Reservation system

    17/30

  • 7/26/2019 Vehicle Reservation system

    18/30

    18

    View vehiclepublicvoidgetToDetailsTable(){

    newOrderDetailsTable.setRowCount(0);try{

    ArrayList al = newArrayList();

    al = vehicleController.viewAllvehicle();for(inti = 0 ; i

  • 7/26/2019 Vehicle Reservation system

    19/30

    19

    Screen shot

    Login Page (Main menu)

    Figure 4.1 Screen shot for Main menu(Login page)

  • 7/26/2019 Vehicle Reservation system

    20/30

    20

    Add Member

    Figure 4.2 Screen shot for add member Page

  • 7/26/2019 Vehicle Reservation system

    21/30

    21

    Add Vehicle

    Figure 4.3 Screen shot for add vehicle

  • 7/26/2019 Vehicle Reservation system

    22/30

    22

    View Vehicle

    Figure 4.4 Screen shot for view vehicle page

  • 7/26/2019 Vehicle Reservation system

    23/30

  • 7/26/2019 Vehicle Reservation system

    24/30

    24

    Figure 4.5 Screen shot for Reservation page

  • 7/26/2019 Vehicle Reservation system

    25/30

  • 7/26/2019 Vehicle Reservation system

    26/30

    26

    Evaluation

    Black-Box Testing

    Add a new Members

    No Input Expect

    Output

    Actual

    Output

    Bug?

    1 Member Name :

    John

    Stores the

    member name

    Stores the

    member name

    No

    2 Member Name :

    1234

    Invalid Stores the

    member name

    Yes

    3 Username : John Stores the

    member

    username

    Stores the

    member

    username

    No

    4 Username :

    1234

    Invalid Stores the

    member

    username

    yes

    5 Password: john Stores the

    member

    password

    Stores the

    member

    password

    No

    6 Password : 1234 Stores the

    member

    password

    Stores the

    member

    password

    No

    7 Email :

    [email protected]

    Stores the

    member email

    Stores the

    member email

    No

    8 Email : 1434234 Invalid Stores themember email

    yes

    9 Email : jijdjfgfh Invalid Stores the

    member email

    yes

    10 Phone No :

    0777234645

    Stores the

    member phone

    no

    Stores the

    member phone

    no

    No

    11 Phone No :

    gjskjeod

    Invalid Invalid No

    12 Address :

    Colombo

    Stores the

    memberaddress

    Stores the

    memberaddress

    No

    13 Address :

    2453435

    Stores the

    member

    address

    Stores the

    member

    address

    No

  • 7/26/2019 Vehicle Reservation system

    27/30

    27

    Add a new employee

    No Input Expect

    Output

    Actual

    Output

    Bug?

    1 Employee Name

    : John

    Stores the

    employee name

    Stores the

    employee name

    No

    2 Employee Name

    : 1234

    Invalid Stores the

    employee name

    Yes

    3 Username : John Stores the

    employee

    username

    Stores the

    employee

    username

    No

    4 Username :1234

    Invalid Stores theemployee

    username

    yes

    5 Password: john Stores the

    employee

    password

    Stores the

    employee

    password

    No

    6 Password : 1234 Stores the

    employee

    password

    Stores the

    employee

    password

    No

    7 Email :

    [email protected]

    Stores the

    employee email

    Stores the

    employee email

    No

    8 Email : 1434234 Invalid Stores the

    employee email

    yes

    9 Email : jijdjfgfh Invalid Stores the

    employee email

    yes

    10 Phone No :

    0777234645

    Stores the

    employee

    phone no

    Stores the

    employee

    phone no

    No

    11 Phone No :

    gjskjeod

    Invalid Invalid No

    12 Address :

    Colombo

    Stores the

    employeeaddress

    Stores the

    employeeaddress

    No

    13 Address :

    2453435

    Stores the

    employee

    address

    Stores the

    employee

    address

    No

  • 7/26/2019 Vehicle Reservation system

    28/30

  • 7/26/2019 Vehicle Reservation system

    29/30

  • 7/26/2019 Vehicle Reservation system

    30/30