You are on page 1of 148

1

RATIONAL ROSE

Rational Machines were founded by Paul Levy and Mike Devlin in 1981
to provide tools to expand the use of modern software engineering
practices, particularly explicit modular architecture and iterative
development. Rational was sold for $2.1B to IBM on February 20, 2003.

DEFINITION

Rational Rose is an Object Oriented Unified modeling language (UML)


software design tool intended for visual modeling and component
construction of enterprise-level software applications. In much way a
theoretical director blocks out a play, a software designer use. Rational
Rose to visually create (model) the framework for an application by
blocking out classes with actors (stick figures), use case elements (ovals),
objects (rectangles) and messages/relationships (arrows) in a sequence
diagram using drag-and- drop symbols. Rational rose documents the
diagram as it is being constructed and then generates code in the designer’s
choice of C++, Visual Basic, Java, Oracle 8, CORBA or Data Definition
language.

CONTENTS

1. Rational Environment
2. UML and RUP

3. Features
2

RATIONAL ENVIRONMENT

Released in 1985, the Rational Environment was an integrated


development environment for the Ada programming language, which
provided good support for abstraction through strong typing. Its goal was to
provide the productivity benefits. Associated with academic single-user
programming environments to teams of developers developing mission-
critical applications that could execute on a range of computing platforms.

The Rational Environment ran on custom hardware, the Rational R1000,


which implemented a high-level architecture optimized for execution of
Ada programs in general and the Rational Environment in particular. The
horizontally-micro programmed R1000 provided two independent 64-bit
data paths, permitting simultaneous computation and type checking.
Memory was organized as a single-level store; a 67-bit virtual address
presented to the memory system either immediately returned data, or
triggered a page fault handled by the processor‟s microcode. The
company‟s name was later changed from “Rational Machines” to Rational
to avoid emphasizing this proprietary hardware.

UML
In 1994,Rational acquired Verdix, a public company that produced a wide
array of Ada compilers targeted to many architecture OS combinations. The
resulting entity was named “Rational Software”, and promptly integrated
the Rational Ada and C++ environments with the code generators and
runtimes developed by Verdix.
3

In 1995,James Rum Baugh joined the company, and Rational acquired Ivar
Jacobson‟s from objectory AB from Ericsson. With Grady Booch already
aboard, this brought within one company all three leading object-oriented
software methodologist: these three Amigos were immediately tasked with
the unification of their work to eliminate the method fragmentation that was
impeding commercial adoption of modeling tools, their Unified Modeling
Language (UML) was developed openly, providing a level playing field for
all tool vendors. At its 1.0 release, the Unified Modeling Language was
contributed to the Object Management group which has managed its
subsequent development.

FEATURES

Two popular features of Rational Rose are it ability to provide iterative


development and round-trip engineering, Rational Rose allows designers to
take advantages of iterative development(sometimes called evolutionary
development) because the new application can be created in stages with the
output of one iteration becoming the input to the next.(this is in contrast to
waterfall development where the whole project is completed from start to
finish before a user gets to try it out).Then, as the developer begins to
understand how the components interact and makes modifications in the
design. Rational Rose can perform what is called “round=trip engineering”
by going back, and updating the rest of the model to ensure the code
remains consistent. Rational Rose is extensible, with downloadable add-ins
and third-party partner applications. It supports COM/DCOM (ActiveX),
JavaBeans and CORBA component standards.

UML DIAGRAMS
4

USE-CASE DIAGRAM

A use case diagram is a type of behavioral diagram defined by the Unified


Modeling Language (UML) and created from a Use-case analysis.

Its purpose is to present a graphical overview of the functionality provided


by a system in terms of actors, their goals (represented as use cases), and
any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actors.
Roles of the actors in the system can be depicted.
5

CLASS DIAGRAM

In the Unified Modeling Language (UML), a class diagram is a type of


static structure diagram that describes the structure of a system by showing
the system's classes, their attributes, and the relationships between the
classes. Class diagrams also display relationships such as containment,
inheritance, associations and others. The association relationship is the most
common relationship in a class diagram. The association shows the
relationship between instances of classes. The multiplicity of the
association denotes the number of objects that can participate in then
relationship. Another common relationship in class diagrams is a
generalization. A generalization is used when two classes are similar, but
have some differences.
6

SEQUENCE DIAGRAM

A Sequence diagram depicts the sequence of actions that occur in a system.


The invocation of methods in each object, and the order in which the
invocation occurs is captured in a Sequence diagram. This makes the
Sequence diagram a very useful tool to easily represent the dynamic
behavior of a system. A Sequence diagram is two-dimensional in nature.
On the horizontal axis, it shows the life of the object that it represents,
while on the vertical axis, it shows the sequence of the creation or
invocation of these objects. Because it uses class name and object name
references, the Sequence diagram is very useful in elaborating and detailing
the dynamic design and the sequence and origin of invocation of objects.
Hence, the Sequence diagram is one of the most widely used dynamic
diagrams in UML.

COLLABORATION DIAGRAM
7

A Collaboration diagram is very similar to a Sequence diagram in the


purpose it achieves; in other words, it shows the dynamic interaction of the
objects in a system. A distinguishing feature of a Collaboration diagram is
that it shows the objects and their association with other objects in the
system apart from how they interact with each other. The association
between objects is not represented in a Sequence diagram.A Collaboration
diagram is easily represented by modeling objects in a system and
representing the associations between the objects as links. The interaction
between the objects is denoted by arrows. To identify the sequence of
invocation of these objects, a number is placed next to each of these arrows.

ACTIVITY DIAGRAM
8

An activity diagram is a diagram that shows activities and actions to


describe workflows. In the Unified Modeling Language an activity diagram
represents the business and operational step-by-step workflows of
components in a system. An activity diagram shows the overall flow of
control.

1.STUDENT MARK ANALYSIS

1. Preamble:
9

The Student Mark Analysis program makes the process of mark analysis in
colleges easier and more convenient. The staff can check the student’s details and
automatically view the mark sheet of the student. And also they can calculate the
average, total in an easy and efficient manner.

2. Objectives:

 To implement Student Mark Analysis in an efficient and effective manner.


 To maintain the student database.
 Time taken to perform the above will be less than 10 seconds.
 Error free calculation of mark with less time.

3. Requirements:
Student Mark Analysis can be developed using waterfall model.

3.1 : Software Requirements:

1. Design: Rational Rose


2.Development: Visual Basic 6.0, MS Access
3.Testing: manual

3.2: Hardware Requirements:

1.Intel Celeron or above


2.128 mb RAM
3.300 mb free space

4.Design :

4.1. CLASS DIAGRAM:


10

U n i v e r s i t y d e t a i l s
S t u d e n t n a m e n a m e
N a m e d e p t i d
R o l l n o
D e p a r m e n t s e a r c h ( ) a d d ( )
l o g i n ( ) r e s p o n s e ( )
d i s p l a y ( ) m o d i f y ( )

m a r k
C e t i fi c a t i o n s t a f m a r k a n a l y s i s
s u b 1
d e g r e e d e p t N a m e
s u b 2
c o u r s e p o s t R o l l n o
s u b 3
y r n a m e
s u b 4
s e m u s e r n a m e A v e r a g e ( )
s u b 5
T o t a l ( )
s t u d d e t a i l ( ) s t a ffd e t a i l ( )
T o t a l ( )

4.2. USE CASE DIAGRAM:


11

r e q u e s t m a r k s h e e t

s t a f f d i s p l a y s t u d e n t

l o g i n

M a r k E n t r y

s e a r c h

d e t a i l

a d d
U n i v e r s i t y

LOGIN MODULE:
12

4.3. SEQUENCE DIAGRAM:

staff details

enter id & password

checks for validity


if returns the response if id and password matches

if it is invalid it shows error


search using name

if shows matching name if it is there checks for validity

if its not i shows not found

4.4. COLLABORATION DIAGRAM:

2: checks for validity


6: checks for validity

1: enter id & password


5: search using name
staff details

3: if returns the response if id and password matches


4: if it is invalid it shows error
7: if shows matching name if it is there
8: if its not i shows not found

STUDENT DETAILS:
13

4.5. SEQUENCE DIAGRAM:

Staff Details

submit roll no for student

Checking details
it responds if it is available
otherwise error

if rollno is not known search using name


it responds if it is available checks for validity

otherwise error

4.6. COLLABORATION DIAGRAM:

6: checks for validity

1: submit rollno for student details


5: if rollno is not known search using name
Staff Details

3: it responds if it is available
4: otherwise error
7: it responds if it is available
8: otherwise error

MARKSHEET MODULE:
14

4.7 SEQUENCE DIAGRAM:

details s taff s tudent

Res pond with M .s

dis play m ark s heet

4.8. COLLABORATION DIAGRAM:

1 : Re sp o n d w ith M .s 2 : d i sp la y m a rk sh ee t
d e ta ils s ta ff s tu d e n t

4.9. STATE CHART DIAGRAM:

login search
module

display
end module

4.10. ACTIVITY DIAGRAM:


15

start

login

no

validate

yes

reqmarrksh search using


eet name

sound no Error no sound

display
marksheet

stop

4.11. COMPONENT DIAGRAM:


16

stu db

mark
db staff
db

mark

4.12. DEPLOYMENT DIAGRAM:

ODBC CONNECTIVITY

11
db 1111 staff

odbc connectivity

5. Implementation:

5.1. Modules:
5.1.1. Login:
It checks whether entered id is correct and checks whether it
matches with password.

5.1.2. Student Details:


The staff searches the student details using roll no and if it matches is shows the details
of that particular student.

5.1.3. Mark Sheet:


It shows the marks of student and also we can calculate total and
percentage.

5.2. Issues faced :


5.2.1. Two or more students having the same name(search using name).
5.2.2. Wrong entries of student and mark details.

5.3. Coding :
17

Form1:
Private Sub Command1_Click()
Adodc1.Refresh
Do Until Adodc1.Recordset.EOF
If (Adodc1.Recordset.Fields("username") = Text1.Text) Then
If (Adodc1.Recordset.Fields("password") = Text2.Text) Then
Form1.Hide
Form2.Show
End If
End If
Adodc1.Recordset.MoveNext
Loop
End Sub

Form2:
Private Sub Command1_Click()

Adodc1.Recordset.AddNew

End Sub

Private Sub Command2_Click()


Adodc1.Recordset.Save
End Sub

Private Sub command3_Click()


Adodc1.Recordset.Save
Adodc1.Refresh
Do Until Adodc1.Recordset.EOF
Form2.Hide
Form3.Visible = True
Adodc1.Recordset.MoveNext
Loop

Form3.Text13.Text = Text7.Text

End Sub

Private Sub Command4_Click()


Adodc1.Recordset.Find ("rollno='" & Text7.Text & "'")

End Sub
Private Sub Form_Load()
Text2.Text = ""
18

End Sub

Form3:

Private Sub Command1_Click()


Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()


Text11.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) +
Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) +
Val(Text9.Text) + Val(Text10.Text)

Text12.Text = (Val(Text11.Text) / 800) * 100


End Sub

Private Sub command3_Click()


Adodc1.Recordset.Find ("rollno = '" & Text13.Text & "'")
End Sub

Private Sub Form_Load()

Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub

OUTPUT:
Login form:
19

Student details form:

Marksheet ;
20

6. Testing :
Manual testing was done. Staff were asked to analyse the students details. Staff
gave their comments and feedback after analysing. Their comments and feedbacks were
takn into consideration and further improvement was done on the system accordingly.

7. Conclusion and result :


This project describes our experiences in designing, developing and
implementing Student Mark Analysis. This system has not only reduced the burden of
manual work but also improved the process by reducing errors and by maintaining data
integrity and consistency, thereby making it a more convenient one.

2. COMPUTERIZED QUIZ SYSTEM


21

1.Preamble:

A Computerized Quiz System can conduct quizzes in a faster and efficient


manner. The system interacts with the participant thereby eliminating the need for a host
to conduct the quiz. The participant enjoys the same privileges as in a quiz conducted
orally.

2.Objectives:

 To implement the quiz system in an effective and efficient manner.

 To maintain the registration database.

 To retrieve the questions and options from the database and view it in an
efficient way.

 To calculate and display the score for each level.

If a quiz conducted orally takes 20 minutes then a computerized quiz can finish it in 5
minutes.

3.Requirements:
A Computerized Quiz System can be developed using the waterfall or linear
sequential model. It progresses through analysis, design, coding, testing and support.

3.1 Hardware Requirements:


1. Pentium 4 Processor

2. 512MB RAM

3. 1GB Hard Disk

3.2 Software Requirements:


1. Design: Rational Rose

2. Coding and Development: Visual Basic 6.0, MS-Access


22

3. Testing: Manual Testing

4. Design
4.1 Class Diagram:

L e ve l 1 L e ve l 2 L e ve l 3
Q u e s ti o n n o Q u e s ti o n n o Q u e s ti o n n o
P a rtic ip a n t Q u e s ti o n s
Q u e s ti o n s Q u e s ti o n s
Nam e O p ti o n s O p ti o n s O p ti o n s
C o n ta c t n o .
S ta t u s ( ) S ta t u s ( ) S ta t u s ( )
R e g is t e r ( ) S c o re ( ) S c o re () S c o re ()
N e x t( ) N e x t( ) N e x t( )

4.2 Use Case Diagram:

Login&Register
register

Pla
y

Lev
els
u
ser
An
swe
r

Calc
u late&DisplaySc
o re

4.3 Sequence & Collaboration Diagrams:

4.3.1 Register Module


1. Sequence Diagram:

User Register Level1

Login & Register

Invalid login
Play
23

2.Collaboration Diagram:

1: Login&Register
User Register

2: Invalidlogin

3: Play
Level1

4.3.2 Level 1 Module:

1. Sequence Diagram:
User Level 1 Level2

Play

DisplayQuestions

Answer Questions Continueif score>10


Exit for score<10

DisplayScore

2. Collaboration Diagram:
1: Play
3: Answer Questions Level 1

User
2: Display Questions 4: Continue if score>10
5: Exit for score<10
6: Display Score

Level2

4.3.3 Level 2 Module:


24

1. Sequence Diagram:

User Level2 Level3

Play
Display Questions
Answer Questions Continue if score>20
Exit for score<20
Display Score

2. Collaboration Diagram:
1: Play
3: Answer Questions
Level2
User

2: Display Questions
5: Exit for score<20
6: Display Score

4: Continue if score>20

Level3

4.3.4 Level 3 Module:

1. Sequence Diagram:
U
ser L
eve
l3

P
la
y
D
is
pla
yQu
estio
ns

A
nswe
rQu
estio
ns
D
is
pla
ySc
ore
E
xit

2. Collaboration Diagram:
25

1: Play
3: Answer Questions
User Level3

2: Display Questions
4: Display Score
5: Exit

4.4 State-Chart Diagram:


L o g g e d in L e ve l 1
S ta rt

F i n i sh L e ve l 3 L e ve l 2

4.5 Activity Diagram:

Start

Login

Register

Logge
din

Pla
y

Lev
el1

IfScore<10

No
Lev
el2

Yes
IfScore<20

No
Lev
el3 Yes

Exit

F
inish

4.6 Component Diagram:


26

Quiz. ODBC
mdb Quiz.e
Connectivity xe

4.7 Deployment Diagram:


MS-Acce
Visual
ss ODBC
Basic

5. Implementation:

5.1 Modules:

5.1.1 Login and Register:


Registers the participant and allows him/her to play.

5.1.2 Level 1:
This module has 5 questions and 4 options for each question. The score is displayed
once all the questions in the level are answered. The participant must score above ten to
move on to the next level.
5.1.3 Level 2:
This is the same as Level 1 but the participant must score above 20 to move on to the
next level.
5.1.4 Level 3:
Same as level 1 and the final score is displayed.

5.2 Issues Faced:


5.2.1 Compulsory registration of the participant.
5.2.2 Answering a question more than once.
5.2.3 Highlighting the right and wrong answers using different colors.
5.2.4 Error free calculation of the score.

5.3 Coding:
Coding shown only for Login, Register, Instructions, Level 1 and Exit.

Form 1 (Login.frm):

Private Sub Login_Click()


Form1.Hide
Form2.Show
End Sub
27

Form 2 (Registration.frm):
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset

Private Sub Register_Click() //Command Button


If Text1.Text = " " Or Text2.Text = " " Or Text3.Text = " " Then
MsgBox ("Register before playing the game")
Else
rs.AddNew
rs.Fields("User Name") = Text1.Text
rs.Fields("Name of the coll") = Text2.Text
rs.Fields("Contact No") = Text3.Text
rs.Update
rs.Close
Unload Me
Form3.Show
End If
End Sub

Private Sub Form_Load()


con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=register.mdb;Persist Security Info=False "
con.Open
rs.Open "select * from reg", con, adOpenDynamic, adLockOptimistic
End Sub

Form 3 (Instructions.frm):

Private Sub PLAY_Click()


Form3.Hide
Form4.Show
End Sub

Form 4 (Level 1.frm):


Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim a As New ADODB.Connection
Dim b As New ADODB.Recordset
Dim d As Integer

Private Sub Next_Click()


rs.MoveNext
If rs.EOF = True Then
If d < 10 Then
a.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=score.mdb;Persist Security Info=False "
a.Open
b.Open "select * from Table1", a, adOpenDynamic, adLockOptimistic
28

b.AddNew
b.Fields(1) = d
b.Update
a.Close
MsgBox "your score is " + Str(d), vbOKOnly + vbExclamation
MsgBox ("Game Over")
Form4.Hide
Form8.Show
Else
a.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=score.mdb;Persist Security Info=False "
a.Open
b.Open "select * from Table1", a, adOpenDynamic, adLockOptimistic
b.AddNew
b.Fields(1) = d
b.Update
a.Close
MsgBox "your score is " + Str(d), vbOKOnly + vbExclamation
Form4.Hide
Form5.Show
End If
Else
Text1.Text = rs("Q no")
Text2.Text = rs("Q")
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option1.BackColor = &H8000000F //BackColor-Button Face
Option2.BackColor = &H8000000F
Option3.BackColor = &H8000000F
Option4.BackColor = &H8000000F
Option1.Caption = rs("a")
Option2.Caption = rs("b")
Option3.Caption = rs("c")
Option4.Caption = rs("d")
Option1.Visible = True
Option2.Visible = True
Option3.Visible = True
Option4.Visible = True
End If
End Sub

Private Sub Form_Load()


con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=level1.mdb;Persist Security Info=False "
con.Open
rs.Open "select * from lev1", con, adOpenDynamic, adLockOptimistic
29

Text1.Text = rs("Q no")


Text2.Text = rs("Q")
Option1.Caption = rs("a")
Option2.Caption = rs("b")
Option3.Caption = rs("c")
Option4.Caption = rs("d")
Option1.Visible = True
Option2.Visible = True
Option3.Visible = True
Option4.Visible = True
End Sub

Private Sub Option1_Click()


If Text1.Text = 1 And Option1.Value = True Then
Option2.Visible = False
Option3.Visible = False
Option4.Visible = False
Option1.BackColor = vbGreen
d=d+5
Else
Option2.Visible = False
Option3.Visible = False
Option4.Visible = False
Option1.BackColor = vbRed
d=d+0
End If
End Sub

Private Sub Option2_Click()


If (Text1.Text = 2 Or Text1.Text = 5) And Option2.Value = True Then
Option1.Visible = False
Option3.Visible = False
Option4.Visible = False
Option2.BackColor = vbGreen
d=d+5
Else
Option1.Visible = False
Option3.Visible = False
Option4.Visible = False
Option2.BackColor = vbRed
d=d+0
End If
End Sub

Private Sub Option3_Click()


If Text1.Text = 4 And Option3.Value = True Then
Option1.Visible = False
Option2.Visible = False
30

Option4.Visible = False
Option3.BackColor = vbGreen
d=d+5
Else
Option1.Visible = False
Option2.Visible = False
Option4.Visible = False
Option3.BackColor = vbRed
d=d+0
End If
End Sub

Private Sub Option4_Click()


If Text1.Text = 3 And Option4.Value = True Then
Option1.Visible = False
Option2.Visible = False
Option3.Visible = False
Option4.BackColor = vbGreen
d=d+5
Else
Option1.Visible = False
Option2.Visible = False
Option3.Visible = False
Option4.BackColor = vbRed
d=d+0
End If
End Sub

Form 7 (Exit.frm):

Private Sub exit_Click()


Unload Me
End Sub

Form 8 (Exit1.frm):

Private Sub Exit_Click()


Unload Me
End Sub

OUTPUT:
31

Tables :
32

Register.mdb(Table Name: reg)

level1.mdb(Table Name:lev1)

Score.mdb(Table Name:Table1)

6. Testing:
Manual Testing was done. Students were asked to play the quiz. Their comments and
feedback were collected and further developments were done based on the collected
feedback.

7. Result and Conclusion:


This project describes our experiences in analyzing, designing, developing and
implementing the computerized quiz system. This system has not only reduced the
burden of manual work but also improved the process by reducing the errors and by
making the process faster.
33

3.ONLINE TICKET RESERVATION SYSTEM


1. Preamble:

TRS is an online Railway Ticket Reservation System that facilitates passengers


to book or cancel their booked tickets online. It avoids long queues in Railway
reservation counters and saves the time of the passenger.TRS provides user-friendly
and easy to use steps that requires simple form filling.

2. Objectives:
 To implement TRS in an efficient and effective manner.
 To maintain railway database.
 To provide 24 x 7 service to the passengers.
 To provide the user a fail-safe system.
 To facilitate passenger
 To know the available seats .
 To reserve available ticket.
 To cancel a reserved ticket.

3. Requirements:
TRS can be developed using waterfall or linear sequential model.
A passenger can reserve a ticket only if it is available and can cancel a ticket only if the
ticket is reserved already.

3.1 : Software Requirements:

1.Design: Rational Rose


2.Development: Visual Basic 6.0, MS Access
3.Testing: manual

3.2 : Hardware Requirements:


1.Intel Celeron or above
2.128 mb RAM
3.300 mb free space
34

4. Design :
4.1 USE CASE DIAGRAM

reserve

payment

passenger
database
print

cancel

4.2. CLASS DIAGRAM

payment
passenger
CCNO
Name PIN
Age Name
Sex Amount
reserve() pay()
cancel()

Booking

datababe print()
Train Name
Train no
src
dest
date reservation cancellation
time
update() update()

RESERVATION:
35

4.3. SEQUENCE DIAGRAM

passenger system bank database

passenger and train details check availability

valuate

return availability

display availabilty

ask for payment

payment

send the details to db

update

return pnr

print the ticket


36

4.4. COLLABORATION DIAGRAM:

1: passenger and train details


passenger system

5: display availabilty
2: check availability 3: valuate
11: print the ticket
8: send the details to db 9: update

7: payment
6: ask for payment 4: return availability
10: return pnr

database

bank

CANCELLATION:

4.5. SEQUENCE DIAGRAM

passenger system database

Enter the pnr number

send the detail

update

return information

intimate cancellation
37

4.6. COLLABORATION DIAGRAM:

1: E nter the pnr num ber


pas s enger s y s tem

5: intim ate c anc ellation

4: return inform ation

3: update 2: s end the detail

databas e
38

4.7. ACTIVITY DIAGRAM:

Choose RESVor
CANCELLATION

Cancellation
Reservation

Provide Passenger Info

Provide
PNRNum
Provide Destination,
Source, Date
Checkresv

Request DBfor list


of appropriate trains Confirm
Cancellation

Searching for trains


matching given criteria Refund money

Display list to
user
Unblockseat

Select
Train

Check
availabilty

If No

Perform
Payment

Issue to ticket
to passenger

Display ticket

Askfor
Confirmation

Confirm

Print
39

4.8. STATE CHART DIAGRAM

On lin e

Retrieve
Retrieve
P NR
P as s enger Info

S earc h S earc h
train P NR

Choos e
Train Refund

Chec k A vb

Unbloc k
Confirm
Train

Display
Info

P ay m ent

P rinting
40

4.9. COMPONENT DIAGRAM


passenger
db

VB.exe
file ODBC Bank db
connectivity

train db

4.10. DEPLOYMENT DIAGRAM

Bank

Client

Server

Database

5. Implementation:

5.1. Modules:

5.1.1. Module 1: Passenger details form (Form2.vb of)


This module requires adequate form design and connectivity to a database that can store
Passenger’s Personal details and Credit Card details. Database connectivity is achieved
by DataSet1, PassengerBindingSource. The module receives data from the user and
saves the data in a database (Table: Passenger of TRS.mdb).
41

5.1.2. Module 2: Train selection form (Form3.vb)


This module is designed in such a way that the user can select the train that he/she
wishes to travel. However, the train selection is restricted to the number of trains entered
and updated in the server’s train database. This limitation extends to the date and time
the passenger travels. Database connectivity is achieved by DataSet2,
TrainBindingSource. The module gets data from the database, displays it to the user.
The user gives the necessary details/input. (Table: Train – of TRS.mdb)

5.1.3.Module 3: Itinerary description (Form4.vb)


Data from Module1 and Module2 is assimilated in Module3. All the data is assembled to
create a travel itinerary of the user/passenger combining personal data and train details.
Database connectivity is achieved by DataSet3 and travelBindingSource.

5.1.4.Module 4: Payment and printing


With the information gathered so far, the application connects to the bank database.
With the Credit Card information provided the payment is made. Payment and printing
of ERS with all necessary details is made possible in this module. Connectivity to bank
database and other user information is required.

5.1.5.Module 5: Cancellation (form6.vb)


This form is accessed from the Welcome form. It requests the user for PNR number that
is known to the user during the reservation process and is also referred to as ID as it is
also the passenger table Primary Key. The Application searches the database for the ID
and displays the details of the user for validation. Then the user confirms cancellation.
Database connectivity is achieved by DataSet1.

5.2. Issues faced :

5.2.1. Reserving a seat in train that does not exist.

5.2.2. Reserving a ticket that is not available.

5.2.3. Payment towards the ticket may fail.


42

CODING:

RESERVATION

Private Sub Combo1_Change()


End Sub
Private Sub List1_Click()
End Sub
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
End Sub
Private Sub Form_Load()
End Sub
Private Sub reserve_Click()
End Sub
Private Sub Text3_Change()
End Sub

CANCELLATION

Private Sub Command1_Click()


Adodc1.RecordSet.new()
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Label2_Click()
End Sub
Private Sub Text2_Change()
End Sub
Private Sub Text3_Change()
End Sub

LOGIN

Private Sub Text1_Change()


End Sub
Private Sub L_Click()
Adodc1.Recordset.Open
End Sub
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
End Sub
Private Sub Label1_Click()
43

End Sub
Private Sub login_Click()
If Text1.username = "hindustan" And Text1.password = "admin" Then
frmRes.Show
Else
MsgBox "UserName or Password not found"
End If
End Sub

Reservation form
44

Cancellation form
45

Login form

Bank payment
46

6.Testing :
Manual testing was done. Users are asked to reserve tickets and cancel their ticket
and their comments and feedback were obtained. Their comments and feedbacks were
taken into consideration and further improvement was done on the system accordingly.

7.Conclusion and result :


This project describes our experiences in designing, developing and
implementing Ticket Reservation System. This system has not only reduced the burden
of manual work but also improved the process by reducing errors and by maintaining
data integrity and consistency, thereby making it a more convenient one.

4.PAYROLL SYSTEM
47

1. Preamble
The scenario for giving payslip to an employee was employed by manpower and
papers. Manpower was used for calculating the salary and papers were used in
documentation. The various drawbacks in the above procedure were
 Using manpower may lead to mathematical error in calculations
 Papers can’t be used as a temporary storage

3. Objective

The main objective of the payroll system is to calculate the salary of an


employee and to retrieve it whenever it is been needed. The system has
to allow only the authorized user to get details from it.

The system has to display an error message if any unauthorized users try to
access the system.

3. Requirements

3.1 Hardware requirements

1. Intel Pentium IV processor


2.2GB RAM
3.40 GB Hard Disk

3.2 Software requirements

3.2.1 Design
Rational Rose Enterprise Edition 2000

3.2.2 Development
Visual Basic 6.0
Microsoft Office Access 2003

3.2.3 Testing
Manual Testing

4. Design

4.1 Class Diagram


48

company
empname
id
contactno

update()

employee
netpay
empname
id
basicpay
designation hra
address da
netpay other

calc() calc()

empdatabase empsystem
id empname
empname id
basicpay netpay
hra
da update()
other display()
add()
remove()
display()

4.2 Use Case Diagram

s ys tem
query

adm inis trator


search calculate
user

update

display
databas e

4.3 Sequence Diagram


49

4.3.1 Login

user system database

enter login details

verify password

search

validated

confirm

4.3.2 Add or Remove

user system database

query

add or remove

confirm updation

display

4.3.3 Calculate
50

user system database

query

request

calculate

response

display

4.4 Collaboration Diagram

4.4.1 Login
1. enter login details
user system

5. confirm
2. verify password 3. search

4. validated

databas
e
4.4.2
Add or Remove

1. query
user system

4. display 2. add or remove

3. confirm updation
databas
e

4.4.3 Calculate
51

1. query
user system

5. display

2. request
3. calculate

4. response

databas
e

4.5 State Chart Diagram

login

enter username
and password

logged in

search or
calculate

type the type the


employee id employee details

searching from calculate the


database netpay

record netpay
found found

display display the


netpay

logout

4.6 Activity Diagram


52

login

logged in

query to add or query to search


remove

add or remove search

confirm display

logout

4.7 Component Diagram

V B .e x ODBC M S Acce s s
e file C o n n e c ti vity D a ta b a s e

4.8 Deployment Diagram

e m p lo ye s y s te m D a ta b a s
e e

5. Implementation
5.1 Modules
53

5.1.1 Login
This module is used to verify the password. It will load the next form if the
password is correct or else it will display an error message to re-enter the password.

5.1.2 Add
This module is designed to add data of a new employee into the database. This
option is available only for administrator. It requires a database connectivity which is
achieved through adodc control.

5.1.3 Remove
This module is designed to remove the data of an employee from the database
who has resigned their job. This option is also available only for administrator. It
requires a database connectivity which is achieved through adodc control.

5.1.4 Calculate
This module will get data from the form and then calculate the netpay of an
employee. The calculated netpay is stored in the employee database. Adodc control is
used to achieve the database connectivity.

5.1.5 View
This module is used to view the details and calculated netpay of an employee.
This form will interact with the user by asking the employee ID. It will then search the
database and display the required details of an employee.

5.1.6 Logout
This module is used to unload the form. It will display the confirmation message.
It doesn’t need any database connectivity. It will unload all forms.

5.2 Issues Faced

• Updating salary of the employee periodically.

• Inserting a new employee record into the database.

• Authenticating the users.

5.3 Coding
54

Form1

Private Sub Command1_Click()


Form1.Hide
Formadmin1.Show
End Sub

Private Sub Command2_Click()


Form1.Hide
Formemp1.Show
End Sub

Formadmin1

Private Sub cmdCancel_Click()


Me.Hide
End Sub

Private Sub cmdOK_Click()


If txtPassword = "adminadmin" Then
Me.Hide
Formadmin2.Show
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub

Formadmin2

Private Sub Command1_Click()


Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
MsgBox "Record added", vbInformation, "Information"
End Sub

Private Sub Command2_Click()


Adodc1.Recordset.Delete
MsgBox "Record deleted", vbInformation, "Information"
End Sub
55

Private Sub Command3_Click()


Text6.Text = Val(Text5.Text) * 0.1224
Text7.Text = Val(Text5.Text) * 0.15
Text8.Text = Val(Text5.Text) * 0.25
Text9.Text = Val(Text5.Text) + Val(Text6.Text) +
Val(Text7.Text+ Val(Text8.Text)
End Sub

Private Sub Command4_Click()


Adodc1.Recordset.MoveFirst
End Sub

Private Sub Command5_Click()


If (Adodc1.Recordset.BOF = True) Then
MsgBox "Beginning of record", , "Begin"
Else
Adodc1.Recordset.MovePrevious
End If
End Sub

Private Sub Command6_Click()


If (Adodc1.Recordset.EOF = True) Then
MsgBox "End of record", , "End"
Else
Adodc1.Recordset.MoveNext
End If
End Sub

Private Sub Command7_Click()


Adodc1.Recordset.MoveLast
End Sub

Formemp1

Private Sub cmdCancel_Click()


Me.Hide
End Sub

Private Sub cmdOK_Click()


If txtPassword = "empemp" Then
Me.Hide
Formemp2.Show
Else
56

MsgBox "Invalid Password, try again!", , "Login"


txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub

Formemp2

Private Sub Command1_Click()


Dim n As String
n = InputBox("Enter Employee ID")
Adodc1.Recordset.Find ("emp_id ='" & n & "'")
Formemp2.Visible = False
Formemp3.Visible = True
End Sub

Formemp3

Private Sub Form_Load()


Text1.Text = Formemp2.Text1.Text
Text2.Text = Formemp2.Text2.Text
Text3.Text = Formemp2.Text3.Text
Text4.Text = Formemp2.Text4.Text
Text5.Text = Formemp2.Text5.Text
Text6.Text = Formemp2.Text6.Text
Text7.Text = Formemp2.Text7.Text
Text8.Text = Formemp2.Text8.Text
Text9.Text = Formemp2.Text9.Text
End Sub

Output:
57
58
59

6. Testing
Manual testing was done. A set of employees were asked to use this system and
the errors occurred were noted. According to their feedback, changes were done in the
system.

7. Result and conclusion


The payroll system has reduced the manual work for issuing a payslip to an
employee. It has also improved the process by reducing the errors hence making this
system as a more efficient one that can be used in any type of organisation.
60

5. COURSE REGISTRATION SOFTWARE

1. Preamble

The CRS program makes the process of course registration in colleges easier and
more convenient. The student can check whether he’s eligible to apply, view the
availability of seats and register for a course without spending the time and effort of
visiting the college.

2. Objectives

 To implement CRS in an efficient and effective manner.


 To maintain course database.
 To view available courses and vacancy in each.
 To check for eligibility.
 To register for the desired course.

Time taken to perform the above will be less than 10 seconds.

The student must enter his details and desired course. If he is eligible and if atleast one
seat is available, then he is registered and is given a confirmation number.

3. Requirements
CRS can be developed using waterfall or linear sequential model.
A student is required to meet the eligibility criteria in order to register for a course.

3.1 : Software Requirements:

1. Design: Rational Rose


2. Development: Visual Basic 6.0, MS Access
3. Testing: manual

3.2 : Hardware Requirements:

1. Intel Celeron or above


2.128 mb RAM
3.300 mb free space
61

4. Design
4.1.Class Diagram

CR System
Student
Stud_name
Name
Reg_No.
Address
Registered Course
Contact NO.
Address
Choice of Course
Contact No.
Input_details()
Check_availability()
Get_availability()
Check_eligibility()
Register()
Update()
Cancel Registration()
Registration()
opname()
Cancellation()

Educational Background
Name
Board Course
% of Marks Course Name
Year of Completion Available Seats

Return eligibilty() Return Available Seats()

4.2 Use Case Diagram :

Input Details

Get Availability

Register

student
Cancel Registration cr system

Confirm Registration

Cancellation
62

4.3 Interaction Diagram


4.3.1. Enquiry Module
4.3.1.1. Sequence Diagram

Student CR System Course

Enquire availability

Check availability

Scan DB

Return Availability

Display Availability

4.3.1.2.Collaboration Diagram

3: Scan DB

1: Enquire availability 2: Check availability


Student CR System Course

5: Display Availability 4: Return Availability


63

4.3.2 Register Module


4.3.2.1 Sequence Diagram

Educational Student CR system Course


Background

pass background information

pass student details

check eligibility

Register for a course

Update DB

Display confirmation

4.3.2.2 Collaboration Diagram

3: Check Eligibility

2: Pass student details


1: Pass background infortmation 4: Register for a course
Educational Student CR System Course
background
6: Display Confimation
5: Update DB
64

4.3.3 Cancellation Diagram


4.3.3.1 Sequence Diagram

Student System Course

Cancel Registration

Update DB

Confirm Cancellation

4.3.3.2 Collaboration Diagram

1: Cancel Registration 2: Update DB


Student System Course

3: Confirm Cancellation

4.4 State Machine Diagram


4.4.1 State Chart Diagram

Enquriy

Register

Cancel
Registration
65

4.4.2 Activity Diagram

S tart

Get A vailability

S earc h DB

Display
A vailability
y es
If available

Input S tudent
details

Chec k E ligibility

Dispaly
E ligibility
y es
if eligible

no
Regis ter for a
c ourse

Update DB

no
Confirm
Regis tration

if wis hing to
y es c anc el
Canc el the no
Registration

Update the DB

Confirm
Cancellation
66

4.5 Component Diagram

CRS.mdb
CRS.exe

Database
connectivity

CRS.frm

4.6 Deployment Diagram

Monitor

Course Query
database Processor

Printer

5. Implementation
5.1. Modules
5.1.1. Course Enquiry
Checks for availability of seats in the desired course.
5.1.2. Registration
The student enters his details and registers for desired course if seat is available.After
successful registration for a course, a confirmation message is displayed.
5.1.4. Cancellation
The applicant can cancel the registered seat by giving his name and
course name.

5.2. Issues faced


5.2.1. Registering for a course that is not available.
5.2.2. Registering for a course which has no availability of seats.
5.2.3. Students attempting to register even after knowing that he/she is not eligible.
5.2.4. Race condition exists when system is used by multiple users. For instance, several
people can register at the same time and exceed the maximum enrollment.
67

5.3. Coding

To establish Database connection


Choose Reference From Project Menu and select Microsoft DAO 3.6 Object
Library and click OK.

Home Page :

Private Sub CLICK TO REGISTER_Click()


Options.Show
Home.Hide
End Sub

Options Form :

Private Sub ViewCoursesOffered_Click()


Courses.Show
Options.Hide
End Sub

Private Sub CheckAvailability_Click()


EnquiringAvailability.Show
Options.Hide
End Sub

Private Sub Register_Click()


Registration.Show
Options.Hide
End Sub

Private Sub CancelRegistration_Click()


Cancellation.Show
Options.Hide
End Sub

Private Sub Exit_Click()


End
End Sub

Courses Offered Form:


Private Sub Back_Click()
Options.Show
Courses.Hide
End Sub

Enquiring Availability Form :


68

Dim rs As Recordset
Dim db As Database

Private Sub Back_Click()


Options.Show
EnquiringAvailability.Hide
End Sub

Private Sub Clear_Click()


Text1.Text = ""
End Sub

Private Sub Show_Click()


Set rs=db.OpenRecordset("select * from crstab1where CName =
' "& Text1.Text & " ' ")
MsgBox ("No. of seats available" & rs(1))
End Sub

Private Sub Form_Load()


Set db = OpenDatabase("D:\crsdb.mdb")
End Sub

Registration Form :
Dim db As Database
Dim rs, rs1 As Recordset

Private Sub Register_Click()


Set rs1 =db.OpenRecordset("select * from crstab1where Cname=
' "& Text2.Text & " ' ")
Set rs =db.OpenRecordset("select * from crstab2where Cname=
' " & Text2.Text & " ' ")
If (rs1(1) = 0) Then
MsgBox ("Sorry!! Seats not available")
Else
If (Val(Text6.Text) >= 60) Then
rs.AddNew
rs(0) = Text1.Text
rs(1) = Text2.Text
rs(2) = Text3.Text
rs(3) = Text5.Text
rs.Update
rs1.Edit
If Text2.Text = rs1(0) Then
rs1(1) = rs1(1) - 1
rs1.Update
End If
MsgBox ("Registration Confirmed")
Else
69

MsgBox ("Sorry!! You are not eligible to Register")


End If
End If
End Sub

Private Sub GetRegNo._Click()


Set rs=db.OpenRecordset("select *from crstab2where Studname=
' "&Text2.Text & " ' ")
MsgBox(“Your Reg no. is : “& rs(4))
End Sub

Private Sub Cancel_Click()


Options.Show
Registration.Hide
End Sub

Private Sub Exit_Click()


End
End Sub

Private Sub Finish_Click()


Final.Show
Registration.Hide
End Sub

Private Sub Form_Load()


Set db = OpenDatabase("D:\Mahe\crsdb.mdb")
Set rs = db.OpenRecordset("select * from crstab2 “)
Set rs1 = db.OpenRecordset("select * from crstab1 “)
End Sub

Private Sub Clear_Click()


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

Cancellation Form:
Private Sub Back_Click()
Options.Show
Cancellation.Hide
End Sub

Private Sub CancelRegistration_Click()


70

Set rs1=db.OpenRecordset("select *from crstab1where Cname=


' "&Text2.Text& " ' ")
Set rs2 = db.OpenRecordset("select * from crstab2where ID=" & Text3.Text )
If Text3.Text = rs2(4) Then
rs2.Delete
End If
If Text2.Text = rs1(0) Then
rs1.Edit
rs1(1) = rs1(1) + 1
rs1.Update
End If
MsgBox ("Registration cancelled")
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Exit_Click()


End
End Sub

Private Sub Form_Load()


Set db = OpenDatabase("D:\crsdb.mdb")
Set rs1 = db.OpenRecordset("select * from crstab1”)
Set rs2 = db.OpenRecordset("select * from crstab2 “)
End Sub
71

Output :
Home Page :

Options Form :
72

Courses Form :

Enquiring Availability Form :


73

Registration Form :

To register :

To get Registration no. :


74

Cancellation Form :

Final Form :

Database :
Database Name : crsdb

crstab1
Cname vacantseats
ECE 20
CSE 20
IT 20
75

crstab1
Cname vacantseats
EEE 20
Aero 20
Civil 20

crstab2
Studname Cname Address Contactno ID
Rahul v Aero Tuticorin 9944336611 103

6.Testing :
Manual testing was done. Students were asked to register for their desired courses.
Students gave their comments and feedback after registration. Their comments and
feedbacks were takn into consideration and further improvement was done on the system
accordingly.

7.Conclusion and result :


This project describes our experiences in designing, developing and
implementing Course Registration System. This system has not only reduced the burden
of manual work but also improved the process by reducing errors and by maintaining
data integrity and consistency, thereby making it a more convenient one.
76

6. EXPERT SYSTEMS
1. Preamble:

The Expert system for banking makes the process of creating new account easier and
convenient. The user can also deposit, withdraw and enquire about the account easily
and efficiently.

2. Objectives:

 To implement Expert system for banking in an efficient and effective manner.


 To maintain bank database.
 To view account balance easily

More than one user can create new account simultaneously.


Time taken to perform the above will be less than 10 seconds.

3. Requirements:

Expert system for banking can be developed using waterfall model.

3.1 Software Requirements:

1. Design: Rational Rose


2. Development: Visual Basic 6.0, MS Access
3. Testing: manual

3.2 Hardware Requirements:

1. Intel Celeron or above


2. 128 MB RAM
3. 300 MB free space
77

4. Design :

4.1.Class diagram

user
name
accno
BankServer
acctype
address BankDatabase
request()
newaccount() update() Reply()
deposit() report()
withdraw()

4.2 Usecase diagram

E nquiry

S e rve r
C reate

U s er

D ep o s it R e qu e s t R ep ly

W ithd ra w

D a ta b a s e

R e p ort
78

4.3 Sequence diagram and Collaboration diagram:

4.3.1 Enquiry module:

4.3.1.1 sequence diagram

user server Database

enquiry()
Request()

Reply()
Report()

4.3.1.2 Collaboration diagram

1: enquiry()
user server

4: Report()

3: Reply()

2: Request()

Databas
e
79

4.3.2 New Account module:

4.3.2.1 Sequence diagram

user server Database

newaccount()
Request()

Reply()
Report()

4.3.2.2 Collaboration diagram

1: newaccount()
user server

4: Report()

3: Reply()

2: Request()

Databas
e
80

4.3.3 Deposit module

4.3.3.1 Sequence diagram

User Server Database

deposit()
request()

reply()
report()

4.3.3.2 Collaboration diagram

1: deposit()
User Server

4: report()
3: reply()

2: request()

Databas
e
81

4.3.4 Withdraw module

4.3.4.1 Sequence diagram

User Server Database

withdraw()
request()

reply()
report()

4.3.4.2 Collaboration diagram

1: withdraw()
User Server

4: report()

3: reply()

2: request()

Databas
e
82

4.4 Statechart diagram

Start state

Menu

new deposit Withdraw enquiry


account

database

End state

4.5 Activity diagram


83

Start state

New Enquiry Withdraw Deposit


account

Request Update

Reply

End state

4.6 Component diagram

ODBC
User connectivity

Database

4.7 Deployment diagram


84

databas
e

user

server

5. Implementation:

5.1. Modules:

5.1.1 Create a new account


Fill in the form with the details of the customer , account type and the amount to be
transacted. Submit using the button “New account”.
5.1.2 Carry out the transaction such as deposit
Enter the account number and amount to be transacted and select the button
“Deposit”.
5.1.3 Carry out the transaction such as withdrawal
Enter the account number and amount to be transacted and select the button
“Withdraw”.
5.1.4 Check for balance and report on enquiry
Enter the account number and select the command button ”Enquire” on which a brief
summary of the account details are displayed.

5.2. Issues faced

5.2.1. Trying to find different loan activities.


5.2.2. Trying to generate account for same user name.
5.2.3. Race condition exists when system is used by multiple users.

5.3 Coding

Entry form:

Private Sub Command1_Click()


Form2.Show
Form1.Hide
End Sub

Private Sub Command2_Click()


Form4.Show
Form1.Hide
85

End Sub

Private Sub Command3_Click()


Form3.Show
Form1.Hide
End Sub

Private Sub Command4_Click()


Form5.Show
Form1.Hide
End Sub

New account form:

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub Command1_Click()


Dim accno As Integer
accno = genaccno
rs.AddNew
rs.Fields("name") = Text1.Text
rs.Fields("acctype") = Text2.Text
rs.Fields("address") = Text3.Text
rs.Fields("balance") = Text4.Text
rs.Fields("accno") = accno
rs.Update
MsgBox "your accno is:" + Str(accno), vbOKOnly + vbExclamation

End Sub
Private Function genaccno() As Long
Dim accno As Long
Dim I As Integer
Randomize Timer
accno = 1
For I = 1 To Len(Text1)
accno = accno + Val(Asc(Mid(Text1, I, 2)))
Next I
accno = accno * Rnd(1)
genaccno = accno
End Function

Private Sub Command2_Click()


Unload Me
End
End Sub
86

Private Sub Form_Load()


con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=user.mdb;Persist Security Info=False"
con.Open
rs.Open "select * from bank1", con, adOpenDynamic, adLockOptimistic
End Sub

Deposit form:
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
rs.MoveFirst
While rs.EOF = False
If rs.Fields(1) = Val(Text1.Text) Then
rs.Fields("balance") = rs.Fields("balance") + Val(Text2.Text)
rs.Update
MsgBox "account updated", vbOKOnly + vbExclamation
Unload Me
Exit Sub
End If
rs.MoveNext
Wend
End Sub

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub Form_Load()


con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=user.mdb;Persist Security Info=False"
con.Open
rs.Open "select * from bank1", con, adOpenDynamic, adLockOptimistic
End Sub

Withdraw form:

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub Command1_Click()


rs.MoveFirst
While rs.EOF = False
If rs.Fields(1) = Val(Text1.Text) Then
If Val(Text2.Text) <= rs.Fields(4) Then
rs.Fields("balance") = rs.Fields("balance") - Val(Text2.Text)
rs.Update
Else
87

MsgBox "insufficient balance", vbOKOnly + vbCritical


Exit Sub
End If
MsgBox "account updated", vbOKOnly + vbExclamation
Unload Me
Exit Sub
End If
rs.MoveNext
Wend
End Sub

Private Sub Command2_Click()


Unload Me
End
End Sub

Private Sub Form_Load()


con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=user.mdb;Persist Security Info=False"
con.Open
rs.Open "select * from bank1", con, adOpenDynamic, adLockOptimistic
End Sub

Enquire form:

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
rs.MoveFirst
While rs.EOF = False
If rs.Fields(1) = Val(Text1.Text) Then
MsgBox "Name:" + rs.Fields(0) + "(" + Str(rs.Fields(1)) + ")" + vbCrLf + "Account
Type:" + rs.Fields(2) + vbCrLf + "Address:" + rs.Fields(3) + vbCrLf + "Balance:" +
Str(rs.Fields(4)), vbOKOnly + vbExclamation
Unload Me
Exit Sub
End If
rs.MoveNext
Wend
End Sub

Private Sub Form_Load()


con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=user.mdb;Persist Security Info=False"
con.Open
rs.Open "select * from bank1", con, adOpenDynamic, adLockOptimistic
End Sub
88

OUTPUT
89
90

6. Testing :
Manual testing was done. Expert system environment was fully analysed.
The comments and feedbacks were taking into consideration and further improvement
was done on the system accordingly.

7. Conclusion and result :


This project describes our experiences in designing, developing and
implementing Expert System. This system has not only reduced the burden of manual
work but also improved the process by reducing errors and by maintaining data integrity
and consistency, thereby making it a more convenient one.
7. ATM SYSTEMS
1. Preamble:

An Automated teller machine(ATM) is a computerized telecommunications


device that provides the customers of a financial institution with access to financial
transactions in a public space without the need for a human clerk or bank teller. The
ATM program makes the process of course transaction in easier and more convenient.

2. Objectives:
 To implement CRS in an efficient and effective manner.
 To maintain course database.
 To view available courses and vacancy in each.
 To check for eligibility & register for the desired course

More than one student can register simultaneously.

Time taken to perform the above will be less than 10 seconds.

The student must enter his details and desired course. If he is eligible and if atleast a seat
91

is available, then he is registered and is given a confirmation number.

3. Requirements:

ATM can be developed using waterfall model.

3.1. Software Requirements:

1. Design: Rational Rose


2. Development: Visual Basic 6.0, MS Access
3. Testing: manual

3.2 : Hardware Requirements:

1. Intel Celeron or above


2. 128 mb RAM
3. 300 mb free space

4.Design :

4.1. CLASS DIAGRAM:


92

A T M S y s te m
nam e
acc no
p a s s w o rd
am ount B ank
b a la n c e a c c Id
p in n u m b e r bank nam e
W it h d r a w fr a u d l e n t d e te c ti o n b a la n c e
a cc n o c h e c k o f m in b a la n c e
b a la n c e re c e ip t w i th d r a w ( )
u p d a te d e p o s i t( )
p a s s w o rd () tr a n s fe r ( )
c h e c k a c c n o () c h e c k b a la n c e ()
g e t b a l a n c e to b e w i th d r a w ( ) c a s h w i th d r a w a l ( )
c a s h tr a n s fe r ( )
c a s h d e p o s i t( )

D a tab a s e
C u s to m e r nam e
acc no
acc no
a c c ty p e
d a te
bank nam e
t im e c a rd n u m b e r
t ra n s fe r b ra n c h
w ith d ra w s a vin g s a c c b a la n c e
u p d a te c u r r e n t a c c b a la n c e
d e p o s it
r e p ly( )
re q u e s t() u p d a te ( )

4.2. USECASE DIAGRAM:


93

S y s t e m S t a r t u p

O p e r a t o r

S y s t e m S h u t d o w n

B a n k
C u s t o m e r
S e s s i o n

C a s h D e p o s Ti t r a n s f eW r i t h d r a w a l

LOGIN MODULE:

4.3. SEQUENCE DIAGRAM


94

CUSTOMER ATM DATABASE

enter password

search database

check database

return information

display

4.4. COLLABORATION DIAGRAM:

1: enter password
CUSTO ATM
MER
5: display

4: return information
3: check database

2: search database

DATABA
SE

WITHDRAWAL MODULE:

4.5. SEQUENCE DIAGRAM:


95

CUSTOMER

enter amt to be with

4.6. COLLABORATION DIAGRAM:

CUSTOMER

return cash and rec


3: check balance
DEPOSIT MODULE:

4.7. SEQUENCE DIAGRAM:


96

CUSTOMER

enter amt to be dep

4.8. COLLABORATION DIAGRAM:

CUSTOMER

TRANSFER MODULE:

4.9. SEQUENCE DIAGRAM:

issue receipt
3: check database
97

CUSTOMER

enter amt to be tra

4.10. COLLABORATION DIAGRAM:

CUSTOMER

4.11. STATE CHART DIAGRAM:


issue receipt
3: check database
98

login withdraw

start
NewState

update deposit
transfer

4.12. ACTIVITY DIAGRAM:

4.13. COMPONENT DIAGRAM:


99

B a n k lo g in A T M
D a t a b a s e

D e p o s it T r a n s fe r C a r d
S c a n n e r

A T M C a s h D is p
C lie n t e n s e r

4.14. DEPLOYMENT DIAGRAM:

5. Implementation:
5.1. Modules:
100

5.1.1. Login:
Login session validates the user.
5.1.2. Withdrawal:
The system delivers amount which is specified by user.
5.1.3. Transfer:
The system transfers the money from one account to another based on user specification.
5.1.4. Update :
The system will update the database after each and every transaction made.
5.1.5.Deposit:
The system credits the money based on user specification.

5.2. Issues faced :


5.2.1. Entering incorrect pin number.
5.2.2. User attempting to withdraw money even after knowing that he/she
is having minimum balance.
5.2.3. Improper insertion of ATM card.

5.3. Coding:

Form1:

Private Sub Command1_Click()


If (Text1.Text = "123") Then
Form1.Hide
Form2.Show
Form2.Label2 = "Arun"
ElseIf (Text1.Text = "456") Then
Form1.Hide
Form2.Show
Form2.Label2 = "Sam"
ElseIf (Text1.Text = "789") Then
Form1.Hide
Form2.Show
Form2.Label2 = "Ram"
Else
MsgBox ("Please Enter Correct Pin Number")
End If
End Sub

Form2:

Private Sub Command1_Click()


Form2.Hide
101

Form3.Show
End Sub
Private Sub Command2_Click()
Form2.Hide
Form5.Show
End Sub

Private Sub Command3_Click()


Form2.Hide
Form4.Show
End Sub

Form3:

Private Sub Command1_Click()


Dim a, b
If (Form2.Label2 = "Arun") Then
a = Adodc1.Recordset.Fields("amount").Value
b = Text1.Text
If ((a - b) > 500) Then
Adodc1.Recordset.Fields("amount") = a - b
Adodc1.Recordset.Update
Adodc1.Recordset.Save
MsgBox ("Your Account is withdrawl")
Else
MsgBox ("Low balance:Transaction failed")
End If
ElseIf (Form2.Label2 = "Sam") Then
Adodc1.Recordset.MoveNext
a = Adodc1.Recordset.Fields("amount").Value
b = Text1.Text
If ((a - b) > 500) Then
Adodc1.Recordset.Fields("amount") = a - b
Adodc1.Recordset.Update
Adodc1.Recordset.Save
MsgBox ("Your Account is withdrawl")
Else
MsgBox ("Low balance:Transaction failed")
End If
ElseIf (Form2.Label2 = "Ram") Then
Adodc1.Recordset.MoveLast
a = Adodc1.Recordset.Fields("amount").Value
b = Text1.Text
If ((a - b) > 500) Then
Adodc1.Recordset.Fields("amount") = a - b
Adodc1.Recordset.Update
Adodc1.Recordset.Save
MsgBox ("Your Account is withdrawl")
102

Else
MsgBox ("Low balance:Transaction failed")
End If
Else
Unload Me
End If
End Sub

Form4:

Private Sub Command1_Click()


Form4.Hide
Form2.Show
End Sub

Private Sub Command2_Click()


If (Form2.Label2 = "Sam") Then
Adodc1.Refresh
Adodc1.Recordset.MoveNext
ElseIf (Form2.Label2 = "Ram") Then
Adodc1.Refresh
Adodc1.Recordset.MoveLast
Else
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
End If
End Sub

Private Sub Form_Load()


If (Form2.Label2 = "Sam") Then
Adodc1.Recordset.MoveNext
ElseIf (Form2.Label2 = "Ram") Then
Adodc1.Recordset.MoveLast
Else
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command2_Click()
Form3.Hide
Form2.Show
End Sub

Form5:

Private Sub Command1_Click()


Dim c, d
If (Form2.Label2 = "Arun") Then
103

c = Adodc1.Recordset.Fields("amount").Value
d = Text1.Text
Adodc1.Recordset.Fields("amount") = c + d
Adodc1.Recordset.Update
Adodc1.Recordset.Save
MsgBox ("Your Account is Deposit")
ElseIf (Form2.Label2 = "Sam") Then
Adodc1.Recordset.MoveNext
c = Adodc1.Recordset.Fields("amount").Value
d = Text1.Text
Adodc1.Recordset.Fields("amount") = c + d
Adodc1.Recordset.Update
Adodc1.Recordset.Save
MsgBox ("Your Account is Deposit")
ElseIf (Form2.Label2 = "Ram") Then
Adodc1.Recordset.MoveLast
c = Adodc1.Recordset.Fields("amount").Value
d = Text1.Text
Adodc1.Recordset.Fields("amount") = c + d
Adodc1.Recordset.Update
Adodc1.Recordset.Save
MsgBox ("Your Account is Deposit")
Else
Unload Me
End If
End Sub

Private Sub Command2_Click()


Form5.Hide
Form2.Show
End Sub

Screen Shots:
104
105
106

6.Testing :
Manual testing was done.

7.Conclusion and result :


This project describes our experiences in designing, developing and
implementing ATM System. This system has not only reduced the burden of manual
work but also improved the process by reducing errors and by maintaining data integrity
and consistency, thereby making it a more convenient one.
107

8. STOCK MAINTENENCE SYSTEM


1. PREAMBLE:
It is a stock maintenance system to keep track of the inventory in a furniture company.

The system can add, view or modify details of a product.

The system alerts if stock quantity is below minimum.

In the earlier system this task was done manually and was time consuming and prone to
errors.

2. OBJECTIVES:
 There is one supervisor who must securely login to the system.
 An id and password is provided for security.
 The product details can be viewed by supervisor as long as he is logged in.
 The products are different kinds of furniture.
 This new system is much more accurate than the old system.
Also in old system comparing was a time consuming task where as with this new
system in can be done in a few seconds.
Also it has an automatic alert when stock goes below minimum whereas earlier
this had to be manually searched.
 The details are neatly organized, entered and viewed using efficient methods.

3. REQUIREMENT:

3.1.1. HARDWARE REQUIREMENT:


Systems that are interconnected so that the supervisor can login from any system and view
details on any other.

1. Intel Pentium IV
2. 512mb RAM
3. 40GB Hard Disk
4. Keyboard and mouse

3.1.2. SOFTWARE REQUIREMENT:


1. Design is done using Rational Rose Enterprise Edition.
2. Coding and development is done using MS Access and Visual Basic where an MS Access
database is linked to a Visual Basic interface.
Testing is done using Quality Test Pro.

4.DESIGN:
108

4.1. Class Diagram:


109

4.2. Use Case Diagram:

In p u ttin g th e S to c k

In i tia l d B

E n te r in g In iti a l D e ta ils o p f S to c k

V ie w i n g to in itia l d e ta ils

s U p e rvis o r

S e a rc h fo r a p a rti c u la r P ro d u c t

d B S e a rch

A va i la b il ity c h e c k in g

S to c k U p d a ti o n
d B U p d a tio n

S to c k M o n i to ri n g
110

4.3. Sequence Diagram1:

Supervisor System dB

Enter Id,Password
check

Correct/Wrong

Valid/Invalid Login

Enter new Details

Store in dB

Stored

Stored

4.4. Colloboration Diagram1:

1
:EnterId
,Password
5:E
n ternewDeta
ils
S
upe
rvis S
yste
m
o
r
4
:Va
lid
/In
validL
ogin
8
:Sto
red
3
:Co
rre
ct/W
rong
7:S
tore
d

2:che
ck
6
:Sto
reindB

d
B
111

4.5. Sequence Diagram2:

Supervisor system dB

Enter id,password

check

correct/wrong
valid/invalid login

enter product detail to display

request

return Details

Display Details

4.6. Colloboration Diagram2:

1:Ente
rid ,p assword
5:en
terp
roduc
td etail todisp
lay
S
uperv
is syste
m
o r
4:valid /invalidlogin
8:D isp layD eta
ils
3:correct/wro n g
7:re
tu rnD e ta ils

2:c
h e
c k
6
:request

d
B
112

4.7. Sequence Diagram3:


Supervisor System dB

Enter id,password

check

Correct/Wrong

Valid/Invalid login

Check Quantity

Return msg if low

Display low warning message

4.8. Colloboration Diagram3:

1: Enter id,password
Supervis System
or
4: Valid/Invalidlogin
7: Displaylowwarningmessage
3: Correct/W rong
6: Returnmsgif low

2: check
5: CheckQ uantity

dB
113

4.9. State Activity Diagram:

Start

Login

Add Initial
Details

Details
added

Viewdetails

Product Search with Product Search


Product Name with Product ID

Product searched and


corresponding details displayed

Modify details

Details updated
to the dB

Monitor the
product

Check to the product Check to the Product


quantity if low Expiry Date

Issue an alert to the


Supervisor

End

Ad d V ie w A le r t E n d
S ta rt
M o d u le M o d u le M o d u le
114

4.10. Component Diagram:


<<Standard EXE>> <<Standard EXE>>
VB.exe file <<Standard EXE>>
ODBC Connectivity Inputting The Stock

<<Standard EXE>>
Checking
Availability

<<Standard EXE>>
Stock Updation

<<Standard EXE>>
Stock Monitoring

4.11. Deployment Diagram:


System
1

dB

System
2

5. IMPLEMENTATION:
5.1. MODULE DESIGN:
5.1.1. ADD MODULE:
• The user enters new details of fresh products into the stock
maintenance system

5.1.2. VIEW MODULE:


• This module is used for the supervisor to check details about already
existing products in the database.

5.1.3. ALERT MOUDLE:


• Accessing this module the supervisor can keep track of the stock that
is below the minimum level.

5.2. ISSUED FACED:


• Issuing an automatic alert was a tricky procedure as the database is
continuously being updated by users.

• Preventing multiple users from accessing the database at the same time
was also necessary to prevent old data being presented.
115

5.3: CODING:

Form1:

Private Sub Command1_Click()


frmLogin.Show
End Sub

Private Sub Command2_Click()


Unload Me
End Sub

frmLogin:
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
Me.Hide
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "rain" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Me.Hide
Form2.Show
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub

Modules Form(Form2):

Private Sub Command1_Click()


Form2.Hide
Form3.Show
End Sub

Private Sub Command2_Click()


Form2.Hide
Form4.Show
116

End Sub

Private Sub Command3_Click()


Form2.Hide
Form5.Show
End Sub

Inputting the Stock(Form3):

Private Sub Command1_Click()


Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Text6.Text = " "
Adodc1.Refresh
Adodc1.Recordset.AddNew
Text1.SetFocus
End Sub

Private Sub Command2_Click()


Adodc1.Recordset.Update
MsgBox ("Records updated")
End Sub

Private Sub Command3_Click()


Form3.Hide
Form2.Show
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Adodc1.Visible = False
End Sub

View Stock Availability(Form4):

Private Sub Command1_Click()


n = InputBox("Enter the ItemCode:")
Adodc1.Refresh
Do Until Adodc1.Recordset.EOF
If (Adodc1.Recordset.Fields("ItemCode")) = Val(Trim(n)) Then
flag = True
Exit Do
117

Else
flag = False
End If
Adodc1.Recordset.MoveNext
Loop
If flag = False Then
MsgBox ("Record not found")
End If
End Sub

Private Sub Command2_Click()


Form4.Hide
Form2.Show
End Sub

Private Sub Command3_Click()


Unload Me
End Sub

Private Sub Form_Load()


Adodc1.Visible = False
End Sub

Stock Monitoring(Form5):

Private Sub Command1_Click()


Do Until Adodc1.Recordset.EOF
If (Adodc1.Recordset.Fields("Quantity")) < Val(25) Then
MsgBox ("stocks of minimum level with ItemName=" & Adodc1.Recordset.Fields(1))
End If
Exit Do
Adodc1.Recordset.MoveNext
Loop
End Sub

Private Sub Command2_Click()


Form5.Hide
Form2.Show
End Sub

Private Sub Command3_Click()


Unload Me
End Sub

Private Sub Form_Load()


Adodc1.Visible = False
End Sub
118

Screen Shots:
119

6. TESTING:
• Testing was done using Quality Test Pro.

7. RESULT AND CONCLUSION:


• This system increases the accuracy in stock maintenance.

• It reduces the time required for the task.

• It increases the productivity and the efficiency of the process.


120

9. REAL TIME SCHEDULER


1. Preamble
Here in the real time scheduling the process of scheduling is made faster, effective and
easier to implement any changes in accordance to the company environment.

2. Objective
To make scheduling process easier and such that no manual analysis required, which
makes the scheduling faster by reducing man-years and man-months to few minutes or
seconds.

3. Requirements
Here in real time scheduler we use Spiral model

3.1 Software Requirements


1. Design: Rational Rose Enterprise Edition 2000
2. Development: Microsoft Visual Basic
3. Testing: Manual Testing
3.2 Hardware Requirements
1. Intel P IV @ 2.5Ghz
2. 1GB DDR2 RAM
3. 500MB Disk Space

4. Design
121

4.1 Class Diagram

Admin
Name
Password Staff
A_ID Name
List of Projects Password
Total number of Projects S_ID
1 1..n Current Project
generate()
allocate() work()
display() 1..n
validate()
1..n
1
1
1..n Database
User Name
Name 1 Access Code
Password
U_ID create()
1..n 1 update()
view() sort()
request() rollback()
list()

4.2 UseCase Diagram

Report Request

Alloc ate
U_Staff U_Admin U_Us er

Generated Report

W ork

Create Database Update Database

U_Databas e
122

4.3 Interaction Diagram


4.3.1 Login
4.3.1.1 Sequence Diagram

Staff Admin User Database

Check

Verified

Check

Verified

Check

Verified

4.3.1.2 Collaboration Diagram

Us er

4: V erified
3: Chec k

1: Chec k 6: V erified
A dm in Databas e S taff

2: V erified 5: Chec k
123

4.3.2 Allocation
4.3.2.1 Sequence Diagram

Staff Admin Database

Check Availability

Return Data

Allocate

1.1.2.2 Collaboration Diagram

2: Return Data 3: Allocate


Database Admin Staff

1: Check Availability
4.3.3 Report
3.1.3.1 Sequence Diagram
3.2.3.1

User Admin Database

Request Report

Request Data
Retuen Data

Report Generation

SendReport
124

3.1.3.2 Collaboration Diagram

4: Report Generation

1: Request Report 2: Request Data


User Admin Database

5: Send Report 3: Retuen Data

4.3.4 Database
3.1.4.1 Sequence Diagram

Admin Database

Create

Update

3.1.4.2 Collaboration Diagram

2: Update

1: Create
A dm in Databas e

4.4 State Machine Diagram


125

StateChart Diagram

Update

Login Authentication Databas e

Allocation

S tart Allocate

Reques t Report

Report End

Activity Diagram

Start

Login
Update

Database

Verify with DB Verified

Staff User Admin


Authenticat
ion Failed

Report
Request

Work View Report Allocate

Stop

Component Diagram
126

Report Database Login

Allocate

4.5 Deployment Diagram

Database

System Display

Printer

5. Implementation
5.1 Modules
5.1.1 Login
Authorization step in which the user, admin or staff can login to access their data. The
database is accessed to verify login.

5.1.2 Allocation
Here allocation of jobs to the staff members are done here based on their availability and
update in database.
5.1.3 Report
At first report request is generally made by the user to the administrator. Here the user
selects the project name and then he requests. The user request is served and based on
127

the user query the current status from the database is updated into a file and mailed to
the user.
5.1.4 Database
Databases are created and updated in this module. It stores all the information like
Name, Password, and IDs and so on.
5.2 Issues Faced

• Storing large data in databases

• Unavilability of workers due to sudden accidents

• Allocating the work dynamically


5.3 Coding
Here in real time scheduler we use DAO connection to connect the database to the front
end Visual Basic. To include the DAO reference we have to select Project menu and
choose References. In References dialog box choose Microsoft DAO 3.6 Object Library
and click OK.
Welcome Form
Private Sub Cancel_Click()
End
End Sub

Private Sub Submit_Click()


If Admin.Value = True Then
A_Login.Show
Welcome.Hide
ElseIf Staff.Value = True Then
S_Login.Show
Welcome.Hide
Else
U_Login.Show
Welcome.Hide
End If
End Sub

A_Login Form
Public istr As String
Public nstr As String
Private Sub A_Back_Click()
A_Login.Hide
Welcome.Show
End Sub

Private Sub A_Submit_Click()


Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
128

Dim rs As Recordset
Set rs = db.OpenRecordset("Select * from Admin")
rs.MoveFirst
Do While Not rs.EOF
If rs(0) = A_Name.Text Then
If rs(1) = A_Password.Text Then
If rs(2) = A_ID.Text Then
nstr = rs(0)
istr = rs(2)
MsgBox "Welcome " & rs(0) & "!!!", vbInformation
GoTo a
End If
End If
End If
rs.MoveNext
Loop
MsgBox "Wrong Input!", vbInformation
A_Password.Text = ""
A_Name.Text = ""
A_ID.Text = ""
A_Name.SetFocus
Exit Sub
a:
Admin.Show
A_Login.Hide
End Sub

Admin Form

Private Sub Allocate_Click()


Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
Dim rs1, rs2 As Recordset
Set rs1 = db.OpenRecordset("Select P_ID from Project")
Set rs2 = db.OpenRecordset("Select P_ID from Staff")
rs1.MoveFirst
rs2.MoveFirst
Do While Not rs2.EOF
rs2.AddNew
rs2.Edit
rs2(0) = rs1(0)
rs2.Update
rs1.MoveNext
rs2.MoveNext
Loop
MsgBox "Allocation Successful", vbInformation
End Sub
129

Private Sub Exit_Click()


End
End Sub

Private Sub Form_Load()


A_Name.Text = A_Login.nstr
A_ID.Text = A_Login.istr
End Sub

S_Login Form

Public istr As String


Public nstr As String
Private Sub Cancel_Click()
S_Login.Hide
Welcome.Show
End Sub

Private Sub Submit_Click()


Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
Dim rs As Recordset
Set rs = db.OpenRecordset("Select * from Staff")
rs.MoveFirst
Do While Not rs.EOF
If rs(0) = S_Name.Text Then
If rs(1) = S_Password.Text Then
If rs(2) = S_ID.Text Then
nstr = rs(0)
istr = rs(2)
MsgBox "Welcome " & rs.Fields("S_Name") & "!!!", vbInformation
GoTo a
End If
End If
End If
rs.MoveNext
Loop
MsgBox "Wrong Input!", vbInformation
S_Password.Text = ""
S_Name.Text = ""
S_ID.Text = ""
S_Name.SetFocus
Exit Sub
a:
Staff.Show
S_Login.Hide
End Sub
130

Staff Form

Private Sub Exit_Click()


End
End Sub

Private Sub Form_Load()


S_Name.Text = S_Login.nstr
S_ID.Text = S_Login.istr
Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
Dim rs3, rs4 As Recordset
Set rs3 = db.OpenRecordset("Select P_ID from Staff where S_ID =' " & S_Login.istr &
" ' ")
P_ID.Text = rs3(0)
Set rs4 = db.OpenRecordset("Select P_Name from Project where P_ID=' " & P_ID.Text
& " ' ")
P_Name.Text = rs4(0)
End Sub

U_Login Form
Public istr As String
Public nstr As String

Private Sub Cancel_Click()


U_Login.Hide
Welcome.Show
End Sub

Private Sub Submit_Click()


Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
Dim rs As Recordset
Set rs = db.OpenRecordset("Select * from User")
rs.MoveFirst
Do While Not rs.EOF
If rs(0) = U_Name.Text Then
If rs(1) = U_Password.Text Then
If rs(2) = U_ID.Text Then
nstr = rs(0)
istr = rs(2)
MsgBox "Welcome " & rs.Fields("U_Name") & "!!!", vbInformation
GoTo a
End If
End If
End If
rs.MoveNext
131

Loop
MsgBox "Wrong Input!", vbInformation
U_Password.Text = ""
U_Name.Text = ""
U_ID.Text = ""
U_Name.SetFocus
Exit Sub
a:
User.Show
U_Login.Hide
End Sub

User Form

Private Sub Exit_Click()


End
End Sub

Private Sub Form_Load()


U_Name.Text = U_Login.nstr
U_ID.Text = U_Login.istr
Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
Dim rs5 As Recordset
Set rs5 = db.OpenRecordset("Select P_ID from Staff")
rs5.MoveFirst
Do Until rs5.EOF
ListP_ID.AddItem rs5(0)
rs5.MoveNext
Loop
End Sub

Private Sub Report_Click()


Dim db As Database
Set db = OpenDatabase("F:\Backup\Subject\Karthick\OOAD\rts.mdb")
Dim rs6, rs7 As Recordset
Set rs6 = db.OpenRecordset("Select * from Project where P_ID=' " & P_ID.Text & " ' ")
Set rs7 = db.OpenRecordset("Select S_Name,S_ID from Staff where P_ID=' " &
P_ID.Text & " ' ")
ListP_Report.Clear
ListP_Report.AddItem "Project Details"
ListP_Report.AddItem "Project Name:" & rs6(1)
ListP_Report.AddItem "Project ID:" & rs6(0)
ListP_Report.AddItem "Start Date:" & rs6(2)
ListP_Report.AddItem "End Date:" & rs6(3)
ListP_Report.AddItem "Working Hours:" & rs6(4)
ListP_Report.AddItem "Staffs Involved"
ListP_Report.AddItem "Staff Name:" & rs7(0)
132

ListP_Report.AddItem "Staff ID:" & rs7(1)


End Sub

Output
Welcome Page

A_Login Page
133

Admin Page

S_Login Page
134

Staff Page

U_Login Page
135

User Page

Database
Database Used: rts.mdb
136

Admin Table

Staff Table

User Table

Project Table

6. Testing

Manual testing was done. Testing was done at a large scale. Under cloud computing
environment too the test was successful. Further improvement were done based on the
test results.
7. Conclusion and Result

Real Time Scheduler was designed, analyzed, implemented and tested successfully. This
real time scheduler would help people for effective scheduling. Thereby making it a
more viable one for day to life scheduling.

10. REMOTE PROCEDURE CALL


IMPLEMENTATION
137

1. Preamble:

The scenario for transferring programs from one system to another is


implied by using manpower and secondary storage devices. It is processed by the
following steps:
 Searching the procedure in the remote system

 Transferring the required page or procedure by using secondary storage device.

 Executing or using the procedure in local system with the software required.
The difficulty of the above procedure is, it requires manpower and also requires
much time in transferring procedure from the source to destination.

2. Objectives:

The main objective of the method implemented is to searching the procedure in


remote system and retrieving it to the local system without wasting time and manpower.
An average of 40 users can use this procedure for retrieving the required procedure at
the same time. Each user is provided with the IP address for connecting to Network and
the Name of the procedure retrieving. The user is allowed to enter the address manually
as per the requirement.

3. Requirements:

The RPC can be developed with water fall model

3.1 : Software Requirements:


1. Design: Rational Rose
2. Development: Java
3. Testing: manual

3.2 : Hardware Requirements:

1. Intel Celeron or above


2. 128 mb RAM
3. 300 mb free space

4. Design:
138

4.1 CLASS DIAGRAM:

d a ta b a s e
user user nam e
p a s s w o rd
us er nam e
p a s s w o rd
a u th e n ti n g ( )
re c e ivin g ( )
lo g in ()
s e n d in g ()
e n te r in g u r l ( )

c li e n t
ip n o
os
s to r a g e

s to r i n g ( )
r e tre vin g ()
r e q u e s ti n g ( )
r e c e ivin g ( )
u n ive rs a l s e r ve r e x e c u ti n g ( ) lo c a l s e rve r
ip n o ip n o
os os
p o rt p o rt

r e s p o n s in g ( ) fi n d in g ()
s e a rc h in g ( ) s e n d in g ( )
s e n d in g ()
fo r w a rd i n g ( )
139

4.2 USE CASE DIAGRAM:

Login

Us er

C lie nt
E nter U R L

verfy ing

Db

R e q u e s tin g

L o ca ls e rve r
R ec eiving
U n ive rs a ls erver

forw arding
140

4.3 LOGIN MODULE:

4.3.1 SEQUENCE DIAGRAM:

User Client dB

Enter Password

Password verification

Enter username

Username Verification

Return result

Display

4.3.2 COLLABORATION DIAGRAM:

1: Enter Password
3: Enter username
User Client

6: Display

5: Return result

2: Password verification
4: Username Verification

dB
141

4.4 CONNECTING MODULE:

4.4.1 SEQUENCE DIAGRAM:

User Client Server

Enter URL

Connecting the Server

Verify the URL

Return the request

4.4.2 COLLABORATION DIAGRAM:

1: EnterURL
User Client

4:Returntherequest

2: ConnectingtheServer
3:VerifytheURL

Server
142

4.5 CLOSING MODULE:

4.5.1 SEQUENCE DIAGRAM:

client server

closing the URL connection

sending the procedure

closing the connection

4.5.2 COLLABORATION DIAGRAM:

1: closing the URL connection


client server

2: sending the procedure


3: closing the connection

4.6 STATE CHART DIAGRAM:


L O G IN
s ta r t c o n n e c t io n s e a rc h
r e c e i vin g

c lo s in g
N e w S ta te 4
143

4.7 ACTIVITY DIAGRAM:

NewState

Login

Request for
connection

no

valid

yes

connection
Established

Request for
procedure

no
valid

yes

Request
accepted

Response
Received

closethe
connection

Connection
closed

NewState2
144

4.8 COMPONENT DIAGRAM:

m a i n .j
a va i n te r fa
ce s e rve rs id e
p r o g r a m in g s

4.9 DEPLOYMENT DIAGRAM:

client server
tcp/ip

5. Implementation:

5.1. Modules:
5.1.1.Login:
The user can login into the system by giving correct user name
and password .
5.1.2. Connecting:
By entering the URL ,the connection between the client and server is established.
5.1.3. Closing:
After retrieving desired web page the user can close the
connection between client and server

5.2. Issues faced :


5.2.1. Entering the incorrect URL.
5.2.2. Error in network connection.
145

5.3 Coding:

import java.awt.event.*;
import javax.swing.*;
import java.lang.reflect.Method;
import javax.swing.JOptionPane;
import java.util.Arrays;

class ab extends JFrame implements ActionListener


{
JTextField t1;
JPasswordField t2;
JPanel panel=new JPanel();
JFrame frame1 = new JFrame("WELCOME");

public ab()
{
JLabel l1=new JLabel("UserName");
JLabel l2=new JLabel("Password");
t1=new JTextField(10);
t2=new JPasswordField(10);
JButton b=new JButton("Login");
frame1.add(panel);
panel.add(l1);
panel.add(t1);
panel.add(l2);
panel.add(t2);
panel.add(b);
frame1.setSize(200, 120);
frame1.setVisible(true);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent ae)
{
String s1=t1.getText();
String s2=t2.getText();
String s3;
if(((s1.compareTo("aries"))==0)&&((s2.compareTo("aries"))==0))
{
frame1.setVisible(false);
JFrame frame = new JFrame();
JPanel panel = new JPanel();
final JTextField urlField =new JTextField(20);
JButton webButton = new JButton("GO");
webButton.addActionListener(new ActionListener()
{
Public void actionPerformed(ActionEvent e)
{BareBonesBrowserLaunch.openURL(urlField.getText().trim());} } );
146

frame.setTitle("Bare Bones Browser Launch");


frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
panel.add(new JLabel("Enter the URL:"));
panel.add(urlField);
panel.add(webButton);
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
}
else
{
frame1.setVisible(false);
JOptionPane.showMessageDialog(this, "LOGIN FAILED. TRY AGAIN",
"WARNING", JOptionPane.ERROR_MESSAGE);
t1.setText("");
t2.setText("");
frame1.setVisible(true);

}
}
}

class BareBonesBrowserLaunch
{

static final String[] browsers = { "firefox", "opera","konqueror",


"epiphany","seamonkey", "galeon", "kazehakase", "mozilla", "netscape" };

public static void openURL(String url)


{
String osName = System.getProperty("os.name");
try
{
if (osName.startsWith("Mac OS"))
{
Class<?> fileMgr = Class.forName("com.apple.eio.FileManager");
Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[]
{String.class});
openURL.invoke(null, new Object[] {url});
}
else if (osName.startsWith("Windows"))
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
else
{
boolean found = false;
for (String browser : browsers)
if (!found)
147

{
found = Runtime.getRuntime().exec(new String[] {"which",
browser}).waitFor() == 0;
if (found)
Runtime.getRuntime().exec(new String[] {browser, url});
}
if (!found)
throw new Exception(Arrays.toString(browsers));
}
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null, "Error attempting to launch web
browser\n" + e.toString());
}
}

public class MyApp1


{

public static void main(String[] args)


{
ab frame=new ab();
}
}

Output:
148

6.Testing :

Manual testing was done and also testing was carried out using Quality Test Pro.

7.Conclusion and result :

This project describes our experiences in designing, developing and


implementing Remote Procedure Call. This project has helped us to access the Remote
systems in a very efficient way.

You might also like