Post on 03-Jun-2018
8/12/2019 EX 7 & EX 8
1/31
AIM: To draw the diagrams[use case, activity,class, sequence, collaboration, state
chart,component,deployment ] for the E-tickreting system and to implement in VB.
PROBLEM STATEMENTE-Ticketing system is used in the effective process of booking the tickets to all of the
customers. This system adopts a comprehensive approach to minimize the manual work andschedule resources, time in a cogent manner. The core of the system is to get the onlinereservation form (with details such as name, address, age, etc...)filled by the customers whoserequirements are being verified by e-ticketing system with respect to the already existinginformation in the database. This forms the first and foremost step in the reservation of therequired ticket. If so the tickets are available then the tickets are booked and its been mailedto customers e -mail address and also money will be automatically will be paid via e-
banking, if not then he/she can log out. In the situation like if the customers have to cancelthe ticket then money will be refunded to their respective bank accounts. After all thenecessary criteria have been met, then the information is added to the database and this
process is carried out.
EX.NO:7
DATE:
E TICKETING
8/12/2019 EX 7 & EX 8
2/31
USECASE DIAGRAM
8/12/2019 EX 7 & EX 8
3/31
CLASS DIAGRAM
8/12/2019 EX 7 & EX 8
4/31
ACTIVITY DIAGRAM
8/12/2019 EX 7 & EX 8
5/31
Login sequence diagram
Collaboration diagram
8/12/2019 EX 7 & EX 8
6/31
Reserve Tickets sequence diagram
Collaboration diagram
8/12/2019 EX 7 & EX 8
7/31
Schedule sequence diagram
Collaboration diagram
8/12/2019 EX 7 & EX 8
8/31
Payment sequence diagram
Collaboration diagram
8/12/2019 EX 7 & EX 8
9/31
STATE CHART DIAGRAM
Component Diagram
Enter IDand Name
Viewschedule
ConfirmTickets
Fill TheReservation form
Check Available
CommitTransactions
PrintTickets
8/12/2019 EX 7 & EX 8
10/31
Coding
#include "Bank.h"//##ModelId=4D79B0BB02EEBank::Check(){}//##ModelId=4D79B0C0036BBank::Transaction(){}#include "Cancelation.h"//##ModelId=4D79B01A03A9Cancelation::Cancel(){}#include "Login Form.h"//##ModelId=4D79ADCC038ALogin Form::Check(){}#include "Passenger1.h"//##ModelId=4D79ADAA030DPassenger1::Enter(){}
#include "Payment.h"//##ModelId=4D79B06C007DPayment::Verify(){}//##ModelId=4D79B54103C8Payment::Update(){}#include "Printer.h"//##ModelId=4D79B0D7006D
Printer::Print(){}#include "Reservation Form.h"//##ModelId=4D79AE87004EReservation Form::Check Availability(){}//##ModelId=4D79AEA503A9Reservation Form::Pay(){}//##ModelId=4D79AEA800BBeservation Form::Reserve()
8/12/2019 EX 7 & EX 8
11/31
{}//##ModelId=4D79AEAB02BFReservation Form::Update(){
}#include "View Schedule.h"//##ModelId=4D79AE2C03C8View Schedule::Display(){}//##ModelId=4D79AE320128View Schedule::Reserve(){}#endif /* DATABASE1_H_HEADER_INCLUDED_B2863D2D */#ifndef LOGIN_FORM_H_HEADER_INCLUDED_B2862C09#define LOGIN_FORM_H_HEADER_INCLUDED_B2862C09//##ModelId=4D79ADB40000class Login Form{ public:
//##ModelId=4D79ADCC038ACheck();
private://##ModelId=4D79ADC00119User ID;//##ModelId=4D79ADC60242Password;
};
#endif /* PRINTER_H_HEADER_INCLUDED_B286551C */#ifndef RESERVATION_FORM_H_HEADER_INCLUDED_B2865FBB#define RESERVATION_FORM_H_HEADER_INCLUDED_B2865FBB//##ModelId=4D79AE3900CBclass Reservation Form{
public://##ModelId=4D79AE87004ECheck Availability();//##ModelId=4D79AEA503A9Pay();//##ModelId=4D79AEA800BBReserve();//##ModelId=4D79AEAB02BFUpdate();
private://##ModelId=4D79AE450251
Date & time;//##ModelId=4D79AE5F0203
8/12/2019 EX 7 & EX 8
12/31
Address;//##ModelId=4D79AE6A0261
Name;//##ModelId=4D79AE6C0186Age;
//##ModelId=4D79AE6F0177Boarding Point;//##ModelId=4D79AE7700DADestination;//##ModelId=4D79AE7D036BAmount;//##ModelId=4D79AE800177Payment;
};#endif /* RESERVATION_FORM_H_HEADER_INCLUDED_B2865FBB */
VB CODING:
Form 1:
Coding:PublicClass Form1
PrivateSub Button1_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button1.Click
8/12/2019 EX 7 & EX 8
13/31
Form2 .Show()Me.Hide()
EndSub
PrivateSub Button2_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button2.ClickForm3 .Show()Me.Hide()
EndSub EndClass
Form 2:
Coding:Imports System.DataImports System.Data.OleDbImports System.Data.OleDb. OleDbCommand Imports System.Data.OleDb. OleDbConnection PublicClass Form2
Dim cd AsString Dimcn AsNewOleDbConnection ( "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Users\sakthi\Documents\Visual Studio 2010\Projects\e-ticket\et.mdb" )
PrivateSub Button1_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button1.ClickIf TextBox2.Text = "" Then MsgBox( "fill the all details" )
8/12/2019 EX 7 & EX 8
14/31
Else cn.Open()cd = "insert into table1 values('" & TextBox1.Text & "','" & TextBox2.Text & "','" &ComboBox1.Text & "','" & ComboBox2.Text & "','" & ComboBox3.Text & "','" & TextBox3.Text&"','" & ComboBox4.Text & "','" & TextBox4.Text & "')" Dim cm AsNewOleDbCommand(cd, cn)
cm.ExecuteNonQuery()cn.Close()MsgBox( "added successfully" )
EndIf
EndSub
PrivateSub Button2_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button2.Click
TextBox1.Text = "" TextBox2.Text = "" ComboBox1.Text = "" ComboBox2.Text = "" ComboBox3.Text = "" TextBox3.Text = "" ComboBox4.Text = "" TextBox4.Text = ""
EndSub
PrivateSub TextBox4_TextChanged( ByVal sender AsSystem. Object , ByVal eAsSystem. EventArgs ) Handles TextBox4.TextChanged
If ComboBox4.Text = "TRAIN" Then TextBox4.Text = Val(TextBox3.Text) * 300
ElseIf ComboBox4.Text = "BUS" Then
TextBox4.Text = Val(TextBox3.Text) * 500ElseIf ComboBox4.Text = "FLAIGHT"Then
TextBox4.Text = Val(TextBox3.Text) * 1000
EndIf EndSub
PrivateSub Button3_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button3.ClickForm4 .Show()Me.Hide()
EndSub EndClass
Form 3:
8/12/2019 EX 7 & EX 8
15/31
Coding:
Imports System.DataImports System.Data.OleDbImports System.Data.OleDb. OleDbCommand Imports System.Data.OleDb. OleDbConnection PublicClass Form3 Dim cd AsString Dimcn AsNewOleDbConnection ( "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\sakthi\Documents\Visual Studio 2010\Projects\e-ticket\et.mdb" )
PrivateSub Button3_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button3.Clickcn.Open()
cd = "select *from table1 where name='" & TextBox1.Text & "'" Dim cm AsNewOleDbCommand(cd, cn)Dimrset AsOleDbDataReader rset = cm.ExecuteReaderIf rset.Read Then
TextBox1.Text = rset.GetString(0)
TextBox2.Text = rset.GetString(1)ComboBox1.Text = rset.GetString(2)
ComboBox2.Text = rset.GetString(3)ComboBox3.Text = rset.GetString(4)TextBox3.Text = rset.GetString(5)ComboBox4.Text = rset.GetString(6)TextBox4.Text = rset.GetString(7)
cn.Close()
EndIf EndSub
8/12/2019 EX 7 & EX 8
16/31
PrivateSub Button4_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button4.Clickcn.Open()
cd = "delete from table1 where name ='" & TextBox1.Text & "'" Dim cm AsNewOleDbCommand(cd, cn)
Dimrset AsOleDbDataReader cm.ExecuteNonQuery()rset = cm.ExecuteReaderIf rset.Read Then
TextBox1.Text = rset.GetString(0)
TextBox2.Text = rset.GetString(1)ComboBox1.Text = rset.GetString(2)
ComboBox2.Text = rset.GetString(3)ComboBox3.Text = rset.GetString(4)TextBox3.Text = rset.GetString(5)ComboBox4.Text = rset.GetString(6)TextBox4.Text = rset.GetString(7)
cn.Close()TextBox1.Text = ""
TextBox2.Text = "" ComboBox1.Text = ""
ComboBox2.Text = "" ComboBox3.Text = "" TextBox3.Text = ""
ComboBox4.Text = "" TextBox4.Text = ""
EndIf
EndSub
PrivateSub Button1_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button1.Click
TextBox1.Text = ""
TextBox2.Text = "" ComboBox1.Text = ""
ComboBox2.Text = "" ComboBox3.Text = "" TextBox3.Text = "" ComboBox4.Text = "" TextBox4.Text = ""
EndSub
PrivateSub Button2_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button2.ClickMsgBox( "transaction cancelleed" )End
8/12/2019 EX 7 & EX 8
17/31
EndSub EndClass
Form 4:
Coding:PublicClass Form4
PrivateSub CheckBox1_CheckedChanged( ByVal sender AsSystem. Object , ByVal eAsSystem. EventArgs ) Handles CheckBox1.CheckedChanged
CheckBox1.Checked = True Form6 .Show()Me.Hide()EndSub
PrivateSub CheckBox2_CheckedChanged( ByVal sender AsSystem. Object , ByVal eAsSystem. EventArgs ) Handles CheckBox2.CheckedChanged
CheckBox2.Checked = True Form5 .Show()Me.Hide()
EndSub EndClass Form 5:
8/12/2019 EX 7 & EX 8
18/31
Coding:Imports System.DataImports System.Data.OleDbImports System.Data.OleDb. OleDbCommand Imports System.Data.OleDb. OleDbConnection PublicClass Form5
Dim cd AsString Dimcn AsNewOleDbConnection ( "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Users\sakthi\Documents\Visual Studio 2010\Projects\e-ticket\et.mdb" )PrivateSub TextBox3_TextChanged( ByVal sender AsSystem. Object , ByVal eAsSystem. EventArgs ) Handles TextBox3.TextChanged
EndSub
PrivateSub Button1_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button1.ClickIf TextBox2.Text = "" Then MsgBox( "fill the all details" )
Else cn.Open()cd = "insert into table2 values('" & TextBox1.Text & "','" & TextBox2.Text & "','" &TextBox3.Text & "')" Dim cm AsNewOleDbCommand(cd, cn)cm.ExecuteNonQuery()cn.Close()MsgBox( "transaction successfully completed" )Form1 .Show()
EndIf
EndSub
8/12/2019 EX 7 & EX 8
19/31
PrivateSub Button2_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button2.ClickMsgBox( "transaction cancelled" )End
EndSub
EndClass
Form 6:
Coding:Imports System.DataImports System.Data.OleDbImports System.Data.OleDb. OleDbCommand Imports System.Data.OleDb. OleDbConnection PublicClass Form6 Dim cd AsString Dimcn AsNewOleDbConnection ( "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\sakthi\Documents\Visual Studio 2010\Projects\e-ticket\et.mdb" )PrivateSub Button1_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button1.ClickIf TextBox2.Text = "" Then MsgBox( "fill the all details" )
Else cn.Open()cd = "insert into table3 values('" & TextBox1.Text & "','" & TextBox2.Text & "')" Dim cm AsNewOleDbCommand(cd, cn)cm.ExecuteNonQuery()cn.Close()MsgBox( "transaction successfully completed" )Form1 .Show()
8/12/2019 EX 7 & EX 8
20/31
EndIf
EndSub
PrivateSub Button2_Click( ByVal sender AsSystem. Object , ByVal e AsSystem. EventArgs )Handles Button2.Click
MsgBox( "transaction cancelled" )End
EndSub EndClass
Result:-
The above experiment E-Ticketing is executed and implemented successfully.
8/12/2019 EX 7 & EX 8
21/31
AIM:
To draw the diagrams[use case, activity,class, sequence, collaboration, statechart,component,deployment ] for the software personnel management systemand toimplement in VB.
PROBLEM STATEMENT:
In this project SOFTWARE PERSONNEL MANAGEMENT we can record details
of various activities of the user and to add,delete and update user details.This software willreduce the paper work.This also reduces timedelay.
EX.NO:8
DATE:
SOFTWARE PERSONNEL MANAGEMENT SYSTEM
8/12/2019 EX 7 & EX 8
22/31
USE CASE :
Add new project
Delete a project
Managing project details
managing project leader details
managing module leader details
managing team member details
Requesting new softwarepersonnel
mainitaining security of the projectdetails
Manager
8/12/2019 EX 7 & EX 8
23/31
CLASS DIAGRAM :
8/12/2019 EX 7 & EX 8
24/31
SEQUENCE DIAGRAM:
Software team
members : _cls2Manager :
_cls2
System : _cls2
Attend interview
Selects candidatesSelection list
Update personnel details
Training details
Training
Monitors project
Divides project
develops software
Maintains member details
Rating of member performance
Salary payment Payment details
8/12/2019 EX 7 & EX 8
25/31
8/12/2019 EX 7 & EX 8
26/31
ACTIVITY DIAGRAM :
Attendsinterview
Developssoftware
Selectspersonnel
Trains teammembers
Divides project
Monitors project
Rates membersperformance
issue salary tomembers
Updates personneldetails
Update salarydetails
System DBManager s/w Team members
8/12/2019 EX 7 & EX 8
27/31
COMPONENT DIAGRAM:
DEPLOYMENT VIEW:
User InterfaceComponent
ApplicationComponent
DatabaseComponent
UI Applicationserver
DB server
Printer
8/12/2019 EX 7 & EX 8
28/31
UML CODING:
#ifndef SOFTWARE_CLIENTS_H_HEADER_INCLUDED_B299A0DE#define SOFTWARE_CLIENTS_H_HEADER_INCLUDED_B299A0DE
//##ModelId=4D53A95E0234class Software clients{
public://##ModelId=4D53A97D0254Demands s/w();
//##ModelId=4D53A98500AEQueries();
//##ModelId=4D53A98900AEPayment();
private://##ModelId=4D53A96D0021
Name;
//##ModelId=4D53A96F01A8Organisationinvloved;
};
VB CODING:
FORM1:
Private Sub Command1_Click()
8/12/2019 EX 7 & EX 8
29/31
Form2.ShowEnd Sub
Private Sub Command2_Click()Form4.Show
End Sub
Private Sub Command3_Click()EndEnd Sub
FORM 2:
FORM 2:
Private Sub Command1_Click()
If (Text1.Text < " " And Text2.Text < " " And Text3.Text < " " And Text4.Text < " " AndText5.Text < " ") ThenMsgBox" Enter all details"ElseForm3.ShowForm3.Label7.Caption = Text1.TextForm3.Label8.Caption = Text2.TextForm3.Label9.Caption = Text3.TextForm3.Label10.Caption = Text4.TextForm3.Label11.Caption = Text5.TextEnd If
Text1.Text = " "Text2.Text = " "
8/12/2019 EX 7 & EX 8
30/31
Text3.Text = " "Text4.Text = " "Text5.Text = " "End Sub
FORM 3:
FORM3:Private Sub Command1_Click()Form1.ShowEnd Sub
Private Sub Label8_Click()End Sub
FORM 4:
8/12/2019 EX 7 & EX 8
31/31
FORM4:
Private Sub Command1_Click()MsgBox "Employee details with id Text1.Text have been deleted"
Text1.Text = " "Form1.ShowEnd Sub
Result:-
The above experiment software personnel management is executed andimplemented successfully.