Você está na página 1de 109

TAMILNADU COLLEGE OF ENGINEERING

KARUMATHAMPATTI
COIMBATORE – 641 659

LABORATORY RECORD
Name : ……………………………………………
Class : ……………………………………………
Branch : ……………………………………………
Subject : …………………………………………….

UNIVERSITY REGISTER NO. ROLL NO.

This is to certify that this is a bonafide record of work done by the above student in
Laboratory during the academic year/semester

STAFF IN-CHARGE HEAD OF THE DEPARTMENT

Submitted for the practical examination held on ………………………………………….

INTERNAL EXAMINER EXTERNAL EXAMINER


STUDENTS MARKS ANALYSIS SYSTEM

S.NO DATE TITLE PAGE.NO SIGN

1. Problem Analysis and project


planning

2. Generating Use case diagram, Class


diagram, Activity diagram, Sequence
diagram, collaboration, component
and deployment diagram using
rational Rose
3. Rose implementation

4. Coding

5. Screen Shots
STOCK MAINTENANCE SYSTEM

S.NO DATE TITLE PAGE.NO SIGN

1. Problem Analysis and project


planning

2. Generating Use case diagram, Class


diagram, Activity diagram, Sequence
diagram, collaboration, component
and deployment diagram using
rational Rose
3. Rose implementation

4. Coding

5. Screen Shots
PAYROLL MANAGEMENT SYSTEM

S.NO DATE TITLE PAGE.NO SIGN

1. Problem Analysis and project


planning

2. Generating Use case diagram, Class


diagram, Activity diagram, Sequence
diagram, collaboration, component
and deployment diagram using
rational Rose
3. Rose implementation

4. Coding
STUDENT MARKS
ANALYZING SYSTEM
STUDENT MARKS ANALYZING SYSTEM
PROGRAM ANALYSIS AND PROJECT PLANNING:

Thorough study of the problem:

The student marks analyzing system is developed for easy analysis of marks and it can be
accessed by any person like students, staffs etc…

The student has following features:


• Authentication to login to the system, a username and password is
asked.
• It also contains the details of students like name, roll no, dept,
Semester marks etc
• Students can view their analyzed report. It gives all details about
his/her marks.

Identify project scope

• Any person like student, staff, etc can view marks and reports.
• Authentication is provided using password and username of both student and
staffs.

Objectives:

To design a model for the Student Marks analyzingsystem using UML and generate
code using VB.

Infrastructure:

a) Hardware Requirements :PC


b) Software Requirements:
• Platform: Windows xp/98/me
• Front end tool: Microsoft Visual Basic 6.0
• Back end tool: Microsoft access

MODULES:

The modules of the project are


• Login
• Student details
• Student mark details
MODULE DELIVERABLES

Login:

Brief description:

The use case describes hoe a user logs into student information
management system.

Flow of events:

\1. Basic flow:

• The use case sorts when the user wishes to log into the system.

• The system request the actor to enter his/her name and password

• The actor enters name and password.

• The system validates the entered name and password and logs into
the system.

2. Alternate flow:

• invalid name/password

If in the basic flow the actor enters the invalid name or


password the system displays error message .The actor is providing with another chance
to enter correct one or exit from the system

3. Special requirements:

• None

4. Precondition:

• The actor should select any category

5. Post condition:

• If the use case was successful, the actor is now logged into the
system. If not the system state is unchanged
Student details:

Brief description

This use case allows the user to maintain student information in the student details and
generate the report .This includes adding, searching, updating student detail from the
system.

Add:

Flow of events:

1. Basic flow:

• The use case adds when the user wishes to add the student details
in the database system.

• The system request the actor to enter student details

• The actor enters student details

• The system validates will save the student details into the database
system.

• If the user selects add function then add sub flow is executed

2. Alternate flow:

• invalid data item

• If in the basic flow the actor enters the invalid data item the system
displays error message .The actor is providing with another chance to
enter correct one or exit from the system

3. Special requirements:

• None

4. Precondition:

• use case will connect to the entry form interface.

5. Post condition:

• If the use case was successful, the actor is now adding the student
details into the database system. If not the system state is
unchanged
Search:

Flow of events:

1. Basic flow

• When the user wants to search particular record from system he can
initialize search function.

• If the user selects search function then search sub flow is executed.

2. Alternate flow:

• invalid data item

• If in the basic flow the actor enters the invalid data item the system
displays error message .The actor is providing with another chance to
enter correct one or exit from the system

3. Special requirements:

• None

4. Precondition:

• use case will connect to the search form interface.

5. Post condition:

• If the use case was successful, then actor will search the particular
record and display the student details. If not, the system state is
unchanged.

Update:

Flow of events:

1. Basic flow

• When the user wants to update particular record from system he


can initialize update function.

• If the user selects update function then update sub flow is executed.

2. Alternate flow:

• invalid data item

• If in the basic flow the actor enters the invalid data item the system
displays error message .The actor is providing with another chance to
enter correct one or exit from the system
3. Special requirements:

• None

4. Precondition:

• use case will connect to the update form interface.

5. Post condition:

• If the use case was successful, the actor is now update the student
details and saves that into the database system. If not, the system
state is unchanged.

Delete:

Flow of events:

1. Basic flow

• When the user wants to delete particular record from system he can
initialize delete function.

• If the user selects delete function then delete sub flow is executed.

2. Alternate flow:

• invalid data item

If in the basic flow the actor enters the invalid data item the system displays error
message .The actor is providing with another chance to enter correct one or exit from the
system

3. Special requirements:

• None

4. Precondition:

• use case will connect to the delete form interface.

5. Post condition:

• If the use case was successful, then actor will delete the particular
record and display the student details. If not, the system state is
unchanged.

GENERATING USE CASE DIAGRAM ,CLASS DIAGRAM , STATE CHART


DIAGRAM , ACTIVITY DIAGRAM USING RATIONAL ROSE
DESCRIPTION:

(i) Use Case diagram:

It shows some of the use cases, actors in the Student Information


System and the relationships between them.
Use case is a high level piece of functionality that the system will provide.
An actor is anything or anyone that interacts with the system being built

(ii) Class diagram:

A class is a set of objects that share a common structure and


common behavior (the same attributes, operations, relationships and semantics). A
class is an abstraction o real-world items. When these items exist in the real
world, they are instances of the class and are referred to as objects
The attribute and operation sections of the class box can be
suppressed to reduce detail in an overview. Suppressing a section makes no
statement absence of attributes or operations, but drawing an empty section
explicitly states that there are no elements in that part.

(iii) State Transition Diagram & Activity Diagram:

A state transition diagram shows the life cycle of a single object from
the time it is created until it is destroyed. These diagrams are a good way to model
the dynamic behavior of a class.
In Rose, no source code is generated from a state transition diagram.
These diagrams serve to document the dynamic behavior of a class so that
developers and analysts well have a clear understanding of the behavior.

To create a state transition diagram:


1. Right click the desired class in the browser.
2. Select “open state diagram” from the pop up menu.

Adding states:

1. To add a state, select state from the tool box bar.


2. Click on the state transition diagram where the state should appear.

To add an activity:

1. Open a specification window for the desired state.


2. Select the detail lab.
3. Right click on the actins box.
4. Select “insert” from the pop up menu.
5. Double click the new action. Enter the action in the actions field.
6. In the when box, select “enter until exit” to make the new action an
activity.

USE CASE DIAGRAM


U s e rn a m e & P a s s w o rd

L o g in V ie w R e c o rd
S tudent

U s e rn a m e & P a s s w o rd

A d d R e c o rd
E n t e r D e t a ils

E nter R egno.

E nter R egno. S e a rc h R e c o rd U p d a t e R e c o rd
S t a ff

D e le t e R e c o rd

CLASS DIAGRAM
S t u d e n t M a rk lis t A n a ly s is S y s t e m

A d d R e c o rd S e a rc h R e c o rd D e le t e R e c o r d V ie w R e c o rd
nam e nam e nam e nam e
re g n o re g n o re g n o re g n o
dept dept dept dept
s e m _ m a rk s s e m _ m a rk s s e m _ m a rk s s e m _ m a rk s

a d d () s e a rc h () d e le t e ( ) d is p l a y ( )

ACTIVITY DIAGRAM

ACTIVITY DIAGRAM FOR STUDENT


S tu de n t
M a rk lis t

E n t er
Regno.

R e g n o fou n d ?
Y es D is p la y
R e c o rd
No

D is p la y E rro r
M ess age

ACTIVITY DIAGRAM FOR STAFF


S tudent
M ark lis t

E nter Ty pe

A dd S earc h Delete
Record Rec ord Rec ord

Reg no Found? Reg no Found? Reg no Found?

Y es V iew Y es Delete
No E nter Rec ord Detail
Details

Y es No
No

P rovide E rror
M es sage

STATE CHART DIAGRAMS

Add Record:
/ get s tudent Regno.

Chec king Regno not found A dd to


Databas e

Regno found

Rejec ted

Search Record:

/ get student Regno.

Checking Valid Regno Display


Details

Invalid Regno

Rejected

Delete Record:
/ get student Regno.

Checking Valid Regno Delete


Record

Invalid Regno

Rejected

View Record:

/ get student Regno.

Checking Valid Regno View


Record

Invalid Regno

Rejected

GENERATING SEQUENCE DIAGRAM,COLLABORATION


DIAGRAM,COMPONENT DIAGRAM ,DEPLOYMENT DIAGRAM USING
RATIONAL ROSE
DESCRIPTION:

(i) Sequence Diagrams:

They are ordered by time. They are useful if someone wants to review the
flow of logic through a scenario. Although collaboration diagrams include sequencing
information, it is easier to see on a sequence diagram.

Creating a sequence diagram:

1. Right click the appropriate package/use case in the browser.


2. From the short cut menu,select new -> Sequence diagram.
3. Name the new sequence diagram.
4. Double-click the new sequence diagram in the browser to open it.

To add an item to the sequence diagram:

1. Use the tool bar buttons to add objects and messages to the diagram.

To remove an item from the sequence diagram:

1. Select the item on the sequence diagram.


2. Select Edit-> Delete from model (or) press ctrl+D.

(ii) Collaboration Diagram:

Like sequence diagrams,collaboration diagrams are used to show the flow


through a specific scenario of a use case. collaborations diagrams focus on more on the
relationship between the objects, While sequence diagrams are ordered by time.

To create a new collaboration Diagram:

1. Right click the appropriate use case in the browser.


2. From the short cut menu, select new->collaboration diagram.
3. Name the new collaboration diagram.
4. double click the new collaboration diagram in the browser to open it.

Deleting a collaboration diagram:

1. Right click the collaboration diagram in the browser.


2. Select delete from the short cut menu.

(iii) Component Diagram:

The component diagram is a uml diagram that displays the components in the
system and dependencies between them. A component is a physical module of a code.
Components can include both source code libraries and Runtime files.once the
components are created, they are added to a component diagram and relationships are
drawn between them.the only type of a relationship between components is a
dependency.a dependency suggests that one component must be compiled before another.

To create a component diagram in the component view:

1. In the browser ,Right click the package to contain the component diagram.
2. select new ->component diagram from the pop up menu.
3. Enter the name of the new component diagram.

To delete a component diagram in the component view:

1.In the browser , Right click the component diagram.


2. Select delete from the pop up menu.

iv)Deployment diagram:

A deployment diagram shows allow the modes on the network,the connections


between them and the process that will run on each one.

Opening the deployment diagram:

1. To open the deployment diagram, double click the deployment view in the browser.
2 .Rose will open the deployment diagram for the model.

Adding processors:
A processor is any machine that has a processing power.

To add a processor:

1. Select processor from the toolbox.


2. click the deployment diagram to place the processor.
3. enter the name of the processor.

To Delete a processor from the Model:

1. Select the processor on the deployment diagram.


2. Select edit -> Delete from model or press ctrl+D.

Adding Devices:

A device is a machine or piece of hardware without processing power. Devices include


items such as dumb terminals,printers and scanners.

To add a device:

1. Select device from the toolbox.


2. Click the deployment to place the device.
3. Enter the name of the device.

To Delete a device from the model:


1. Select the device on the deployment diagram.
2. Select Edit -> Delete from model or press ctrl + D.

Adding connections:

A connection is a physical link between two processors., two devices , or a processor and
a device.

To add a connection:

1. Select connection from the toolbox.


2. Click on the node to connect.
3. Drag the connection link to another node.

To Delete a connection from the model:

1. Select the connection on the deployment diagram.


2. Select edit -> Delete from model or press ctrl + d

SEQUENCE DIAGRAM

ADD RECORD SEQUENCE DIAGRAM


Staff System Database

1.Request to Add

2.Enter Regno.

3.Check Regno.

4.Check Database

5.Return Status

6.Details Added

7.Terminate

SEQUENCE RECORD FOR SEARCH RECORD


Staff System Database

1.Request to Search

2.Enter Regno.

3.Check Regno. Availability

4.Check Database

5.Return Status

6.Details Displayed

7.Terminate

SEQUENCE DIAGRAM FOR DELETE RECORD

Staff System Database

1.Request to Delete

2.Enter Regno.

3.Check Regno. Availability

4.Check Database

5.Return Status

6.Details Deleted

7.Terminate

SEQUENCE DIAGRAM FOR VIEW RECORD


Student System Database

1.Request to View Record

2.Enter Regno.

3.Check Regno. Availability

4.Check Database

5.Return Status

6.View Record

7.Terminate

COLLABORATION DIAGRAM S;

Collaboration Diagram for Add Record:

1: 1.Request to Add
7: 7.Terminate
Staff System

2: 2.Enter Regno.
6: 6.Details Added

5: 5.Return Status

4: 4.Check Database 3: 3.Check Regno.

Database

Collaboration Diagram for Search Record:


1: 1.Request to Search
7: 7.Terminate
Staff System

2: 2.Enter Regno.
6: 6.Details Displayed

5: 5.Return Status

4: 4.Check Database 3: 3.Check Regno. Availability

Database

Collaboration Diagram for Delete Record:

1: 1.Request to Delete
7: 7.Terminate
Staff System

2: 2.Enter Regno.
6: 6.Details Deleted

5: 5.Return Status

4: 4.Check Database 3: 3.Check Regno. Availability

Database

Collaboration Diagram for view Record:


1: 1.Request to View Record
7: 7.Terminate
Student System

2: 2.Enter Regno.
6: 6.View Record

5: 5.Return Status

4: 4.Check Database 3: 3.Check Regno. Availability

Database

COMPONENT DIAGRAM:

Login

Database
Student
Details

DEPLOYMENT DIAGRAM:
Add Search Delete View

Student
Staff

Databas
e

RATIONAL ROSE IMPLEMENTATION


PROCEDURE:

REVERSE ENGINEERING:

1. Select tools -> visual basic -> component assignment tool.


2. Create new component by right click on visual basic.
3. Right click on project1 properties and select project for which code should be
generated.
4. Select tools -> visual basic -> update model from code.
5. Select the check box for which code should be generated and click next.
6. Click finish and save the model.

CODINGS:
FORM1: HOME PAGE

Private Sub Command1_Click()


Form2.Show
End Sub

Private Sub Command2_Click()


Form13.Show
End Sub

Private Sub Command3_Click()


End
End Sub

FORM2 : STAFF LOGIN


Private Sub Command1_Click()
If (Text1.Text = "STAFF" And Text2.Text = "STAFF") Then
Text1.Text = " "
Text2.Text = " "
MsgBox ("Login success")
Form3.Show
Else
MsgBox ("Login failed")
End If
End Sub

Private Sub Command2_Click()


Me.Hide
End Sub

FORM 3:STUDENT DETAILS


Private Sub Command1_Click()
Data1.Recordset.AddNew
MsgBox ("Enter the field required and click save")
End Sub

Private Sub Command2_Click()


MsgBox ("Record inserted")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command4_Click()


Dim a, f As Integer
a = InputBox("ENTER REG.NO TO DELETE")
f=0
Data1.Recordset.MoveFirst
Do
If (Data1.Recordset("REG NO") = Val(a)) Then
f=1
Data1.Recordset.Delete
MsgBox ("RECORD DELTED")
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form4.Show
End Sub

Private Sub Command6_Click()


Me.Hide
End Sub

FORM 4: SEM1 DETAILS


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form4.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form5.Show
End Sub

FORM 5: SEM2 DETAILS


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form5.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form6.Show
End Sub

FORM 6:SEM 3 DETAILS


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form6.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form7.Show
End Sub

FORM7 : SEM 4 DETAILS


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form7.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form8.Show
End Sub

FORM 8:SEM 5 DETAILS


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form8.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form9.Show
End Sub

FORM 9: SEM 6 DERAILS


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub
Private Sub Command5_Click()
Form9.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form10.Show
End Sub

FORM10:SEM 7
Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form10.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form511.Show
End Sub

FORM 11: SEM 8


Private Sub Command2_Click()
Data1.Recordset.AddNew
MsgBox ("Record updated")
Data1.Recordset.Update
End Sub
Private Sub Command3_Click()
Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form11.Text7.Text = (Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +
Val(Text5.Text) + Val(Text6.Text)) / 5
End Sub

Private Sub Command6_Click()


Form12.Show
End Sub

FORM 12:
STUDENT RECORD
Private Sub Command1_Click()
Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub
Private Sub Command2_Click()
Form12.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)) / 8
End Sub

Private Sub Command3_Click()


Form1.Show
End Sub

FORM 13: STUDENT LOGIN


Private Sub Command1_Click()
Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command2_Click()


Form12.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)) / 8
End Sub

Private Sub Command3_Click()


Form1.Show
End Sub

FORM 14:STUD MARK LIST


Private Sub Command1_Click()
Dim a, f As Integer
a = InputBox("Enter register number to search")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("REG NO")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command2_Click()


End
End Sub
OUTPUT

FORM1:HOME PAGE:

FORM2:STAFF LOGIN:

FORM3: STUDENT DETAILS


ADD:
SAVE:

SEARCH:
DELETE
FORM4: SEMESTER MARKS
SEARCHING STUDENT MARKS:
FORM13: STUDENT LOGIN
FORM14:STUDENTS FULL MARK LIST
Result:

Thus the implementation of STUDENT MARKS ANALYZING SYSTEM is


developed in visual basic and output is tested using rational rose software.
STOCK MAINTENANCE
SYSTEM

STOCK MAINTENANCE SYSTEM


Aim:
To design the UML Diagram for the stock maintenance.

Abstract:
PROGRAM ANALYSIS AND PROJECT PLANNING:

PROBLEM STATEMENT:

In any organization the records about stock are maintained manually. Since
these activities are done manually and need regular updates to these records there is
much probability of error occurrence, moreover this work is a tedious work process.
The various activities involved in these types of systems are:
• Adding stock
• Deleting stock
• Updating stock
• Searching stock

The problems faced by maintaining this system manually are


• While adding the product manually, there may be a chance of missing its detail in
a large database.
• While deleting the product, it takes time to search that particular product in a large
database.
• As we are maintaining a large database, updating a product is difficult.
• The amount of time taken to search a particular product in a large database is high
if the searching is done manually.
• The additional work of generating the reports on some timely basis is also
involved in this.

ANALYSIS REPORT:

In order to overcome the major flaws of the manual record maintenance the
shift towards computerization of the process is mandatory .The primary objective of
this project is to implement the software which is capable of maintenance of the
records with simplicity and in well structured manner.

THOROUGH STUDY OF THE PROBLEM:

• Stock maintenance system has to be developed for maintaining the stock list of a
stationary stock company.
• Automatic ordering of stock when the stock reaches minimum stock balance
• Checking stock list for minimum balance.
• Get minimum and maximum number of each product in the stock (product list of
stock list).
• Products list contains product name, product id, maximum and minimum
products.
• Current list contains number of items currently present in the stock o;f each
product.
• Reduce the number of items in the current list, after ordering of the customer
according to the product.
• Product show list of the name of the product available in the market.
.
• When the current list quantity is less than for a particular product then the
product is order to the company, according to the constrain given in the product
list.
• Updating the stock list and current list with the newly purchased product.
• In the product list, there is an additional option demand for increasing quantity of
a particular product in the stock. During the time of the demand, the option
should be selected.
• The system access given to the accountant, stock manager.

Identify project scope:

• The scope of the product is to maintain stock in a stationary stock company.


• To calculate the available quantity of a particular product presently in the stock.
• It’s easy to add to the stock list, when there is an arrival of a new product to the
super market.
• When a particular product reaches a minimum level then automatically it types
letter with the required quantity of product to the product company.

Objectives:

• The main aim of the project is to maintain the stock list details & company
address of each product, inform the stock manager when the action is required to
be taken.
• The project avoids excess ordering of the stock and order necessary stock when
the stock goes beneath the minimum level specified.
• When the particular product reaches minimum level then it should type the letter
automatically to the particularly company.
Stock maintenance using UML and generate code using VB

PROCEDURE:

STEPS:

1. Start the process.


2. Design the Use case diagram using UML.
3. Design the Sequence diagram.
4. Obtain Collaboration diagram from Sequence diagram.
5. Design the class diagram for Stock Management System corresponding
attributes and operations.
6. Design the component diagram and choose the VB to generate code for analysis
specified.
7. Design deployment diagram.
8. Link the class in class diagram with component in component diagram.
9. Update model which designed.
10. The VB code is generated.
11. Stop the process.

SYSTEM SPECIFICATION:

c) Hardware Specification:

1. A server to store all the data and for doing transaction.


2. a client machine to interact with user
3. a printer to print the receipts

d) Software Specification:

1. A DB server like oracle, MS SQL server.


2. A front end software like VB
3. A networking OS like LINUX, WINDOWS 2000 Server etc.,

MODULES:

The modules of the project are

1) Login
2) Add stock details
3) Delete stock details
4) Search
5) Update stock details
6) Bill receipt.
MODULE DELIVERABLES:

1. LOGIN:

Brief description:

The use case describes how a user logs into stock maintenance.

Flow of events:

1. Basic flow:

• The use case sorts when the user wishes to log into the
system.

• The system request the actor to enter his/her name and


password

• The actor enters name and password.

• The system validates the entered name and password and


logs into

2. Alternate flow:

Invalid user name/password

• If in the basic flow the actor enters the invalid name or


password

• The system displays error message .the actor is providing


with

• Another chance to enter corrects one or exit from the


system

3. Special requirements:

• None

4. Precondition:

• The actor should select any category

5. Post condition:
• If the use case was successful, the actor is now logged into
the system. If not the system state is unchanged

2. ADD STOCK DETAILS:

Brief description:

The use case describes how to add the stock

Flow of events:

1. Basic flow:

• The use case sorts when the user wishes to add the stock.

• The system request the actor to enter the pr_id, pr_name,


com_name, cost, quantity

• After entering the above details the system displays the


message that the stock is added successfully

2. Alternate flow:

• Copy of product id.

• If we enter the already existing pr_id, it will not be added in


the stock.

3. Special requirements:

• None

4. Precondition:

• The actor should enter the pr_id

5. Post condition:

• If the use case was successful, the item is now added into
the system. If not the system state is unchanged

3. DELETE STOCK:

Brief description:

The use case describes how to delete the stock.

Flow of events:
1. Basic flow:

• The use case sorts when the user wishes to delete the stock.

• The system request the actor to enter the pr_id.

• After entering the pr_id the system displays the message


that the stock is deleted successfully

2. Alternate flow:

• Invalid product id.

• If we enter the invalid pr_id, it will not be deleted from the


stock.

3. Special requirements:

• None

4. Precondition:

• The actor should enter the pr_id

5. Post condition:

• If the use case was successful, the item is now deleted


into the system. If not the system state is unchanged

4. SEARCH STOCK:

Brief description:

The use case describes how to search the product from stock.

Flow of events:

1.Basic flow:

• The use case sorts when the user wishes to search from
the stock.

• The system requests the actor to enter the pr_name.

• After entering the pr_name the system displays details of


the product.

2. Alternate flow:

• Invalid product name.


• If we enter the invalid pr_name, it will not be searched.

3. Special requirements:

• None

4. Precondition:

• The actor should enter the pr_name

5. Post condition:

• If the use case was successful, the items are now searched
and display the details of the product.

5. UPDATE STOCK:

Brief description:

The use case describes how to update the product from stock.

Flow of events:

1. Basic flow:

• The use case sorts when the user wishes to update the stock.

• The system requests the actor to enter the pr_id.

• After entering the pr_id the system displays details of the


product and updated.

2. Alternate flow:

• Invalid product name.

• If we enter the invalid pr_name, it will not be searched.

3. Special requirements:

• None

4. Precondition:

• The actor should enter the pr_name

5. Post condition:

• If the use case was successful, the items are now searched
and display the details of the product.
6. PRODUCT DETAILS:

Brief description:

The use case describes how to display the bill for the product purchased.

Flow of events:

1. Basic flow:

• The use case sorts when the user wishes to display the
product details.

• The system requests the actor to enter the quantity and


name of the

• Product.

• After entering the details the product details are displayed


and remaining items are shown.

2. Alternate flow:

• None.

3. Special requirements:

• None

4. Precondition:

• The actor should enter the pr_name .

5. Post condition:

• If the use case was successful, the product details.are


displayed

.
GENERATING USE CASE DIAGRAM, CLASS DIAGRAM, STATE
CHART DIAGRAM, ACTIVITY DIAGRAM USING ARGO UML

PROCEDURE:

1. Start ARGO UML Enterprise Edition.


2. Create New Use case view.
3. Draw the Use case diagram.
4. Draw the corresponding Class diagram.
5. Draw the state chart and activity diagram.
6. Stop the program

DESCRIPTION:

(iv)Use Case diagram:

It shows some of the use cases, actors in the STOCK MAINTENANCE


system and the relationships between them.

Use case is a high level piece of functionality that the system will
provide.
An actor is anything or anyone that interacts with the system being built

(v) Class diagram:

A class is a set of objects that share a common structure and common


behavior (the same attributes, operations, relationships and semantics). A class is
an abstraction o real-world items. When these items exist in the real world, they
are instances of the class and are referred to as objects

The attribute and operation sections of the class box can be suppressed
to reduce detail in an overview. Suppressing a section makes no statement
absence of attributes or operations, but drawing an empty section explicitly states
that there are no elements in that part.

(vi) State Transition Diagram & Activity Diagram:

A state transition diagram shows the life cycle of a single object from
the time it is created until it is destroyed. These diagrams are a good way to model
the dynamic behavior of a class.

In Rose, no source code is generated from a state transition diagram. These


diagrams serve to document the dynamic behavior of a class so that developers
and analysts well have a clear understanding of the behavior.
To create a state transition diagram:

1. Right click the desired class in the browser.


2. Select “open state diagram” from the pop up menu.

Adding states:

1. To add a state, select state from the tool box bar.


2. Click on the state transition diagram where the state should
appear.

To add an activity:

1. Open a specification window for the desired state.


2. Select the detail lab.
3. Right click on the actins box.
4. Select “insert” from the pop up menu.
5. Double click the new action. Enter the action in the actions field.
6. In the when box, select “enter until exit” to make the new action an
activity.
\
USE CASE DIAGRAM

System startup

Switch on/off

Add Item
Enter details s

Enter Pr_id
Delete Items
Administrator
Enter name

Data base
Enter Pr_id Update Items

Enter Pr_id

Search Items

Bill receipt Customer


CLASS DIAGRAM

S T O C K M A IN T A IN A N C E

A D D P R O D U C T D E L E T E P R O D U C ST E A R C H P R O D U CUTP D A T E P R O D U C T B IL L
p r_ n a m e p r_ n a m e p r_ n a m e p r_ n a m e p r_ n a m e
p r _ id p r _ id p r _ id p r _ id p r _ id
com p_nam e com p_nam e com p_nam e com p_nam e com p_nam e
cost cost cost cost cost
q u a n t it y q u a n t it y q u a n t ity q u a n t it y q u a n t it y
a d d () d e le t e ( ) se a rch () u p d a te () b ill( )
ACTIVITY DIAGRAM

stock
maintainance

search update bill


add delete
product product receipt
product product
pr_id found pr_name found pr_id found pr_id found pr_name found

no yes yes yes


enter delete display update
details Items details Items

yes no
no no

provide
error

ADD RECORD ACTIVITY DIAGRAM

Stock maintaince

Enter
Product id
Product id found
Yes Error
message
No
Enter product
details
SEARCH RECORD ACTIVITY DIAGRAM

Stock maintanence

Enter
Pr_id
Pr_id found?
Yes Display Items
details
No

Provide
Error

DELETE RECORD ACTIVITY DIAGRAM

Stock maintaince

Enter
Product id
Product id found
Yes delete
details
No

reject
STATE CHART DIAGRAM

ADD STOCK:

/get product id

checking Add to
[product id not database
available]

[ product id present]

rejected

SEARCH STOCK

/get product id

checking print
details
[valid product id]

[invalid product id]

rejected
DELETE STOCK:

/get product id

checking delete
details
[valid product id]

[invalid product id]

rejected

GENERATING SEQUENCE DIAGRAM, COLLABORATION


DIAGRAM, COMPONENT DIAGRAM, DEPLOYMENT DIAGRAM
USING ARGO UML

PROCEDURE:

1. Start ARGO UML Enterprise Edition.


2. Create New Use case view.
3. Draw the use case diagram.
4. Draw the corresponding Class diagram.
5. Draw the state chart and activity diagrams.
6. Stop the program.

DESCRIPTION:

(i) Sequence Diagrams:

They are ordered by time. They are useful if someone wants to review the
flow of logic through a scenario. Although collaboration diagrams include sequencing
information, it is easier to see on a sequence diagram.

Creating a sequence diagram:

1. Right click the appropriate package/use case in the browser.


2. From the short cut menu, select new -> Sequence diagram.
3. Name the new sequence diagram.
4. Double-click the new sequence diagram in the browser to open it.
To add an item to the sequence diagram:
1. Use the tool bar buttons to add objects and messages to the diagram.

To remove an item from the sequence diagram:

1. Select the item on the sequence diagram.


2. Select Edit-> Delete from model (or) press ctrl+D.

(ii) Collaboration Diagram:

Like sequence diagrams, collaboration diagrams are used to show the flow
through a specific scenario of a use case. Collaborations diagrams focus on more on the
relationship between the objects, while sequence diagrams are ordered by time.

To create a new collaboration Diagram:

1. Right click the appropriate use case in the browser.


2. From the short cut menu, select new->collaboration diagram.
3. Name the new collaboration diagram.
4. Double click the new collaboration diagram in the browser to open it.

Deleting a collaboration diagram:

1. Right click the collaboration diagram in the browser.


2. Select delete from the short cut menu.

(iii) Component Diagram:

The component diagram is an uml diagram that displays the components in the system
and dependencies between them. A component is a physical module of a code.
Components can include both source code libraries and Runtime files. Once the
components are created, they are added to a component diagram and relationships are
drawn between them. The only type of a relationship between components is a
dependency. A dependency suggests that one component must be compiled before
another.

To create a component diagram in the component view:

1. In the browser, Right click the package to contain the component diagram.
2. Select new ->component diagram from the pop up menu.
3. Enter the name of the new component diagram.

To delete a component diagram in the component view:

1. In the browser, Right click the component diagram.


2. Select delete from the pop up menu.

iv) Deployment diagram:


A deployment diagram shows allow the modes on the network, the connections between
them and the process that will run on each one.

Opening the deployment diagram:

1. To open the deployment diagram, double click the deployment view in the browser.

2. Agro will open the deployment diagram for the model.

Adding processors:

A processor is any machine that has a processing power.

To add o processor:

1. Select processor from the toolbox.


2. click the deployment diagram to place the processor.
3. enter the name of the processor.

To Delete a processor from the Model:

1. Select the processor on the deployment diagram.


2. Select edit -> Delete from model or press ctrl+D.
Adding Devices:

A device is a machine or piece of hardware without processing power. Devices include


items such as dumb terminals, printers and scanners.

To add a device:

1. Select device from the toolbox.


2. Click the deployment to place the device.
3. Enter the name of the device.

To Delete a device from the model:

1. Select the device on the deployment diagram.


2. Select Edit -> Delete from model or press ctrl + D.

Adding connections:
A connection is a physical link between two processors. two devices , or a processor and
a device.
To add a connection:

1. Select connection from the toolbox.


2. Click on the node to connect.
3. Drag the connection link to another node.

To Delete a connection from the model:

1 .Select the connection on the deployment diagram.


2. Select edit -> Delete from model or press ctrl + d

SEQUENCE DIAGRAM

DELETE RECORD SEQUENCE DIAGRAM:


Administrator System Database

1: request to delete

2: Enter pr_id
3: Check for pro_id
4: Check Database

5: Return status
6: Item deleted

7: terminate

ADD RECORD SEQUENCE DIAGRAM:


Administrator System Database

1: request to add

2: Enter details
3: Check for pro_id
4: Check Database

5: Return status
6: Item added

7: terminate

UPDATE RECORD SEQUENCE DIAGRAM:


ADMINISTRATOR SYSTEM DATABASE

1: Request for update

2: Request Pr_id

3: Enter Pr_id

4: Check for Pr_id

5: Check Database

6: Return status

7: Request for updation

8: Update Item
9: Update Item

10: Update Database

11: Update Successful

12: Item Updated

13: Terminate
COLLABORATION DIAGRAM

ADD STOCK DETAILS:

4 : C h e c k d a ta b a s e

1 : re q ue s t to a d d 3 : C he c k fo r p roD_aidta b a s
7 : te rm ina te e
A d m in is tr S ys te m
a to r 5 : R e turn s ta tus
2 : E nte r d e ta ils
6 : Ite m a d d e d

UPDATE STOCK DETAILS:

5 : C h e c k D a ta b a s e
1 0 : U p d a te D a ta b a s e
1 : R e q u e s t fo r u p d a te
3 : E n te r P r _ id
8 : U p d a te Ite m 4 : C h e c k fo r P r_ id
1 3 : T e rm i n a te 9 : U p d a te Ite m
A D M IN IS T R S YS TE D A TA B A
A TO R M SE
2 : R e q u e s t P r_ i d 6 : R e tu rn s ta tu s
7 : R e q u e s t fo r u p d a ti o n1 1 : U p d a te s u c c e s s fu l
1 2 : Ite m u p d a te d
DELETE RECORD FROM STOCK:

4 : C h e c k D a ta b a s e

3 : C h e c k f o r Dp ar ot a_ bi da s
1 : r e q u e s t t o d e le t e e
7 : te rm i n a te
S y s te m
A d m in is tr 5 : R e tu r n s ta tu s
a to r
2 : E n te r p r _ i d
6 : Ite m d e le t e d
COMPONENT DIAGRAM:

LOGIN

STOCK DATABA
DETAILS SE

DEPLOYMENT DIAGRAM:

DELETE SAVE
ADD SEARCH ST OCK
ST OCK
STOCK ST OCK

ADMIN

DATABAS
E
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
Form2.Show
End Sub

Private Sub Command4_Click()


Form2.Show
End Sub

OUTPUT:

LOGIN:
MAIN FROM: STOCK MAINTENANCE
ADD PRODUCT DETAILS:

SAVE PRODUCT DETAILS:


SEARCH PRODUCT:
STOCK DETAILS:ADD
SAVE:

SEARCH:
DELETE :
SALES DETAILS:
RESULT:

Thus the implementation of STOCK MAINTENANCE system is developed using


visual basic and output is tested using rational rose software.
PAYROLL SYSTEM
PAYROLL SYSTEM
PROGRAM ANALYSIS AND PROJECT PLANNING:

Thorough study of the problem:

The employee information management system is developed for easy maintaining


employee details and it can be accessed by any person like employees, supervisors etc…

The employee has following features:


• Authentication to login to the system, a username and password is
asked.
• It also contains the details of employees like ename, eid, design, basic
pay , blood group, and address etc
• Employees can view their analyzed report. It gives all details about
employees.

Identify project scope

• Any person like employee, supervisor, etc can view salary details.
• Authentication is provided using password and username of both employee and
supervisor.

Objectives:

To design a model for the Payroll Management system using UML and generate code
using VB.

Infrastructure:
s
1. Hardware Requirements :PC
2. Software Requirements:
• Platform: Windows xp/98/me
• Front end tool: Microsoft Visual Basic 6.0
• Back end tool: Microsoft access

MODULES:

The modules of the project are


• Login
• Employee details
• Calculate Allowance
MODULE DELIVERABLES

Login:

Brief description:

The use case describes hoe a user logs into Payroll management system.

Flow of events:

1. Basic flow:

• The use case sorts when the user wishes to log into the system.

• The system request the actor to enter his/her name and password

• The actor enters name and password.

• The system validates the entered name and password and logs into
the system.

2. Alternate flow:

• invalid name/password

If in the basic flow the actor enters the invalid name or


password the system displays error message .The actor is providing with another chance
to enter correct one or exit from the system

3. Special requirements:

• None

4. Precondition:

• The actor should select any category

5. Post condition:

• If the use case was successful, the actor is now logged into the
system. If not the system state is unchanged
Employee details:

Brief description

This use case allows the user to maintain employee information in the employee details
and generate the report .This includes adding, searching, deleting employee detail from
the system.

Add:

Flow of events:

1. Basic flow:

• The use case adds when the user wishes to add the employee
details in the database system.

• The system request the actor to enter employee details

• The actor enters employee details

• The system validates will save the employee details into the
database system.

• If the user selects add function then add sub flow is executed

2. Alternate flow:

• invalid data item

• If in the basic flow the actor enters the invalid data item the system
displays error message .The actor is providing with another chance to
enter correct one or exit from the system

3. Special requirements:

• None

4. Precondition:

• Use case will connect to the entry form interface.

5. Post condition:

• If the use case was successful, the actor is now adding the employee
details into the database system. If not the system state is unchanged
Search:

Flow of events:

1. Basic flow

• When the user wants to search particular record from system he can
initialize search function.

• If the user selects search function then search sub flow is executed.

2. Alternate flow:

• invalid data item

• If in the basic flow the actor enters the invalid data item the system
displays error message .The actor is providing with another chance to
enter correct one or exit from the system

3. Special requirements:

• None

4. Precondition:

• use case will connect to the search form interface.

5. Post condition:

• If the use case was successful, then actor will search the particular
record and display the employee details. If not, the system state is
unchanged.

Delete:

Flow of events:

1. Basic flow

• When the user wants to Delete particular record from system he can
initialize Delete function.

• If the user selects Delete function then delete sub flow is executed.

2. Alternate flow:

• invalid data item


• If in the basic flow the actor enters the invalid data item the system
displays error message .The actor is providing with another chance to
enter correct one or exit from the system.

3. Special requirements:

• None

4. Precondition:

• use case will connect to the delete form interface.

5. Post condition:

• If the use case was successful, the actor is now delete the employee
details and saves that into the database system. If not, the system
state is unchanged.

Calculate Allowance:

Flow of events:

1. Basic flow

• When the user wants to calculate allowance for particular record


from system he can initialize Delete function.

• If the user selects calculate allowance function then delete sub flow is
executed.

2. Alternate flow:

• There is no chance for error. The allowance is calculated for existing


record only.

3. Special requirements:

• None

4. Precondition:

• use case will connect to the calculate allowance form interface.

5. Post condition:

• If the use case was successful, the actor is now calculate allowance
the employee details and saves that into the database system. If not,
the system state is unchanged.
GENERATING USE CASE DIAGRAM ,CLASS DIAGRAM , STATE CHART
DIAGRAM , ACTIVITY DIAGRAM USING RATIONAL ROSE

DESCRIPTION:

(vii) Use Case diagram:

It shows some of the use cases, actors in the Employee Information


System and the relationships between them.
Use case is a high level piece of functionality that the system will provide.
An actor is anything or anyone that interacts with the system being built

(viii) Class diagram:

A class is a set of objects that share a common structure and


common behavior (the same attributes, operations, relationships and semantics). A
class is an abstraction o real-world items. When these items exist in the real
world, they are instances of the class and are referred to as objects
The attribute and operation sections of the class box can be
suppressed to reduce detail in an overview. Suppressing a section makes no
statement absence of attributes or operations, but drawing an empty section
explicitly states that there are no elements in that part.

(ix) State Transition Diagram & Activity Diagram:

A state transition diagram shows the life cycle of a single object from
the time it is created until it is destroyed. These diagrams are a good way to model
the dynamic behavior of a class.
In Rose, no source code is generated from a state transition diagram.
These diagrams serve to document the dynamic behavior of a class so that
developers and analysts well have a clear understanding of the behavior.

To create a state transition diagram:


Right click the desired class in the browser.
Select “open state diagram” from the pop up menu.

Adding states:

1. To add a state, select state from the tool box bar.


2. Click on the state transition diagram where the state should
appear.

To add an activity:
1. Select the detail lab.
2. Right click on the actins box.
3. Select “insert” from the pop up menu.
4. Double click the new action. Enter the action in the actions field.
5. In the when box, select “enter until exit” to make the new action an
activity.
USE CASE DIAGRAM

us e rna m e &L o g o n
p a s s w o rd

e nte r d e ta ils

A d d ite m s
M a na g e re nte r e id

e nte r e id U p d a te
D e le te ite m s
e nte r
d e ta ils

S e a rc h ite m s

C a lc ula te a llo w a nc e

CLASS DIAGRAM
p a yro ll s ys te m

Add D e le te S e a rc h c a lc ula te
enam e enam e enam e a llo w a nc e
e id e id e id HRA
d e s ig n d e s ig n d e s ig n TA
b a s ic p a y b a s ic p a y b a s ic p a y DM S A
a d d re s s a d d re s s a d d re s s PF
phone phone phone
b lo o d g ro u p b lo o d g ro u p b lo o d g ro u p S a la ry ()

a d d () d e le t e() s e a rc h ()

ACTIVITY DIAGRAM
p a yro ll
syste m

E nte r
kind

add emp
D e ta ils D e le te e m p S e a rch e m p C a lcula te
D e ta ils D e ta ils a llo wa nc e
e id fo und ? e id fo und ?
e id fo und ?

No V ie w
ye s sa la ry
ye s
E nte r D e le te D isp la y
D e ta ils D e ta ils
no D e ta ils

ye s no

P ro vid e e rro r
m e s sa g e

STATE CHART DIAGRAMS:


Add EmpDetails:

/get eid

Checking Add to
Database
eid not Available

eid Present

Rejected

Search EmpDetails:

/get eid

Checking Display
Details
valid eid

invalid eid

Rejected

Delete EmpDetails:

/get eid

Checking Delete
Details
valid eid

invalid eid

Rejected

GENERATING SEQUENCE DIAGRAM,COLLABORATION


DIAGRAM,COMPONENT DIAGRAM ,DEPLOYMENT DIAGRAM USING
RATIONAL ROSE

DESCRIPTION:

(i) Sequence Diagrams:

They are ordered by time. They are useful if someone wants to review the
flow of logic through a scenario. Although collaboration diagrams include sequencing
information, it is easier to see on a sequence diagram.

Creating a sequence diagram:

1.Right click the appropriate package/use case in the browser.


2.From the short cut menu,select new -> Sequence diagram.
3.Name the new sequence diagram.
4.Double-click the new sequence diagram in the browser to open it.

To add an item to the sequence diagram:

1. Use the tool bar buttons to add objects and messages to the diagram.

To remove an item from the sequence diagram:

1. Select the item on the sequence diagram.


2. Select Edit-> Delete from model (or) press ctrl+D.

(ii) Collaboration Diagram:

Like sequence diagrams,collaboration diagrams are used to show the flow


through a specific scenario of a use case. collaborations diagrams focus on more on the
relationship between the objects, While sequence diagrams are ordered by time.

To create a new collaboration Diagram:

1. Right click the appropriate use case in the browser.


2. From the short cut menu, select new->collaboration diagram.
3. Name the new collaboration diagram.
4. double click the new collaboration diagram in the browser to open it.

Deleting a collaboration diagram:

1. Right click the collaboration diagram in the browser.


2. Select delete from the short cut menu.
(iii) Component Diagram:

The component diagram is a uml diagram that displays the components in the
system and dependencies between them. A component is a physical module of a code.
Components can include both source code libraries and Runtime files.once the
components are created, they are added to a component diagram and relationships are
drawn between them.the only type of a relationship between components is a
dependency.a dependency suggests that one component must be compiled before another.

To create a component diagram in the component view:

1. In the browser ,Right click the package to contain the component diagram.
2. select new ->component diagram from the pop up menu.
3. Enter the name of the new component diagram.

To delete a component diagram in the component view:

1.In the browser , Right click the component diagram.


2. Select delete from the pop up menu.

iv)Deployment diagram:

A deployment diagram shows allow the modes on the network,the connections


between them and the process that will run on each one.

Opening the deployment diagram:

1. To open the deployment diagram, double click the deployment view in the browser.
2 .Rose will open the deployment diagram for the model.

Adding processors:
A processor is any machine that has a processing power.

To add a processor:

1. Select processor from the toolbox.


2. click the deployment diagram to place the processor.
3. enter the name of the processor.

To Delete a processor from the Model:

1. Select the processor on the deployment diagram.


2. Select edit -> Delete from model or press ctrl+D.

Adding Devices:

A device is a machine or piece of hardware without processing power. Devices include


items such as dumb terminals,printers and scanners.

To add a device:
1. Select device from the toolbox.

2. Click the deployment to place the device.


3. Enter the name of the device.

To Delete a device from the model:

1. Select the device on the deployment diagram.


2. Select Edit -> Delete from model or press ctrl + D.

Adding connections:

A connection is a physical link between two processors., two devices , or a processor and
a device.

To add a connection:

1. Select connection from the toolbox.


2. Click on the node to connect.
3. Drag the connection link to another node.

To Delete a connection from the model:

1. Select the connection on the deployment diagram.


2. Select edit -> Delete from model or press ctrl + d

SEQUENCE DIAGRAM
ADD RECORD SEQUENCE DIAGRAM

Manager System Database

1.Request to Add Record

2.Enter Details

3.Check eid Availability

4.Check Database

5.Return Status

6.Details Added

7.Terminate

SEARH RECORD SEQUENCE DIAGRAM:

Manager System Database

1: Request to Search

2: Enter eid

3: Check for eid availability

4: Check Database

5: ReturnStatus

6: DisplayDetails

7: Terminate

DELETE RECORD SEQUENCE DIAGRAM


M a na g e r S yste m D a ta b a se

1 : R e q ue s t to D e le te

2 : E nte r e id

3 : C he c k fo r e id a va ila b ility

4 : C he ck D a ta b a se

5 : R e turn S ta tus

6 : D e le te D e ta ils

7 : Te rm ina te

COLLABORATION DIAGRAM:
Collaboration Diagram for Add EmpDetails:

1: 1.Request to Add Record


7: 7.Terminate
Manager System

2: 2.Enter Details
6: 6.Details Added

5: 5.Return Status

4: 4.Check Database 3: 3.Check eid Availability

Database

Collaboration Diagram for search EmpDetails:

1: Request to Search
7: Terminate
Manager System

2: Enter eid
6: DisplayDetails

5: ReturnStatus

3: Check for eid availability


4: Check Database

Databas
e

Collaboration Diagram for delete EmpDetails:


1: Request to Delete
7: Terminate
Manager System

2: Enter eid
6: Delete Details

5: Return Status

3: Check for eid availability


4: Check Database

Databas
e

COMPONENT DIAGRAM:

Log on

Emp Data
Details Base

DEPLOYMENT DIAGRAM:
A d d d e t a i ls D e le t e S e a rc h A llo w a n c e
D e ta i ls D e ta i ls D e t a i ls

m anager

RATIONAL ROSE IMPLEMENTATION


PROCEDURE:

REVERSE ENGINEERING:

1. Select tools -> visual basic -> component assignment tool.


2. Create new component by right click on visual basic.
3. Right click on project1 properties and select project for which code should be
generated.
4. Select tools -> visual basic -> update model from code.
5. Select the check box for which code should be generated and click next.
6. Click finish and save the model.

CODINGS:
FORM 1: LOGIN

Private Sub Command1_Click()


If (Text1.Text = "PAYROLL" And Text2.Text = "PAYROLL") Then
Text1.Text = " "
Text2.Text = " "
MsgBox ("Login success")
Form2.Show
Else
MsgBox ("Login failed")
End If
End Sub

Private Sub Command2_Click()


End
End Sub

FORM 2:EMPLOYEE DETAILS


Private Sub Command1_Click()
Data1.Recordset.AddNew
MsgBox ("Enter the field required and click save")
End Sub

Private Sub Command2_Click()


MsgBox ("RECORD ADDED")
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()


Dim a, f As Integer
a = InputBox("ENTER THE EMPID TO DELETE")
f=0
Data1.Recordset.MoveFirst
Do
If (Data1.Recordset("EMPID") = Val(a)) Then
f=1
Data1.Recordset.Delete
MsgBox ("RECORD DELTED")
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command4_Click()


Dim a, f As Integer
a = InputBox("ENTER THE EMPID TO SEARCH")
f=0
Data1.Recordset.MoveFirst
Do
If (Val(a) = Data1.Recordset("EMPID")) Then
f=1
Exit Do
End If
Data1.Recordset.MoveNext
Loop Until (Data1.Recordset.EOF)
If (f = 0) Then
MsgBox ("RECORD NOT FOUND")
End If
End Sub

Private Sub Command5_Click()


Form3.Text1.Text = Val((Text4.Text) * 0.05)
Form3.Text2.Text = Val((Text4.Text) * 0.02)
Form3.Text3.Text = Val((Text4.Text) * 0.02)
Form3.Text4.Text = Val((Text4.Text) * 0.05)
Form3.Text5.Text = Val(Text4.Text) + Val(Form3.Text1.Text) + Val(Form3.Text2.Text)
+ Val(Form3.Text3.Text) + Val(Form3.Text4.Text)
Form3.Show
End Sub

Private Sub Command6_Click()


Me.Hide
End Sub

FORM3:SALARY
Private Sub Command1_Click()
Me.Hide
End Sub

OUTPUT
Login form:

EMPLOYEE DETAILS:
ADD EMPLOYEE DETAILS

SAVE EMPLOYEE DETAILS


DELETE EMPLOYEE DETAILS
SEARCH EMPLOYEE DETAILS
ALLOWANCE CALCULATION
RESULT:

Thus the implementation of THE PAYROLL SYSTEM is developed using visual


basic and output is tested using rational rose software.

Você também pode gostar