Vous êtes sur la page 1sur 31

EX.

NO:7 E TICKETING DATE:

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 STATEMENT
E-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 and schedule resources, time in a cogent manner. The core of the system is to get the online reservation form (with details such as name, address, age, etc...)filled by the customers whose requirements are being verified by e-ticketing system with respect to the already existing information in the database. This forms the first and foremost step in the reservation of the required ticket. If so the tickets are available then the tickets are booked and its been mailed to customers e-mail address and also money will be automatically will be paid via ebanking, if not then he/she can log out. In the situation like if the customers have to cancel the ticket then money will be refunded to their respective bank accounts. After all the necessary criteria have been met, then the information is added to the database and this process is carried out.

USECASE DIAGRAM

CLASS DIAGRAM

ACTIVITY DIAGRAM

Login sequence diagram

Collaboration diagram

Reserve Tickets sequence diagram

Collaboration diagram

Schedule sequence diagram

Collaboration diagram

Payment sequence diagram

Collaboration diagram

STATE CHART DIAGRAM


Enter ID and Name View schedule Confirm Tickets

Fill The Reservation form

Check Available

Commit Transactions

Print Tickets

Component Diagram

Coding
#include "Bank.h" //##ModelId=4D79B0BB02EE Bank::Check() { } //##ModelId=4D79B0C0036B Bank::Transaction() { } #include "Cancelation.h" //##ModelId=4D79B01A03A9 Cancelation::Cancel() { } #include "Login Form.h" //##ModelId=4D79ADCC038A Login Form::Check() { } #include "Passenger1.h" //##ModelId=4D79ADAA030D Passenger1::Enter() { } #include "Payment.h" //##ModelId=4D79B06C007D Payment::Verify() { } //##ModelId=4D79B54103C8 Payment::Update() { } #include "Printer.h" //##ModelId=4D79B0D7006D Printer::Print() { } #include "Reservation Form.h" //##ModelId=4D79AE87004E Reservation Form::Check Availability() {} //##ModelId=4D79AEA503A9 Reservation Form::Pay() { } //##ModelId=4D79AEA800BB eservation Form::Reserve()

{ } //##ModelId=4D79AEAB02BF Reservation Form::Update() { } #include "View Schedule.h" //##ModelId=4D79AE2C03C8 View Schedule::Display() { } //##ModelId=4D79AE320128 View Schedule::Reserve() { } #endif /* DATABASE1_H_HEADER_INCLUDED_B2863D2D */ #ifndef LOGIN_FORM_H_HEADER_INCLUDED_B2862C09 #define LOGIN_FORM_H_HEADER_INCLUDED_B2862C09 //##ModelId=4D79ADB40000 class Login Form { public: //##ModelId=4D79ADCC038A Check(); private: //##ModelId=4D79ADC00119 User ID; //##ModelId=4D79ADC60242 Password; }; #endif /* PRINTER_H_HEADER_INCLUDED_B286551C */ #ifndef RESERVATION_FORM_H_HEADER_INCLUDED_B2865FBB #define RESERVATION_FORM_H_HEADER_INCLUDED_B2865FBB //##ModelId=4D79AE3900CB class Reservation Form { public: //##ModelId=4D79AE87004E Check Availability(); //##ModelId=4D79AEA503A9 Pay(); //##ModelId=4D79AEA800BB Reserve(); //##ModelId=4D79AEAB02BF Update(); private: //##ModelId=4D79AE450251 Date & time; //##ModelId=4D79AE5F0203

Address; //##ModelId=4D79AE6A0261 Name; //##ModelId=4D79AE6C0186 Age; //##ModelId=4D79AE6F0177 Boarding Point; //##ModelId=4D79AE7700DA Destination; //##ModelId=4D79AE7D036B Amount; //##ModelId=4D79AE800177 Payment; }; #endif /* RESERVATION_FORM_H_HEADER_INCLUDED_B2865FBB */

VB CODING: Form 1:

Coding:
PublicClassForm1 PrivateSub Button1_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click

Form2.Show() Me.Hide()

EndSub PrivateSub Button2_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click Form3.Show() Me.Hide()

EndSub EndClass

Form 2:

Coding:
ImportsSystem.Data ImportsSystem.Data.OleDb ImportsSystem.Data.OleDb.OleDbCommand ImportsSystem.Data.OleDb.OleDbConnection PublicClassForm2 Dim cd AsString DimcnAsNewOleDbConnection("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.Click If TextBox2.Text = ""Then MsgBox("fill the all details")

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 e AsSystem.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) * 500 ElseIf 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.Click Form4.Show() Me.Hide() EndSub EndClass

Form 3:

Coding:
ImportsSystem.Data ImportsSystem.Data.OleDb ImportsSystem.Data.OleDb.OleDbCommand ImportsSystem.Data.OleDb.OleDbConnection PublicClassForm3 Dim cd AsString DimcnAsNewOleDbConnection("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.Click cn.Open() cd = "select *from table1 where name='"& TextBox1.Text &"'" Dim cm AsNewOleDbCommand(cd, cn) DimrsetAsOleDbDataReader rset = cm.ExecuteReader Ifrset.ReadThen

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

PrivateSub Button4_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles Button4.Click cn.Open() cd = "delete from table1 where name ='"& TextBox1.Text &"'" Dim cm AsNewOleDbCommand(cd, cn) DimrsetAsOleDbDataReader cm.ExecuteNonQuery() rset = cm.ExecuteReader Ifrset.ReadThen

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.Click MsgBox("transaction cancelleed") End

EndSub EndClass

Form 4:

Coding:
PublicClassForm4 PrivateSub CheckBox1_CheckedChanged(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles CheckBox1.CheckedChanged CheckBox1.Checked = True Form6.Show() Me.Hide() EndSub PrivateSub CheckBox2_CheckedChanged(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles CheckBox2.CheckedChanged CheckBox2.Checked = True Form5.Show() Me.Hide() EndSub EndClass

Form 5:

Coding:
ImportsSystem.Data ImportsSystem.Data.OleDb ImportsSystem.Data.OleDb.OleDbCommand ImportsSystem.Data.OleDb.OleDbConnection PublicClassForm5 Dim cd AsString DimcnAsNewOleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\sakthi\Documents\Visual Studio 2010\Projects\e-ticket\et.mdb") PrivateSub TextBox3_TextChanged(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles TextBox3.TextChanged EndSub PrivateSub Button1_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click If 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

PrivateSub Button2_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click MsgBox("transaction cancelled") End EndSub EndClass

Form 6:

Coding:
ImportsSystem.Data ImportsSystem.Data.OleDb ImportsSystem.Data.OleDb.OleDbCommand ImportsSystem.Data.OleDb.OleDbConnection PublicClassForm6 Dim cd AsString DimcnAsNewOleDbConnection("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.Click If 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()

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.

EX.NO:8 SOFTWARE PERSONNEL MANAGEMENT SYSTEM DATE:

AIM:
To draw the diagrams[use case, activity,class, sequence, collaboration, state chart,component,deployment ] for the software personnel management systemand to implement 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 will reduce the paper work.This also reduces timedelay.

USE CASE :

Add new project

Delete a project

Managing project details Manager managing project leader details

managing module leader details

managing team member details

Requesting new software personnel

mainitaining security of the project details

CLASS DIAGRAM :

SEQUENCE DIAGRAM:
Software team members : _cls2 Manager : _cls2 System : _cls2

Attend interview

Selects candidates

Selection list

Update personnel details

Training details

Training

Divides project

Monitors project

develops software Maintains member details

Rating of member performance

Salary payment

Payment details

COLLABORATION DIAGRAM:

9: develops software

Software team members : _cls2

1: Attend interview 2: Selects candidates 6: Training 7: Divides project 8: Monitors project 11: Rating of member performance 12: Salary payment 4: Update personnel details 5: Training details

Manager : _cls2

System : _cls2

3: Selection list 10: Maintains member details 13: Payment details

ACTIVITY DIAGRAM :
s/w Team members Manager System DB

Attends interview Selects personnel

Updates personnel details

Trains team members

Divides project

Develops software

Monitors project

Rates members performance

issue salary to members

Update salary details

COMPONENT DIAGRAM:

User Interface Component

Application Component

Database Component

DEPLOYMENT VIEW:

UI

Application server

DB server

Printer

UML CODING:
#ifndef SOFTWARE_CLIENTS_H_HEADER_INCLUDED_B299A0DE #define SOFTWARE_CLIENTS_H_HEADER_INCLUDED_B299A0DE //##ModelId=4D53A95E0234 class Software clients { public: //##ModelId=4D53A97D0254 Demands s/w(); //##ModelId=4D53A98500AE Queries(); //##ModelId=4D53A98900AE Payment(); private: //##ModelId=4D53A96D0021 Name; //##ModelId=4D53A96F01A8 Organisationinvloved; };

VB CODING: FORM1:

Private Sub Command1_Click()

Form2.Show End Sub Private Sub Command2_Click() Form4.Show End Sub Private Sub Command3_Click() End End Sub FORM 2:

FORM 2: Private Sub Command1_Click() If (Text1.Text < " " And Text2.Text < " " And Text3.Text < " " And Text4.Text < " " And Text5.Text < " ") Then MsgBox" Enter all details" Else Form3.Show Form3.Label7.Caption = Text1.Text Form3.Label8.Caption = Text2.Text Form3.Label9.Caption = Text3.Text Form3.Label10.Caption = Text4.Text Form3.Label11.Caption = Text5.Text End If Text1.Text = " " Text2.Text = " "

Text3.Text = " " Text4.Text = " " Text5.Text = " " End Sub

FORM 3:

FORM3: Private Sub Command1_Click() Form1.Show End Sub Private Sub Label8_Click() End Sub

FORM 4:

FORM4: Private Sub Command1_Click() MsgBox "Employee details with id Text1.Text have been deleted" Text1.Text = " " Form1.Show End Sub

Result:The above experiment software personnel management is executed and implemented successfully.