Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EX.NO:
DATE:
QUIZ SYSTEM AIM:
To implement the Quiz System using Rational Software.
ALGORITHM:
Step 1: Identify the Actors and Use cases.
In this system,the actors and use cases are:
Actors: User ,System and Database.
Use cases: Login,Option,answering questions,calculating marks and Display score
card.
Step 2: Build the relationship between actors and use cases.
The use case diagram for the quiz system is given in Fig(1).
Fig (1): Use case diagram for the Quiz System
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR SEQUENCE DIAGRAM:
Step 1: Identify the objects.
In this system, the objects are: User, System and Database.
Step 2: Identify the sequence of events.
Step 3: Login to the system to check the validity.
Step 4: Select the option in the system.
Step 5: Answer the questions for the selected options
Step 6: Evaluate the answer and calculate the mark.
Step 7: Save the score in the database.
Step 8: Display the score.
Fig(2): Sequence diagram for Quiz System
USER SYSTEM DATABASE
ENTER THE LOGIN NAME
DISPLAY CATAGORIES FORM
SELECT ANY CATAGORIES
DISPLAY THE QUESTIONS
ANSWER THE QUESTIONS
DISPLAY THE SCORESTORE THE SCORE
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
3. ALGORITHM FOR CLASS DIAGRAM:
Step 1: Create class diagram for each identified objects under sequence diagram.
Identified objects are: User, System and Database.
Step 2: Class diagram for each object is divided into three parts.
Top portion represents the Class Name.
Middle portion represents the Attributes.
Bottom portion represents the Methods.
The Class diagram for Quiz System is shown in Fig(3).
Fig(3):Class diagram for Quiz system
Procedure to write the software for the Quiz System using Rational Software tool
Selecting the Software:
1. Click start-> Rational Software->Rational Rose Enterprise Edition.
Create the project:
2. In the Create New Model window select VB6 Standard Framework->A screen appears;select
the untitled project from the browser window and save it
To draw the diagram:
3.Right Click the Use case view->New->Use case diagram->Sequence diagram->Class
diagram(name and save the files)
4. Click Use case diagram->using the tool box build the use case diagram.
5. Click Sequence diagram->using the tool box build the sequence diagram.
6. Click Class diagram-> using the tool box build the class diagram.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Generate the coding form:
7.Right click component view -> component diagram-> open specification -> select the
stereotype as DLL-> select the language as visual basic ->switch from general tab to realizes
tab-> select the classes you created in class diagram-> right click ->Assign->Ok.
8.Right click component view -> update code form model-> the tool window for converting
diagrams to code appears->next->finish->the skeleton code in VB is generated automatically
for the class diagram designed.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE
LOGIN FORM:
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
LoginSucceeded = False
End
End Sub
Private Sub cmdOK_Click()
If txtUserName = "mca" Then
If txtPassword = "mca" Then
LoginSucceeded = True
Form1.Show
Me.Hide
Else
MsgBox "Invalid Password, try again!", vbInformation, "Login"
txtPassword.SetFocus
End If
Else
MsgBox "Invalid Username, try again!", vbInformation, "Login"
End If
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End Sub
Form 1:
Private Sub Option2_Click()
Form2.Show
Me.Hide
End Sub
Private Sub Option3_Click()
Form5.Show
Me.Hide
End Sub
Private Sub Option4_Click()
Form6.Show
Me.Hide
End Sub
Form 2:
Dim a As Integer
Private Sub Command1_Click()
Text1.Text = ""
If Option2.Value = True Then
Text1.Text = Val(Text1.Text) + 10
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Else
Text1.Text = Val(Text1.Text) + 0
End If
Frame2.Visible = True
Frame1.Visible = False
End Sub
Private Sub Command2_Click()
If Option7.Value = True Then
Text1.Text = Val(Text1.Text) + 10
Else
Text1.Text = Val(Text1.Text) + 0
End If
Form3.Show
Me.Hide
End Sub
Private Sub Form_Load()
Frame2.Visible = False
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Timer1_Timer()
Me.Hide
Form1.Show
End Sub
Form 3:
Private Sub Command1_Click()
If Option4.Value = True Then
Text1.Text = Val(Text1.Text) + 10
Else
Text1.Text = Val(Text1.Text) + 0
End If
Frame2.Visible = True
Frame1.Visible = False
End Sub
Private Sub Command2_Click()
If Option13.Value = True Then
Text1.Text = Val(Text1.Text) + 10
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Else
Text1.Text = Val(Text1.Text) + 0
End If
Form8.Show
Me.Hide
End Sub
Private Sub Form_Load()
Frame2.Visible = False
End Sub
RESULT FORM:
Dim db As Database
Dim rs As Recordset
Private Sub Command1_Click()
rs(0) = lable2.Caption
rs(1) = Text1.Text
rs(2) = Text2.Text
AddNew
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
If Form1.Option2.Value = True Then
Label2.Caption = Val(Form3.Text1.Text) + Val(Form2.Text1.Text)
ElseIf Form1.Option3.Value = True Then
End If
End Sub
Private Sub Form_Load()
MDIForm1.Label1.Caption = ""
MDIForm1.Picture1.Visible = False
Set db = OpenDatabase("D:\PROJECTS\tittu pro\RESULT.MDB")
Set rs = db.OpenRecordset("res")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
OUTPUT:
LOGIN FORM :
FORM 1:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 2:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 3:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
RESULT FORM:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EX.NO:
DATE:
ATM SYSTEM
AIM
To implement the ATM System using Relational Software.
ALGORITHM
1. ALGORITHM FOR USE CASE DIAGRAM:
Step1: Identify the Actors and Use cases.
In the system, the actors and use cases are:
Actors: User, System and Database.
Use cases: Login, Deposit, withdrawal, updation, balance enquiry
Step2: Build the relationship between actors and Use cases.
The use case diagram for the expect system is given in Fig (1).
Fig (1): Use case diagram for the ATM System
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR SEQUENCE DIAGRAM:
Step1: Identify the objects.
In this System, the objects are: User, System and Database.
Step2: Identify the sequence of events.
Step3: Login to the system to check the validity.
Step4: Select the option in the system.
Step5: For the user to deposit or withdraw the amount ,they should enter the option in the
System.
Step6: The System will do the corresponding processing with proper Updation in the Database.
Step7: Finally the balance is displayed to the user.
The sequence diagram for ATM System is give4n in Fig(2).
Fig (2): Sequence diagram for ATM System
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
3. ALGORITHM FOR CLASS DIAGRAM:
Step1: Create class diagram for each identified objects under sequence diagram.
Identified objects are: User, System and Database.
Step2: Class diagram for each object is divided into three parts.
Top portion represents the Class name.
Middle portion represents the Attributes.
Bottom portion represents the methods.
The class diagram for ATM system is shown in Fig (3).
<Implements> <Implements> <Implements> <Implements>
Fig (3): class diagram for ATM system
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Procedure to write the software for the ATM system using rational Software tool
Selecting the Software:
1. Click startRational SoftwareRational Rose Enterprise Edition.
Create the project:
2. In the Create New model window select VB6 Standard FrameworkA screen appears;
select the untitled project from the browser window and save it.
To draw the diagram:
3. Right Click the use case viewNewUse case diagramSequence diagramclass diagram
(name and save the files)
4. Click use case diagramusing the tool box build the use case diagram.
5. Click sequence diagramusing the tool box build the sequence diagram.
6. Click class diagramusing the tool box build the class diagram.
Generate the coding form:
7.Right click Component viewcomponent diagramOpen specificationselect the Stereotype
as DLLSelect the language as Visual BasicSwitch from General tab to Realize tabSelect
the classes you created in class diagramright clickAssignOk.
8. Right click component viewupdate code from modelthe tool window for converting
diagrams to code appearsnextFinishthe skeleton code in VB is generated automatically
for the class diagram.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE:
PINPROCESS CODING:
Dim DB As Database
Dim RS As Recordset
Dim A As Integer
Private Sub Command1_Click()
A = Val(Text1.Text)
RS.MoveFirst
While (True)
If Val(A) = Val(RS(3)) Then
form2.Show
GoTo AA
Else
RS.MoveNext
End If
If RS.EOF = True Then
MsgBox "YOUR PIN NUMBER IS WRONG"
GoTo AA
End If
Wend
AA:
End Sub
Private Sub Form_Load()
Set DB = OpenDatabase("E:\atm\STORAGE.mdb")
Set RS = DB.OpenRecordset("CUSDET")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
DISPLAY CODING:
Dim DB As Database
Dim RS As Recordset
Private Sub Command1_Click()
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
Form3.Show
GoTo AA
Else
RS.MoveNext
End If
Wend
AA:
End Sub
Private Sub Command2_Click()
Form4.Show
End Sub
Private Sub Command3_Click()
Form5.Show
End Sub
Private Sub Command4_Click()
Form6.Show
End Sub
Private Sub Command6_Click()
Form1.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Form_Load()
Set DB = OpenDatabase("E:\atm\STORAGE.mdb")
Set RS = DB.OpenRecordset("CUSDET")
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
Label2.Caption = RS(2)
GoTo AA
Else
RS.MoveNext
End If
Wend
AA:
End Sub
BALANCE ENQUIRY CODING:
Dim DB As Database
Dim RS As Recordset
Private Sub Command1_Click()
Unload Me
Form1.Show
Form1.Text1.Text = ""
Form1.Text1.SetFocus
End Sub
Private Sub Command3_Click()
Form1.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Form_Load()
Set DB = OpenDatabase("E:\atm\STORAGE.mdb")
Set RS = DB.OpenRecordset("CUSDET")
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
Label2.Caption = RS(4)
Label4.Caption = RS(5)
GoTo AA
Else
RS.MoveNext
End If
Wend
AA:
End Sub
WITHDRAW CODING:
Dim DB As Database
Dim RS As Recordset
Dim B As Double
Private Sub Command1_Click()
B = 0
B = Val(Text1.Text)
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
If (Val(B) > Val(RS(4))) Then
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
MsgBox "YOUR BALANCE IS LOW"
Text1.Text = ""
Text1.SetFocus
GoTo BB
Else
MsgBox "TAKE YOUR CASH "
Text1.Text = ""
B = Val(RS(4)) - Val(B)
RS.Edit
RS(4) = Val(B)
RS(5) = Val(RS(4))
RS.Update
GoTo AA
End If
Else
RS.MoveNext
End If
Wend
AA:
BB:
Form1.Show
Form1.Text1.Text = ""
Form1.Text1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Form1.Show
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End Sub
Private Sub Form_Load()
Set DB = OpenDatabase("E:\atm\STORAGE.mdb")
Set RS = DB.OpenRecordset("CUSDET")
Text1.Text = ""
End Sub
MOBILE NUMBER CHANGE CODING:
Dim DB As Database
Dim RS As Recordset
Dim B As Double
Private Sub Command1_Click()
B = 0
B = Val(Text1.Text)
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
If (Val(B) > Val(RS(4))) Then
MsgBox "YOUR BALANCE IS LOW"
Text1.Text = ""
Text1.SetFocus
GoTo BB
Else
MsgBox "TAKE YOUR CASH "
Text1.Text = ""
B = Val(RS(4)) - Val(B)
RS.Edit
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
RS(4) = Val(B)
RS(5) = Val(RS(4))
RS.Update
GoTo AA
End If
Else
RS.MoveNext
End If
Wend
AA:
BB:
Form1.Show
Form1.Text1.Text = ""
Form1.Text1.SetFocus
End Sub
Private Sub Command2_Click()
Form1.Show
End Sub
Private Sub Form_Load()
Set DB = OpenDatabase("E:\atm\STORAGE.mdb")
Set RS = DB.OpenRecordset("CUSDET")
Text1.Text = ""
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
PIN NUMBER CHANGE CODING:
Dim DB As Database
Dim RS As Recordset
Private Sub Command1_Click()
RS.MoveFirst
While (True)
If Val(Text1.Text) = Val(RS(3)) Then
MsgBox "PIN ALREADY EXIST"
Text1.Text = ""
GoTo BB
Else
RS.MoveNext
End If
If RS.EOF = False Then
GoTo CC
End If
Wend
CC:
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
RS.Edit
RS(3) = Val(Text1.Text)
Form1.Text1.Text = Val(Text1.Text)
RS.Update
MsgBox "YOUR PIN NO WILL BE CHANGE"
Text1.Text = ""
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
GoTo AA
Else
RS.MoveNext
End If
Wend
AA:
Form1.Show
Form1.Text1.Text = ""
Unload Me
BB:
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Form1.Show
End Sub
Private Sub Form_Activate()
RS.MoveFirst
While (True)
If Val(Form1.Text1.Text) = Val(RS(3)) Then
Label2.Caption = RS(3)
GoTo AA
Else
RS.MoveNext
End If
Wend
AA:
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Form_Load()
Set DB = OpenDatabase("E:\atm\STORAGE.mdb")
Set RS = DB.OpenRecordset("CUSDET")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
OUTPUT:
PIN NUMBER PROCESS FORM:
MENU FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
BALANCE ENQUIRY FORM:
WITHDRAW FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
PIN NUMBER CHANGE FORM:
MOBILE NUMBER CHAGE FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
CHECK YOUR BALANCE FORM:
CHECK YOUR PIN NUMBER:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EX.NO:
DATE:
LIBRARY MANAGEMENT SYSTEM
AIM
To implement the Library Management System using Rational Software .
ALGORITHM
1. ALGORITHM FOR USECASE DIAGRAM:
Step 1: Identify the actors and use cases.
In this system, the actors and use cases are :
Actors :User and Admin.
Use cases: Book entry,Search book,Return book,Issue book,Stock
Step 2: Build the relationship between actors and use cases.The use case diagram for
Library management system is given in fig(1).
FIG(1):Use Case diagram for the Library Management System
Book Entry
Search Book
Return Book
Issue Book
Stock
User
Admin
NewUseCase
Book entry
Search book
Return book
Issue book
Stock
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR SEQUENCE DIAGRAM:
Step 1: Identify the objects.
In this system,the objects are:Admin,User,Book entry,Search,Return,Issue,Strock.
Step 2: Identify the sequence of events.
Step 3: Collect the information from catalogue.
Step 4: Save the details in database
Step 5: Display the result.
The Sequence diagram for for Library Management System is given in Fig(2).
Fig(2):Sequence diagram for Library Management System
Admin User Book entry Search Return Issue Stock
Enter Book Detail
Enter Book Id
Book Found
Book Request
Book Issued
Enter bookid
Book Returned
Add Book To Stock
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
3. ALGORITHM FOR CLASS DIAGRAM:
Step 1: Create class diagram for each identified objects under sequence diagram.
Identified objects are:User and Admin.
Step 2: Create diagram for each object is divided into three parts.
Top portion represents the Class Name.
Middle portion represents the Attributes.
Bottom portion represents the Methods.
The Class diagram for Library Management system is shown in Fig(3).
Fig(3): Class diagram for Library Management System
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Procedure to write the software for the Management System using Rational Software Tool
Selecting the Software:
1.Click start-> Rational Software->Rational Rose Enterprise Edition.
Create the project:
2.In the Create New Model window select VB^ Standard Framework->A screen
appears;select the untitled project from the browser window and save it.
To draw the diagram:
3.Right Click the Use case view->New->Use case diagram->Sequence diagram->Class
diagram(name and save the files)
4.Click Use case diagram->Using the toolbox build the Usecase diagram.
5.Click Sequence diagram->Using the tool box build the Sequence diagram.
6.Click Class diagram->Using the tool box build the class diagram.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE:
FORM 1:
Private Sub Command1_Click()
If Combo1.Text = "ADMIN" And Text1.Text = "123" Then
MDIForm1.Show
ElseIf Combo1.Text = "USER" And Text1.Text = "stud" Then
Form5.Show
Else
MsgBox ("INCORRECT LOGIN")
End If
End Sub
Private Sub Form_Load()
Combo1.AddItem ("ADMIN")
Combo1.AddItem ("USER")
End Sub
FORM 2:
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim db1 As New ADODB.Connection
Dim rs1 As New ADODB.Recordset
Dim a As Integer
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command1_Click()
a = Text3.Text
rs.MoveFirst
While (rs.EOF = False)
If (a = rs(0)) Then
rs1.AddNew
rs1(0) = rs(0)
rs1(1) = rs(1)
rs1(2) = rs(2)
rs1(3) = rs(3)
rs1(4) = rs(4)
rs1.Update
rs.Delete
MsgBox ("BOOK ISSUED")
End If
rs.MoveNext
Wend
rs.MoveLast
If (a = rs(0)) Then
rs1.AddNew
rs1(0) = rs(0)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
rs1(1) = rs(1)
rs1(2) = rs(2)
rs1(3) = rs(3)
rs1(4) = rs(4)
rs1.Update
rs.Delete
MsgBox ("BOOK ISSUED")
End If
End Sub
Private Sub Command2_Click()
MDIForm1.Show
End Sub
Private Sub Form_Load()
db.CursorLocation = adUseClient
db.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
rs.Open "book", db, adOpenDynamic, adLockOptimistic
db1.CursorLocation = adUseClient
db1.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
rs1.Open "issued", db, adOpenDynamic, adLockOptimistic
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim db1 As New ADODB.Connection
Dim rs1 As New ADODB.Recordset
Dim a As Integer
Private Sub Command1_Click()
a = Text3.Text
rs.MoveFirst
While (rs.EOF = False)
If (a = rs(0)) Then
rs1.AddNew
rs1(0) = rs(0)
rs1(1) = rs(1)
rs1(2) = rs(2)
rs1(3) = rs(3)
rs1(4) = rs(4)
rs1.Update
rs.Delete
MsgBox ("BOOK ISSUED")
End If
rs.MoveNext
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Wend
rs.MoveLast
If (a = rs(0)) Then
rs1.AddNew
rs1(0) = rs(0)
rs1(1) = rs(1)
rs1(2) = rs(2)
rs1(3) = rs(3)
rs1(4) = rs(4)
rs1.Update
rs.Delete
MsgBox ("BOOK ISSUED")
End If
End Sub
Private Sub Command2_Click()
MDIForm1.Show
End Sub
Private Sub Form_Load()
db.CursorLocation = adUseClient
db.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
rs.Open "book", db, adOpenDynamic, adLockOptimistic
db1.CursorLocation = adUseClient
db1.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
rs1.Open "issued", db, adOpenDynamic, adLockOptimistic
End Sub
FORM 3:
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim db1 As New ADODB.Connection
Dim rs1 As New ADODB.Recordset
Dim b As Integer
Private Sub Command1_Click()
b = Text3.Text
rs1.MoveFirst
While (rs1.EOF = False)
If (b = rs1(0)) Then
rs.AddNew
rs(0) = rs1(0)
rs(1) = rs1(1)
rs(2) = rs1(2)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
rs(3) = rs1(3)
rs(4) = rs1(4)
rs.Update
rs1.Delete
MsgBox ("BOOK RETURNED")
End If
rs1.MoveNext
Wend
rs1.MoveLast
If (b = rs1(0)) Then
rs.AddNew
rs(0) = rs1(0)
rs(1) = rs1(1)
rs(2) = rs1(2)
rs(3) = rs1(3)
rs(4) = rs1(4)
rs.Update
rs1.Delete
MsgBox ("BOOK RETURNED")
End If
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command2_Click()
MDIForm1.Show
End Sub
Private Sub Command3_Click()
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
End Sub
Private Sub Form_Load()
db.CursorLocation = adUseClient
db.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
rs.Open "book", db, adOpenDynamic, adLockOptimistic
db1.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
rs1.Open "issued", db, adOpenDynamic, adLockOptimistic
End Sub
FORM 4:
Private Sub Command1_Click()
Form4.Show
End Sub
Private Sub Command2_Click()
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Form3.Show
End Sub
Private Sub BOOKENTRY_Click()
Form2.Show
End Sub
Private Sub EXIT_Click()
End
End Sub
Private Sub ISSUE_Click()
Form3.Show
End Sub
Private Sub RETURN_Click()
Form4.Show
End Sub
Private Sub SEARCH_Click()
DataReport1.Show
End Sub
Private Sub STOCK_Click()
DataReport1.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
OUTPUT:
USER LOGIN FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
MDI FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
BOOK ENTRY FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
BOOK ISSUE FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
BOOK RETURN FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
DATAREPORT FORM:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EX.NO:
DATE:
TICKET RESERVATION SYSTEM
AIM
To implement the Ticket Reservation System using Rational Software.
ALGORITHM
1. ALGORITHM FOR USE CASE DIAGRAM (TICKET RESERVATION):
Step1:Identify the Actors and Usecases.
In the system ,the actors and use cases are:
Actors :Passenger,System,and Database.
Usecases :Details,seats available,reservation of ticket,and
Print the journey of reservation ticket.
Step2:Build the relationship between actors.
The Use case diagram for Ticket Reservation is given in fig(1).
View_and_print_the_journey_r...
Information_Cancellation
Seats _Available
Reservation_of_Ticket
Reserve_the_Ticket
Passenger
Database
Sys
Fig(1):Use case Diagram for Ticket Reservation
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR USE CASE DIAGRAM (TICKET CANCELLATION):
Step1:Identify the Actors and Usecases.
In the system ,the actors and use cases are:
Actors :Passenger,System,and Database.
Use cases: cancellation of ticket,cancel the ticket,view the cancelled details.
Step2: Build the relationship between actors and use cases.
The Use case diagram for Ticket Cancellation is given in fig(2).
passenger sys
database
Cancellation_of_Ticket
Cancel_the _Ticket
View_and_Print_Cancelled_Details
Fig(2):Use case Diagram for Ticket Cancellation
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
3. ALGORITHM FOR SEQUENCE DIAGRAM (TICKET RESERVATION):
Step1:Identify the objects.
In this system,the odjects are:Passenger,System Database and Reservation.
Step2:Identify the sequence of events.
Step3:Select the required information for reservation.
Step4:Perforn the reservation process.
Step5:Save the details in database.
Step6:Send the details to the system.
Step7:View and print the journey of reservation ticket details.
The Sequence diagram for Ticket Reservation is given in fig(3).
passenger system database reservation
1.Get the seat availablity
2.Provide details
3.Select information to reserve 4.Perform the reservation process
5.Save the details
6.Send the details
7.View and print the journey of reservation
Fig(3):Sequence diagram for Ticket Reservation
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
4. ALGORITHM FOR SEQUENCE DIAGRAM (TICKET CANCELLATION):
Step1:Identify the objects.
In this system,the objects are:Passenger,System Database and Cancellation.
Step2:Identify the sequence of events.
Step3:Enter the PNR number.
Step4:Perform the cancellation process.
Step5:Send the details to the system.
Step6:View the completion process of ticket cancellation.
The Sequence diagram for Ticket Cancellation is given in fig(4).
passenger
system database cancellation
1.Enter the PNR no
2.Perform the cancellation process
3.Cancel the ticket
4.Send the details
5.View and print the cancellation process
Fig(4):Sequence diagram for ticket cancellation
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
5. ALGORITHM FOR CLASS DIAGRAM (TICKET RESERVATION):
Step1:Create class diagram for each identified Objects under sequence diagram.
Identified objects are:User,System and Database and reservation.
Step2:Class diagram for each object is divided into three parts.
Top portion represents the class Name.
Middle portion represents the Attributes.
Bottom portion represents the Methods.
The Class diagram for Ticket Reservation is shown in fig(5).
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
6. ALGORITHM FOR CLASS DIAGRAM (TICKET CANCELLATION):
Step1:Create class diagram for each identified Objects under sequence diagram.
Identified objects are:User,System and Database and reservation.
Step2:Class diagram for each object is divided into three parts.
Top portion represents the class Name.
Middle portion represents the Attributes.
Bottom portion represents the Methods.
The Class diagram for Ticket Cancellation is shown in fig(6).
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Procedure to write the software for the Online Ticket Reservation System Using Rational
Software tool
Selecting the software:
1.click start->Rational Software->Rational Rose Enterprice Edition.
Create the project:
2.In the Create New Model window select VB6 Standard Framework->A screen
appears;select the untitled project from the browser window and save it.
To draw the diagram:
3.Right click the Use case view->New->Use case diagram->Sequence diagram->
Class diagram(name and save the files)
4.Click Use case diagram->Using the tool box build the use case diagram.
5.Click Sequence diagram->Using the tool box build the sequence diagram.
6.Click class diagram->Using the tool box build the class diagram.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE:
FORM 1:
Private Sub Command1_Click()
If Text1.Text = "online" And Text2.Text = "mca" Then
MsgBox "WELCOME"
Form2.Show
Form1.Hide
Else
MsgBox "INVALIDE LOGIN"
End If
End Sub
FORM 2:
Private Sub Command1_Click()
Form2.Hide
Form3.Show
End Sub
Private Sub Command2_Click()
Form2.Hide
Form4.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command3_Click()
Form2.Hide
Form6.Show
End Sub
FORM 3:
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Add_Click()
rs.AddNew
rs(0) = Combo1.Text
rs(1) = Text1.Text
rs(2) = Text2.Text
rs(3) = Text3.Text
rs(4) = Text4.Text
rs(5) = Text5.Text
rs(6) = Text6.Text
rs(7) = Text7.Text
rs(8) = Text8.Text
rs(9) = Text9.Text
MsgBox "new Record Added"
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command1_Click()
rs.MoveFirst
Combo1.Text = rs(0)
Text1.Text = rs(1)
Text2.Text = rs(2)
Text3.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
Text9.Text = rs(9)
End Sub
Private Sub Command2_Click()
rs.MovePrevious
Combo1.Text = rs(0)
Text1.Text = rs(1)
Text2.Text = rs(2)
Text3.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
Text9.Text = rs(9)
End Sub
Private Sub Command3_Click()
rs.MoveNext
Combo1.Text = rs(0)
Text1.Text = rs(1)
Text2.Text = rs(2)
Text3.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
Text9.Text = rs(9)
End Sub
Private Sub Command4_Click()
rs.MoveLast
Combo1.Text = rs(0)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Text1.Text = rs(1)
Text2.Text = rs(2)
Text3.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
Text9.Text = rs(9)
End Sub
Private Sub Command5_Click()
rs.Delete
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Text9.Text = ""
End Sub
Private Sub Command6_Click()
Form2.Show
Form3.Hide
End Sub
Private Sub Command7_Click()
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub
Private Sub Command8_Click()
DataReport2.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Delete_Click()
rs.Delete
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub
Private Sub Form_Load()
db.CursorLocation = adUseClient
db.Open "Provider=MSDAORA.1;User ID=scott;password=tiger;Data Source=oracle;Persist
Security Info=False"
rs.Open "details", db, adOpenDynamic, adLockOptimistic
Combo1.Text = rs(0)
Text1.Text = rs(1)
Text2.Text = rs(2)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Text3.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
Text9.Text = rs(9)
End Sub
Private Sub Home_Click()
Form3.Hide
Form2.Show
End Sub
FORM 4:
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Combo1_Click()
Select Case Combo1.Text
Case "Vaigai Express"
Text4.Text = "TN 28/1234"
Text5.Text = "Chennai"
Text6.Text = "Kovai"
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Text7.Text = "7.00AM"
Text8.Text = "800"
Case "Kovai Express"
Text4.Text = "TN 07/1235"
Text5.Text = "Kovai"
Text6.Text = "Delhi"
Text7.Text = "2.00PM"
Text8.Text = "1500"
Case "Blue Mountain"
Text4.Text = "TN 21/876"
Text5.Text = "Trichy"
Text6.Text = "Chennai"
Text7.Text = "5.00AM"
Text8.Text = "700"
Case "Pandiyan Express"
Text4.Text = "TN 77/0742"
Text5.Text = "Salem"
Text6.Text = "Karaikudi"
Text7.Text = "7.00Pm"
Text8.Text = "900"
End Select
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End Sub
Private Sub Command1_Click()
Form4.Hide
Form2.Show
End Sub
Private Sub Command3_Click()
rs.Delete
End Sub
Private Sub Command4_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Combo1.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command2_Click()
Form6.Show
Form4.Hide
End Sub
Private Sub Command5_Click()
rs.MoveFirst
Text1.Text = rs(0)
Text2.Text = rs(1)
Text3.Text = rs(2)
Combo1.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
End Sub
Private Sub Command6_Click()
rs.MovePrevious
Text1.Text = rs(0)
Text2.Text = rs(1)
Text3.Text = rs(2)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Combo1.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
End Sub
Private Sub Command7_Click()
rs.MoveNext
Text1.Text = rs(0)
Text2.Text = rs(1)
Text3.Text = rs(2)
Combo1.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command8_Click()
rs.MoveLast
Text1.Text = rs(0)
Text2.Text = rs(1)
Text3.Text = rs(2)
Combo1.Text = rs(3)
Text4.Text = rs(4)
Text5.Text = rs(5)
Text6.Text = rs(6)
Text7.Text = rs(7)
Text8.Text = rs(8)
End Sub
Private Sub Form_Load()
Combo1.AddItem ("Vaigai Express")
Combo1.AddItem ("Kovai Express")
Combo1.AddItem ("Blue Mountain")
Combo1.AddItem ("Pandiyan Express")
db.CursorLocation = adUseClient
db.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle;Persist
Security Info=True"
rs.Open "reser222", db, adOpenDynamic, adLockOptimistic
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End Sub
Private Sub Report_Click()
DataReport2.Show
End Sub
FORM 5:
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Dim i As Integer
'Dim e As Integer
Private Sub Command1_Click()
If Option1 = True Then
Text3.Text = "Male"
ElseIf Option2 = True Then
Text3.Text = "Female"
End If
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command4_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
End Sub
Private Sub Command5_Click()
If Option3 = True Then
Text8.Text = "Firstclass"
ElseIf Option4 = True Then
Text8.Text = "Secondclass"
End If
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
If Text8.Text = "Firstclass" Then
a = Val(Combo1.Text) * 500
b = Val(Combo2.Text) * 300
c = Val(Combo3.Text) * 250
Text7.Text = a + b + c
ElseIf Text8.Text = "Secondclass" Then
a = Val(Combo1.Text) * 300
b = Val(Combo2.Text) * 150
c = Val(Combo3.Text) * 100
Text7.Text = a + b + c
Else
MsgBox "Invalid Entry"
End If
End Sub
Private Sub Form_Load()
End Sub
Private Sub Home_Click()
Form2.Show
Form6.Hide
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Text1_Change()
Combo4.Clear
d = Val(Text1.Text) + d
For i = i To Val(d) - 1
Combo4.AddItem i + 1
Next
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
OUTPUT:
FORM 1:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 2:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 3:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 4:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 5:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
FORM 6:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EX.NO:
DATE:
STOCK MANAGEMENT SYSTEM
AIM:
To Implement the Stock Management System using Rational Software.
ALGORITHM:
1. ALGORITHM FOR USE CASE DIAGRAM:
Step 1: Identify the actors and use cases.
In this system, the actors and use cases are:
Actors : User, System and Database.
Use cases: Login, Product in, Product Delivery, Add New Product, Updation.
Step 2: Build the relationship between actors and use cases.
The use case diagram for the stock maintenance system is given in Fig(1).
Fig (1): Use Case Diagram for Stock Management System
Product-In
login
View Stock Details
User
Product-Out
Return Stock
Admin
Update & Modified
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR SEQUENCE DIAGRAM:
Step 1: Identify the objects.
In this system, the objects are: user, system and database.
Step 2: Identify the sequence of events.
Step 3: Login to the system to check the system.
Step 4: The user request for in products in the system.
Step 5: System show the details by making query request in database.
Step 6: Then the user may request our product in the system and for that also it will
respond by requesting the database.
Step 7: And if the user request the new product, it will be added as a new product.
Step 8: Finally confirmation is given to the user for the request product.
The sequence diagram for stock maintenance system is given in Fig (2).
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Fig (2): Sequence Diagram for Stock Management System
3. ALGORITHM FOR CLASS DIAGRAM:
Step 1: Create class diagram for each identified object under sequence diagram.
Identified objects are: user ,system and database
Step 2: Class diagram for each object is divided into three parts.
Top portion represents the class name.
Middle portion represents the methods.
Bottom portion represents the methods.
The class diagram for stock maintenance system is shown in Fig (3).
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Fig (3): Class Diagram for Stock Management System
Procedure to write the software for the Stock Management System using
Rational Software.
Selecting the software:
1. Click start-> rational software -> rational rose enterprise edition.
Create the Project :
2. In the create new model window select vb6 standard framework -> A screen
appears; select the untitled project from the browser window and save it.
To draw the diagram:
3. Right click the use case view -> new -> use diagram -> sequence diagram ->
class diagram (name and save the files)
4. Click use case diagram -> using the tool box build the USECASE diagram.
5. Click sequence diagram -> using the tool box build the SEQUENCE diagram.
6. Click class diagram -> using the tool box build the CLASS diagram.
Generate the coding form:
7. Right click component view -> component diagram -> open specification ->
select the sterotype as DLL-> select the language as visual basic -> switch from
general tab to realize tab -> select the classes you created in class diagram ->
right click-> assign ->ok.
8. Right click component view-> update code fro model -> the tool window for
converting diagram to code appears -> next -> finish -> the skeleton code in VB is
generated automatically for the class diagram designed.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE:
LOGIN FORM:
Private Sub Command1_Click()
If Combo1.Text = "ADMIN" And Text2.Text = "mca" Then
Form3.Show
ElseIf Combo1.Text = "SUPPLIER" And Text2.Text = "mca1" Then
Form3.Show
ElseIf Combo1.Text = "CUSTOMER" And Text2.Text = "mca2" Then
Form3.Show
Else
MsgBox "Invalid"
End If
End Sub
Private Sub Form_Activate()
Combo1.Clear
Combo1.AddItem "ADMIN"
Combo1.AddItem "SUPPLIER"
Combo1.AddItem "CUSTOMER"
End Sub
Private Sub Command2_Click()
End
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
MAIN FORM:
Dim db2 As Database
Dim rs2 As Recordset
Private Sub Command1_Click()
Form2.Show
End Sub
Private Sub Command2_Click()
Form4.Show
End Sub
Private Sub Command3_Click()
Form6.Show
End Sub
Private Sub Command4_Click()
If rs2.EOF = True Then
GoTo aa
End If
rs2.MoveFirst
While (True)
If rs2.EOF = False Then
Form6.Combo1.Text = rs2(0)
Form6.Label7.Caption = rs2(1)
Form6.Text1.Text = rs2(2)
Form6.Label8.Caption = rs2(3)
Form6.Label9.Caption = rs2(4)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Form6.Text2.Text = rs2(5)
Form6.Label11.Caption = rs2(6)
rs2.Delete
rs2.MoveNext
Else
GoTo aa
End If
Wend aa:
Form1.Show
End Sub
Private Sub Command5_Click()
Form8.Show
End Sub
Private Sub Command6_Click()
Form1.Show
End Sub
Private Sub Form_Activate()
If Form1.Combo1.Text = "ADMIN" and Form1. Combo1.Text = "SUPPLIER" Then
Command1.Visible = True
Command2.Visible = True
Command3.Visible = True
Command4.Visible = False
Command5.Visible = True
Command6.Visible = True
ElseIf Form1.Combo1.Text = "CUSTOMER" Then
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Command1.Visible = False
Command2.Visible = True
Command3.Visible = True
Command4.Visible = True
Command5.Visible = False
Command6.Visible = False
End If
End Sub
Private Sub Form_Load()
Set db2 = OpenDatabase("D:\Stock project_II_MCA\cdispatch.mdb")
Set rs2 = db2.OpenRecordset("cdispatch")
End Sub
STOCK DETAILS FORM:
Dim db As Database
Dim rs As Recordset
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.Save
MsgBox "record saved"
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.Delete
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
MsgBox "record deleted"
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.Update
MsgBox "record is modify"
End Sub
Private Sub Command5_Click()
Form3.Show
End Sub
Private Sub Command6_Click()
DataReport1.Show
End Sub
Private Sub Command7_Click()
Adodc1.Recordset.MoveNext
End Sub
Private Sub Command8_Click()
Adodc1.Recordset.MovePrevious
End Sub
Private Sub Text5_Change()
Text6.Text = Val(Text3.Text) * Val(Text5.Text)
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\Stock project_II_MCA\product.mdb")
Set rs = db.OpenRecordset("product")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SELECT ITEM DETAILS FORM:
Dim s As String
Dim rs As Recordset
Dim db As Database
Private Sub Combo1_Click()
s = Combo1.Text
rs.MoveFirst
While (True)
If rs(0) = s Then
Label6.Caption = rs(1)
Label7.Caption = rs(2)
Label8.Caption = rs(4)
GoTo product
Else
rs.MoveNext
End If
Wend
product:
End Sub
Private Sub Command1_Click()
Form3.Show
End Sub
Private Sub Form_Activate()
Combo1.AddItem ""
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Label6.Caption = ""
Label7.Caption = ""
Label8.Caption = ""
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\Stock project_II_MCA\product.mdb")
Set rs = db.OpenRecordset("product")
rs.MoveFirst
While (True)
Combo1.AddItem rs(0)
rs.MoveNext
If rs.EOF = True Then
GoTo aa
End If
Wend
aa:
End Sub
DISPATCH DETAILS FORM:
Dim db As Database
Dim rs As Recordset
Dim db1 As Database
Dim rs1 As Recordset
Dim db2 As Database
Dim rs2 As Recordset
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Dim s As String
Private Sub Combo1_Click()
s = Combo1.Text
rs.MoveFirst
While (True)
If rs(0) = s Then
Label7.Caption = rs(1)
Label8.Caption = rs(3)
Label9.Caption = rs(4)
GoTo product
Else
rs.MoveNext
End If
Wend
product:
End Sub
Private Sub Command1_Click()
rs1(0) = Combo1.Text
rs1(1) = Label7.Caption
rs1(2) = Text1.Text
rs1(3) = Label8.Caption
rs1(4) = Label9.Caption
rs1(5) = Text2.Text
rs1(6) = Label11.Caption
rs1.Update
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
rs2(0) = Combo1.Text
rs2(1) = Label7.Caption
rs2(2) = Text1.Text
rs2(3) = Label8.Caption
rs2(4) = Label9.Caption
rs2(5) = Text2.Text
rs2(6) = Label11.Caption
rs2.Update
While (True)
If rs(1) = Val(Label7.Caption) Then
rs.Edit
rs(2) = Val(rs(2)) - Val(Text1.Text)
rs(5) = Val(rs(5)) - Val(Label11.Caption)
rs.Update
GoTo aa
Else
rs.MoveNext
End If
Wend
aa:
MsgBox "Purchased"
End Sub
Private Sub Command2_Click()
Form3.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command3_Click()
Combo1.Text = ""
Label7.Caption = ""
Text1.Text = ""
Label8.Caption = ""
Label9.Caption = ""
Text2.Text = ""
Label11.Caption = ""
rs1.AddNew
rs2.AddNew
End Sub
Private Sub Command4_Click()
DataReport4.Show
End Sub
Private Sub Command5_Click()
DataReport3.Show
End Sub
Private Sub Form_Activate()
If Form1.Combo1.Text = "ADMIN" Then
Command3.Visible = False
Command5.Visible = True
Command4.Visible = False
Command1.Visible = False
Command2.Visible = True
ElseIf Form1.Combo1.Text = "SUPPLIER" Then
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Command5.Visible = True
Command4.Visible = False
Command3.Visible = False
Command1.Visible = False
Command2.Visible = True
ElseIf Form1.Combo1.Text = "CUSTOMER" Then
Command5.Visible = False
Command3.Visible = True
Command4.Visible = True
Command1.Visible = True
Command2.Visible = True
End If
rs1.AddNew
rs2.AddNew
Combo1.AddItem ""
Label7.Caption = ""
Label8.Caption = ""
Label9.Caption = ""
Label11.Caption = ""
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\Stock project_II_MCA\product.mdb")
Set rs = db.OpenRecordset("product")
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Set db1 = OpenDatabase("D:\Stock project_II_MCA\adispatch.mdb")
Set rs1 = db1.OpenRecordset("adispatch")
Set db2 = OpenDatabase("D:\Stock project_II_MCA\cdispatch.mdb")
Set rs2 = db2.OpenRecordset("cdispatch")
rs.MoveFirst
While (True)
Combo1.AddItem rs(0)
rs.MoveNext
If rs.EOF = True Then
GoTo aa
End If
Wend aa:
End Sub
Private Sub Text1_Change()
Label11.Caption = Val(Text1.Text) * Val(Label9.Caption)
End Sub
RETURN DETAILS FORM:
Dim db As Database
Dim rs As Recordset
Private Sub Command1_Click()
DataReport2.Show
End Sub
Private Sub Command2_Click()
Form3.Show
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End Sub
Private Sub Command3_Click()
While (True)
If rs(1) = Val(Text2.Text) Then
rs.Edit
rs(2) = Val(rs(2)) + Val(Text4.Text)
rs(5) = Val(rs(5)) + Val(Text6.Text)
rs.Update
GoTo aa
Else
rs.MoveNext
End If
Wend
aa:
Adodc1.Recordset.Update
MsgBox "Stock Returned "
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.AddNew
End Sub
Private Sub Form_Activate()
Set db = OpenDatabase("D:\Stock project_II_MCA\product.mdb")
Set rs = db.OpenRecordset("product")
End Sub
Private Sub Text5_Change()
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Text6.Text = Val(Text4.Text) * Val(Text5.Text)End Sub
OUTPUT:
ADMIN ENTRY
LOGIN FORM:
MAIN FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STOCK DETAILS:
SELECT ITEM DETAILS:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
RETURN STOCK DETAILS:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
CUSTOMER ENTRY
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
LOGIN FORM:
MAIN FORM DETAILS:
SELECT ITEM DETAILS:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
DISPATCH DETAILS:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.
EX.NO:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
DATE:
STUDENT INFORMATION SYSTEM
AIM:
To implement the Student information system using Rational Software.
ALGORITHM:
ALGORITHM FOR USE CASE DIAGRAM:
Step1: Identify the actors and use cases.
In the system, the actors and use cases are:
Actors: Student, system, and database.
Use cases: fill the input form, validity check, retrieve marks, calculation, and view and
total marks, percentage, and grade.
Step2: Build the relationship between actors and use cases.
The use case diagram for the student information system is given in Fig (1).
Fig (1): use case diagram for the student information system.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR SEQUENCE DIAGRAM:
Step1: Identify the objects.
In this system, the objects are student, system database and mark processing.
Step2: Fill the input form.
Step3: Store the details in database.
Step4: Perform the computation.
Step 5: Return the computed values to the database.
Step 6: Save the details in database.
Step7: Display the result.
The sequence diagram for student information system is given in fig (2).
fig (2): Sequence diagram for Student information
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
3. ALGORITHM FOR CLASS DIAGRAM:
Step1: Create class diagram for each identified objects under sequence diagram.
Identified objects are: User, system and database.
Step 2: Class diagram for each object is divided into three parts.
Top portion represents the class name.
Middle portion represents the attributes.
Bottom portion represents the methods.
The class diagram for student information system is shown in fig (3).
fig (3): The class diagram for student information system.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Procedure to write software for the student information system using rational software tool
Selecting the software:
1. Click startrational software rational rose enterprise edition.
Create the project:
2. In the create new model window select VB6 standard frameworkA screen appears;
select the untitled project from the
browser window and save it.
Draw the diagram:
3. Right click the use case viewNew use case diagramsequence diagramclass
diagram (name and save the files)
4. Click use case diagramusing the tool box build the use case diagram.
5. Click sequence diagramusing the tool box build the sequence diagram.
6. Click class diagramusing the tool box build the class diagram.
Generate the coding form:
7. Right click component view component diagramopen specificationselect the
stereotype as DLLselect the
language as visual basicswitch from general tab to release tabselect the classes
view created in class diagramright . clickassignok.
8. Right click component view Update code from modelthe tool window for
converting diagrams to code
Appearsnex9tfinishthe skeleton code in VB is generated automatically for class
diagram designed.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE:
LOGIN:
Private Sub Command1_Click()
If Combo1.Text = "student" And Text2.Text = "mca" Then
Form2.Show
Text2.Text = ""
Else
If Combo1.Text = "staff" And Text2.Text = "mca" Then
Form4.Show
Text2.Text = ""
Else
If Combo1.Text = "admin" And Text2.Text = "mca" Then
Form5.Show
Text2.Text = ""
Else
MsgBox ("Try Agin")
End If
End If
End If
End Sub
Private Sub Form_Load()
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Combo1.AddItem "staff"
Combo1.AddItem "student"
Combo1.AddItem "admin"
End Sub
STUDENT RECORD:
Dim DB As Database
Dim rs As Recordset
Dim a As Integer
Private Sub Command1_Click()
a = Val(Text1.Text)
While (True)
Form3.Show
If rs(0) = a Then
Form3.Label4 = rs(0)
Form3.Label10 = rs(1)
Form3.Label11 = rs(2)
Form3.Label12 = rs(3)
Form3.Label13 = rs(4)
Form3.Label14 = rs(5)
Form3.Label15 = rs(6)
GoTo aa
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Else
rs.MoveNext
End If
Wend
aa:
End Sub
Private Sub Command2_Click()
Text1.Text = ""
End Sub
Private Sub Command3_Click()
form1.Show
End Sub
Private Sub Form_Load()
Set DB = OpenDatabase("F:\mohan\New folder\student.mdb")
Set rs = DB.OpenRecordset("stu")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STUDENT RECORD VIEW:
Dim DB1 As Database
Dim rs1 As Recordset
Private Sub Command1_Click()
Form2.Show
End Sub
Private Sub Command2_Click()
DataReport1.Show
End Sub
Private Sub Form_Load()
Set DB1 = OpenDatabase("F:\mohan\New folder\student.mdb")
Set rs1 = DB1.OpenRecordset("stu")
End Sub
STUDENT INFORMATION:
Dim DB As Database
Dim rs As Recordset
Dim a As Integer
Dim b As Integer
Private Sub Command1_Click()
Data1.Recordset.AddNew
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command2_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
MsgBox "Record Saved"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = "”
Text6.Text = ""
Text7.Text = ""
End Sub
Private Sub Command3_Click()
a = Text3.Text
b = Text4.Text
Text5.Text = Val(a) + Val(b)
Text6.Text = Text5.Text / 2
If Val(a) > 50 And Val(b) > 50 Then
Text7.Text = "pass"
Else
Text7.Text = "fail"
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End If
a = 0
b = 0
End Sub
Private Sub Command5_Click()
form1.Show
End Sub
Private Sub Form_Load()
Set DB = OpenDatabase("F:\mohan\New folder\student.mdb")
Set rs = DB.OpenRecordset("stu")
End Sub
ADMIN:
Private Sub Command1_Click()
Form6.Show
End Sub
Private Sub Command2_Click()
Form7.Show
End Sub
Private Sub Command3_Click()
form1.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STAFF PERSONAL INFORMATION:
Private Sub Command1_Click()
Form5.Show
End Sub
Private Sub Command2_Click()
Data1.Recordset.AddNew
End Sub
Private Sub Command3_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
MsgBox "Record is saved"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STUDENT PERSONAL INFORMATION:
Private Sub Command1_Click()
Form5.Show
End Sub
Private Sub Command2_Click()
Data1.Recordset.AddNew
Data1.Recordset.Update
MsgBox "Record is saved"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
Private Sub Command3_Click()
Data1.Recordset.AddNew
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
OUTPUT:
LOGIN:
STUDENT SEARCH RECORD:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STUDENT RECORD VIEW:
DATA REPORT:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STUDENT INFORMATION:
ADMIN:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
STAFF PERSONAL DETAILS:
STUDENT PERSONAL DETAILS:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EX. NO:
DATE:
PAYROLL PROCESSING
AIM:
To Implement the Payroll Processing using Rational Software.
ALGORITHM:
1. ALGORITHM FOR USE CASE DIAGRAM:
STEP1: Identify the Actors and Use Cases.
In the system, actors and use cases are:
Actors: Employee, Administrator, System and Database.
Use cases: Employee details, validity check, payroll processing, view and print the salary
details.
STEP2: Build the relationship between actors and Use case.The use case diagram for the payroll
processing is given in Fig(1).
Fig(1):Use case diagram for the payroll processing
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
2. ALGORITHM FOR SEQUENCE DIAGRAM:
STEP 1: Identify the objects.
In this system, the objects are: Employee, Administrator, System and Database.
STEP 2: Identify the sequence of events.
STEP 3: Enter the employee ID.
STEP 4: Perform the computation.
STEP 5: Return the computed values to the database.
STEP 6: Save the details in database.
STEP 7: View and print the salary details.
The Sequence diagram for payroll processing is given in Fig (2).
Fig (2): Sequence diagram for payroll processing
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
3: ALGORITHM FOR CLASS DIAGRAM:
STEP 1: Create class diagram for each identified objects under sequence diagram.
Identified objects are: Employee, Administrator, System and Database.
STEP 2: Class diagram for each object is divided into three parts.
Top portion represents the class Name.
Middle portion represents the Attributes.
Bottom portion represents the Methods.
The Class diagram for Payroll Processing shown in Fig (3).
Fig (3):class diagram for payroll processing
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Procedure to write the software for the payroll processing using Rational software tool
Selecting the Software:
1.Click startRational SoftwareRational Rose Enterprise Edition.
Create the project:
2.In the Create New Model window select VB6 Standard FrameworkA screen appears;select the
untitled project from the browser window and save it
To draw the diagram:
3.Right Click the Use case viewNewUse case diagramSequence diagramClass diagram(name
and save the files)
4.Click Use case diagramUsing the tool box build the use case diagram.
5.Click Sequence diagramusing the tool box build the sequence diagram.
6.Click Class diagramUsing the tool box build the class diagram.
Generate the coding form:
7.Right click Component viewcomponent diagramopen specificationselect the Stereotype as
DLLSelect the language as Visual basicSwitch from General tab to Realizes tabSelect the
classes you created in class diagramright clickAssignOK.
8.Right click Component viewUpdate code from modelthe tool window for converting diagrams to
code appearsnextFinish the skeleton code in VB is generated automatically for the class diagram
designed.
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
SOURCE CODE:
LOGIN PROCESS:
Dim db As Database
Dim rs As Recordset
Private Sub Command2_Click()
Data1.Recordset.update
MsgBox "RECORDS ARE SUCCESSFULLY UPDATED"
End Sub
Private Sub Command3_Click()
admin.Show
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Visible = False
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\CASE TOOLS\emp.mdb")
Set rs = db.OpenRecordset("emp1")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
ADMIN PROCESS:
Dim db As Database
Dim rs As Recordset
Private Sub Form_Load()
Set db = OpenDatabase("D:\CASE TOOLS\emp.mdb")
Set rs = db.OpenRecordset("emp1")
End Sub
Private Sub Label2_Click()
addemp.Show
End Sub
Private Sub Label3_Click()
delete.Show
End Sub
Private Sub Label4_Click()
update.Show
End Sub
Private Sub Label5_Click()
login.Show
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
ADDING EMPLOYEE PROCESS:
Dim db As Database
Dim rs As Recordset
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
rs(0) = Text1.Text
rs(1) = Text2.Text
rs(2) = Text3.Text
rs(3) = Text4.Text
rs(4) = Text5.Text
rs(5) = Text6.Text
rs(6) = Text7.Text
rs(7) = Text8.Text
rs(8) = Text9.Text
rs(10) = Text10.Text
rs(9) = Text11.Text
rs.update
MsgBox "RECORD IS ADDED"
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command3_Click()
admin.Show
End Sub
Private Sub Command4_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
rs.AddNew
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Visible = False
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\CASE TOOLS\emp.MDB")
Set rs = db.OpenRecordset("emp1")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Text8_Change()
Text9.Text = 2 / 100 * Val(Text8.Text)
Text10.Text = 4 / 100 * Val(Text8.Text)
Text11.Text = Val(Text8.Text) + Val(Text9.Text) - Val(Text10.Text)
'Text5.Text = 12 / 100 * Val(Text3.Text)
End Sub
DELETING PROCESS:
Dim db As Database
Dim rs As Recordset
Private Sub Command1_Click()
Adodc1.Recordset.delete
MsgBox "Record deleted"
Text1.Text = ""
End Sub
Private Sub Command2_Click()
admin.Show
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Visible = False
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Form_Load()
Set db = OpenDatabase("D:\CASE TOOLS\emp.mdb")
Set rs = db.OpenRecordset("emp1")
End Sub
UPDATING PROCESS:
Dim db As Database
Dim rs As Recordset
Private Sub Command2_Click()
Data1.Recordset.update
rs(0) = Text1.Text
rs(1) = Text2.Text
rs(2) = Text3.Text
rs(3) = Text4.Text
rs(4) = Text5.Text
rs(5) = Text6.Text
rs(6) = Text7.Text
rs(7) = Text8.Text
rs(8) = Text9.Text
rs(10) = Text10.Text
rs(9) = Text11.Text
MsgBox "RECORDS ARE SUCCESSFULLY UPDATED"
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
End Sub
Private Sub Command3_Click()
admin.Show
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
rs.Edit
rs(0) = Text1.Text
rs(1) = Text2.Text
rs(2) = Text3.Text
rs(3) = Text4.Text
rs(4) = Text5.Text
rs(5) = Text6.Text
rs(6) = Text7.Text
rs(7) = Text8.Text
rs(8) = Text9.Text
rs(10) = Text10.Text
rs(9) = Text11.Text
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Visible = False
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\CASE TOOLS\emp.mdb")
Set rs = db.OpenRecordset("emp1")
End Sub
SEARCH EMPLOYEES FORM:
Dim db As Database
Dim rs As Recordset
Dim a As Integer
Private Sub Command1_Click()
'a = Form9(rs(0))
rs.MoveFirst
While (True)
If Val(Text1.Text) = Val(rs(0)) Then
empdetails.Show
empdetails.Label2.Caption = rs(0)
empdetails.Label10.Caption = rs(1)
empdetails.Label11.Caption = rs(2)
empdetails.Label12.Caption = rs(3)
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
empdetails.Label13.Caption = rs(4)
empdetails.Label14.Caption = rs(5)
empdetails.Label15.Caption = rs(6)
empdetails.Label17.Caption = rs(7)
empdetails.Label19.Caption = rs(8)
empdetails.Label23.Caption = rs(10)
empdetails.Label21.Caption = rs(9)
GoToaa
Else
rs.MoveNext
End If
Wend
aa:
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Visible = False
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
Private Sub Command3_Click()
admin.Show
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\CASE TOOLS\emp.MDB")
Set rs = db.OpenRecordset("emp1")
End Sub
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
OUTPUT:
ADMIN LOGIN FORM:
ADMINISTRATOR FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EMPLOYEE FORM:
DELETE FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
UPDATE FORM:
EMPLOYEE ADMIN FORM:
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V+ TEAM
EMPLOYEE SEARCH FORM:
EMPLOYEE DETAILS:
RESULT:
Thus the above program has been successfully completed and drawn in Rational Rose.