You are on page 1of 48

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 p d a te R e c o rd S t u d e n t V ie w R e c o rd 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 rd S t a ff L o g in U s e rn a m e & P a s s wo rd U s e rn a m e & P a s s wo rd E n t e r D e t a ils EnterRegno. EnterRegno. CLASS DIAGRAM

SearchRecord name regno dept sem_marks search() D e le t e R e c o r d name regno dept sem_marks d e le t e ( ) ViewRecord name regno dept sem_marks d is p la y ( ) S t u d e n t M a r k li s t A n a l y s i s S y s t e m AddRecord name

regno dept sem_marks add()


ACTIVITY DIAGRAM
ACTIVITY DIAGRAM FOR STUDENT
S tu de nt M a rk lis t E n t er Reg no . Dis p lay E rro r Message D is p lay Re c o rd Reg no foun d ? Yes No

ACTIVITY DIAGRAM FOR STAFF


Student Marklis t Enter Type Add Record Search Record Delete Rec ord Enter Details View Rec ord Delete Detail Provide Error Message Reg no Found? Yes Reg no Found? Reg no Found? Yes No Yes No No

STATE CHART DIAGRAMS Add Record:

Chec king Rejected Add to Database / get student Regno. Regno not found Regno found
Search Record: Checking Rejected Display Details / get student Regno. Valid Regno Invalid Regno

Delete Record:
Checking Rejected Delete Record / get student Regno. Valid Regno Invalid Regno

View Record: Checking Rejected View Record / get student Regno. Valid Regno Invalid Regno 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:
Staff System Database 1: 1.Request to Add 2: 2.Enter Regno. 4: 4.Check Database 3: 3.Check Regno. 5: 5.Return Status 6: 6.Details Added 7: 7.Terminate

Collaboration Diagram for Search Record:


Staff System Database 1: 1.Request to Search 2: 2.Enter Regno. 3: 3.Check 4: 4.Check Database Regno. Availability 5: 5.Return Status 6: 6.Details Displayed 7: 7.Terminate

Collaboration Diagram for Delete Record:


Staff System Database 1: 1.Request to Delete 2: 2.Enter Regno. 4: 4.Check Database 3: 3.Check Regno. Availability

5: 5.Return Status 6: 6.Details Deleted 7: 7.Terminate

Collaboration Diagram for view Record:


Student System Database 1: 1.Request to View Record 2: 2.Enter Regno. 3: 3.Check 4: 4.Check Database Regno. Availability 5: 5.Return Status 6: 6.View Record 7: 7.Terminate

COMPONENT DIAGRAM:
Login Student Details Database

DEPLOYMENT DIAGRAM:
Databas e Add Search Delete View Staff Student

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
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. Its 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 Hospital 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 RATIONAL ROSE
PROCEDURE: 1. Start Rational Rose 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 CLASS DIAGRAM
Data base System startup Add Items Delete Items Search Items Update Items Bill receipt Administrator Switch on/off Enter details Enter Pr_id Enter name Enter Pr_id Enter Pr_id Customer

S T O C K M A IN T A IN A N C E
ADDPRODUCT pr_name p r _ id comp_name cost q u a n t ity add() DELETEPRODUCT pr_name p r _ id comp_name cost q u a n t it y

d e le t e ( ) SEARCHPRODUCT pr_name p r _ id comp_name cost q u a n t ity search() UPDATEPRODUCT pr_name p r _ id comp_name cost q u a n t it y update() B IL L pr_name p r _ id comp_name cost q u a n t ity b ill( ) ACTIVITY DIAGRAM
ADD RECORD ACTIVITY DIAGRAM
SEARCH RECORD ACTIVITY DIAGRAM

stock maintainance add product delete product search product update product bill receipt enter details delete Items display details update Items provide error pr_id found no yes pr_name found yes no

pr_id found yes no pr_id found yes no pr_name found Stock maintaince Enter Product id Product id found Enter product details No Error message Yes
DELETE RECORD ACTIVITY DIAGRAM

STATE CHART DIAGRAM


Stock maintanence
Enter Pr_id Pr_id found? Display Items details Yes Provide Error No

Stock maintaince Enter Product id Product id found reject No delete details Yes

ADD STOCK: SEARCH STOCK DELETE STOCK:


checking Add to database rejected /get product id [product id not available] [ product id present]
checking print details rejected /get product id [valid product id] [invalid product id]

checking delete details rejected /get product id [valid product id]

[invalid product id]

GENERATING SEQUENCE DIAGRAM, COLLABORATION DIAGRAM, COMPONENT DIAGRAM, DEPLOYMENT DIAGRAM USING RATIONAL ROSE
PROCEDURE: 1. Start Rational Rose 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. Rose 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: ADD 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 7: terminate 6: Item deleted Administrator System Database 1: request to add 2: Enter details 3: Check for pro_id 4: Check Database 5: Return status 7: terminate 6: Item added 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:

A d m inis tr a to r S ys te m D a ta b a s e 4 : C he c k d a ta b a s e 1 : re q ue s t to a d d 7 : te rm ina te 2 : E nte r d e ta ils 6 : Ite m a d d e d

3 : C he c k fo r p ro _ id 5 : R e turn s ta tus
UPDATE STOCK DETAILS:

A D M IN IS T R ATOR SYSTE M DATABA SE 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 1 3 : T e rm i n a te 2 : R e q u e s t P r_ i d 7 : R e q u e s t fo r u p d a tio n 1 2 : Ite m u p d a te d 4 : C h e c k fo r P r_ id 9 : U p d a te Ite m 6 : R e tu rn s ta tu s 1 1 : U p d a te s u c c e s s fu l


DELETE RECORD FROM STOCK:

A d m i n i s tr a to r S y s te m D a ta b a s e 4 : C h e c k D a ta b a s e 1 : r e q u e s t to d e le te 7 : t e r m i n a te 2 : E n te r p r _ i d

6 : Ite m d e le t e d 3 : C h e c k fo r p r o _ i d 5 : R e tu r n s ta t u s
COMPONENT DIAGRAM: LOGIN STOCK DETAILS DATABA SE DEPLOYMENT DIAGRAM:
ADD STOCK SEARCH STOCK DELETE STOCK SAVE STOCK ADMIN 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: FORM 1: LOGIN FORM Private Sub Command1_Click() If (Text1.Text = "STOCK" And Text2.Text = "STOCK") Then Text1.Text = " " Text2.Text = " " MsgBox ("Login success") Form2.Show Else MsgBox ("Login failed") End If End Sub Private Sub Command2_Click() Me.Hide End Sub FORM 2: Private Sub Command1_Click()

Form3.Show End Sub Private Sub Command2_Click() Form4.Show End Sub Private Sub Command3_Click() Form5.Show End Sub Private Sub Command4_Click() End End Sub FORM 3:SALES Private Sub Form_Load() Set db = OpenDatabase("C:\STOCKK\STOCK.mdb") Set rs = db.OpenRecordset("ISSUE") End Sub Private Sub Form_Paint() Data1.Recordset.AddNew End Sub Private Sub Form_Unload(Cancel As Integer) Data1.Recordset.Update End Sub Private Sub Command1_Click() Dim a As Integer If (a = Val(Text1.Text)) Then rs.MoveFirst Data1.Recordset.Update MsgBox "ITEM ISSUED" rs.MoveNext Else MsgBox ("ITEM CAN'T BE ISSUED") End If End Sub FORM 4: STOCK 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 Command5_Click() Dim a, f As Integer a = InputBox("Enter product id to search") f=0

Data1.Recordset.MoveFirst Do If (Val(a) = Data1.Recordset("PID")) Then f=1 Exit Do End If Data1.Recordset.MoveNext Loop Until (Data1.Recordset.EOF) If (f = 0) Then MsgBox ("PRODUCT NOT FOUND") End If End Sub Private Sub Command3_Click() Dim a, f As Integer a = InputBox("ENTER PRODUCT ID TO DELETE") f=0 Data1.Recordset.MoveFirst Do If (Data1.Recordset("PID") = Val(a)) Then f=1 Data1.Recordset.Delete MsgBox ("PRODUCT DELTED") Exit Do End If Data1.Recordset.MoveNext Loop Until (Data1.Recordset.EOF) If (f = 0) Then MsgBox ("PRODUCT NOT FOUND") End If End Sub FORM 5:PRODUCT 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 product id to search") f=0 Data1.Recordset.MoveFirst Do If (Val(a) = Data1.Recordset("PID")) Then

f=1 Exit Do End If Data1.Recordset.MoveNext Loop Until (Data1.Recordset.EOF) If (f = 0) Then MsgBox ("PRODUCT NOT FOUND") End If End Sub 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

Up d a te Logon A d d items D e le te items S e a rch item s C a lc ula te a llow a nc e M a na g e r e nte r d e ta ils e nte r e id e nte r e id e nte r d e ta ils

us e rnam e & p a s sw o rd
CLASS DIAGRAM

p a yro ll s ys tem Add


e nam e e id d es ig n b as ic p ay a dd res s p ho n e b lo od g ro u p a dd ()

D e le te
e n am e e id d e s ign b a s ic p a y a d dre s s p h on e b lo o dg rou p d e le te()

S e a rc h
e nam e e id d es ig n b as ic p ay a dd re s s p ho n e b lo od g rou p s ea rc h()

c a lc ula te a llo w a nc e
HR A TA DM S A PF S a la ry ()
ACTIVITY DIAGRAM
p a yro ll

system E nte r kind a d d emp D e ta ils D e le te emp D e ta ils S e a rch emp D e ta ils C a lcula te a llowa nce V iew sa la ry E nte r D eta ils D e le te D e ta ils D isp lay D eta ils P ro vid e e rro r me ssa g e No ye s ye s no no ye s e id fo und ? eid found ? e id fo und ?

STATE CHART DIAGRAMS: Add EmpDetails:


Checking Rejected Add to Database /get eid eid not Available eid Present

Search EmpDetails:
Checking Rejected Display Details /get eid valid eid invalid eid

Delete EmpDetails:
Checking Rejected Delete Details /get eid valid eid invalid eid

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: Return Status 6: Display Details 7: Terminate

DELETE RECORD SEQUENCE DIAGRAM

Manager S ystem D atab ase

1 : Request to D ele te 2 : E nter e id 3: C heck fo r eid availab ility 4: C he ck D ata base 5: Return S ta tus 6: D elete D etails 7: Termina te
COLLABORATION DIAGRAM: Collaboration Diagram for Add EmpDetails:
Manager System Database 4: 4.Check Database 1: 1.Request to Add Record 7: 7.Terminate 2: 2.Enter Details 6: 6.Details Added 3: 3.Check eid Availability 5: 5.Return Status

Collaboration Diagram for search EmpDetails:


Manager System Databas e 1: Request to Search 2: Enter eid 3: Check for 4: Check Database eid availability 5: Return Status 6: Display Details 7: Terminate

Collaboration Diagram for delete EmpDetails: Manager System Databas e 1: Request to Delete 2: Enter eid 3: Check for 4: Check Database eid availability 5: Return Status 6: Delete Details 7: Terminate

COMPONENT DIAGRAM:
Log on Emp Details Data Base

DEPLOYMENT DIAGRAM:

A d d d e t a i ls D e le te D e ta i ls

Search D e ta i ls A llo w a n c e D e ta i ls manager


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.