Académique Documents
Professionnel Documents
Culture Documents
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
INTERNAL EXAMINER
EXTERNAL EXAMINER
STUDENTS MARKS ANALYSIS SYSTEM S.NO DATE 1. 2. TITLE Problem Analysis and project planning Generating Use case diagram, Class diagram, Activity diagram, Sequence diagram, collaboration, component and deployment diagram using rational Rose Rose implementation PAGE.NO SIGN
3.
4. 5.
STOCK MAINTENANCE SYSTEM S.NO DATE 1. 2. TITLE Problem Analysis and project planning Generating Use case diagram, Class diagram, Activity diagram, Sequence diagram, collaboration, component and deployment diagram using rational Rose Rose implementation PAGE.NO SIGN
3.
4. 5.
PAYROLL MANAGEMENT SYSTEM S.NO DATE 1. 2. TITLE Problem Analysis and project planning Generating Use case diagram, Class diagram, Activity diagram, Sequence diagram, collaboration, component and deployment diagram using rational Rose Rose implementation PAGE.NO SIGN
3.
4.
Coding
Objectives: To design a model for the Student Marks analyzingsystem using UML and generate code using VB. Infrastructure: a) b) Hardware Requirements :PC 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: 2. Alternate flow: invalid name/password 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.
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: 4. Precondition: 5. Post condition: If the use case was successful, the actor is now logged into the system. If not the system state is unchanged The actor should select any category None
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: 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 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
3. Special requirements: 4. Precondition: 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 use case will connect to the entry form interface. None
Search: Flow of events: 1. Basic flow 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 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.
3. Special requirements: 4. Precondition: 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. use case will connect to the search form interface. None
Update: Flow of events: 1. Basic flow 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 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.
3. Special requirements: 4. Precondition: 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. use case will connect to the update form interface. None
Delete: Flow of events: 1. Basic flow 2. Alternate flow: invalid data item 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.
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: 4. Precondition: 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. use case will connect to the delete form interface. None
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. 2. To add a state, select state from the tool box bar. Click on the state transition diagram where the state should appear.
To add an activity: 1. 2. 3. 4. 5. 6. activity. Open a specification window for the desired state. Select the detail lab. Right click on the actins box. Select insert from the pop up menu. Double click the new action. Enter the action in the actions field. In the when box, select enter until exit to make the new action an
U s e rn a m e & P a s s w o rd
S tudent
L o g in
V ie w R e c o rd
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.
S t a ff
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
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 nam e re g n o dept s e m _ m a rk s a d d ()
S e a rc h R e c o rd nam e re g n o dept s e m _ m a rk s s e a rc h ()
D e le t e R e c o r d nam e re g n o dept s e m _ m a rk s d e le t e ( )
V ie w R e c o rd nam e re g n o dept s e m _ m a rk s d is p l a y ( )
ACTIVITY DIAGRAM
ACTIVITY DIAGRAM FOR STUDENT
S tu de n t M a rk lis t
E nter Ty pe
A dd Record
Y es
No
No
Search Record:
Delete Record:
View Record:
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. 2. 3. 4. Right click the appropriate package/use case in the browser. From the short cut menu,select new -> Sequence diagram. Name the new sequence diagram. 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. 2. 3. 4. Right click the appropriate use case in the browser. From the short cut menu, select new->collaboration diagram. Name the new collaboration diagram. 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
System
Database
2.Enter Regno.
3.Check Regno.
4.Check Database
7.Terminate
System
Database
2.Enter Regno.
4.Check Database
7.Terminate
System
Database
2.Enter Regno.
4.Check Database
7.Terminate
System
Database
2.Enter Regno.
4.Check Database
7.Terminate
COLLABORATION DIAGRAM S;
Collaboration Diagram for Add Record:
1: 1.Request to Add 7: 7.Terminate Staff 2: 2.Enter Regno. 6: 6.Details Added System
5: 5.Return Status
4: 4.Check Database
3: 3.Check Regno.
Database
5: 5.Return Status
4: 4.Check Database
Database
5: 5.Return Status
4: 4.Check Database
Database
1: 1.Request to View Record 7: 7.Terminate Student 2: 2.Enter Regno. 6: 6.View Record System
5: 5.Return Status
4: 4.Check Database
Database
COMPONENT DIAGRAM:
Login
Student Details
Database
DEPLOYMENT DIAGRAM:
Add
Search
Delete
View
Staff
Student
Databas e
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
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
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
FORM2:STAFF LOGIN:
SAVE:
SEARCH:
DELETE
Result: Thus the implementation of STUDENT MARKS ANALYZING SYSTEM is developed in visual basic and output is tested using rational rose software.
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.
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) 2) 3) 4) 5) 6) Login Add stock details Delete stock details Search Update stock details Bill receipt.
Brief description: The use case describes how a user logs into stock maintenance. Flow of events: 1. Basic flow: 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 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
3. Special requirements: 4. Precondition: 5. Post condition: 2. ADD STOCK DETAILS: Brief description: If the use case was successful, the actor is now logged into the system. If not the system state is unchanged The actor should select any category None
The use case describes how to add the stock Flow of events: 1. Basic flow: 2. Alternate flow: Copy of product id. If we enter the already existing pr_id, it will not be added in the stock. 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
3. Special requirements: 4. Precondition: 5. Post condition: 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 If the use case was successful, the item is now added into the system. If not the system state is unchanged The actor should enter the pr_id None
2. Alternate flow: Invalid product id. If we enter the invalid pr_id, it will not be deleted from the stock.
3. Special requirements: 4. Precondition: 5. Post condition: 4. SEARCH STOCK: Brief description: The use case describes how to search the product from stock. Flow of events: 1.Basic flow: 2. Alternate flow: Invalid product name. If we enter the invalid pr_name, it will not be searched. 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. If the use case was successful, the item is now deleted into the system. If not the system state is unchanged The actor should enter the pr_id None
3. Special requirements: 4. Precondition: The actor should enter the pr_name None
5. Post condition: 5. UPDATE STOCK: Brief description: The use case describes how to update the product from stock. Flow of events: 1. Basic flow: 2. Alternate flow: Invalid product name. If we enter the invalid pr_name, it will not be searched. 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. If the use case was successful, the items are now searched and display the details of the product.
3. Special requirements: 4. Precondition: 5. Post condition: If the use case was successful, the items are now searched and display the details of the product. The actor should enter the pr_name None
The use case describes how to display the bill for the product purchased. Flow of events: 1. Basic flow: 2. Alternate flow: None. 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.
3. Special requirements: 4. Precondition: 5. Post condition: If the use case was successful, the product details.are displayed The actor should enter the pr_name . None
GENERATING USE CASE DIAGRAM, CLASS DIAGRAM, STATE CHART DIAGRAM, ACTIVITY DIAGRAM USING RATIONAL ROSE
PROCEDURE: 1. 2. 3. 4. 5. 6. Start Rational Rose Enterprise Edition. Create New Use case view. Draw the Use case diagram. Draw the corresponding Class diagram. Draw the state chart and activity diagram. 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. 2. To add a state, select state from the tool box bar. Click on the state transition diagram where the state should appear.
To add an activity: 1. 2. 3. 4. 5. 6. activity. Open a specification window for the desired state. Select the detail lab. Right click on the actins box. Select insert from the pop up menu. Double click the new action. Enter the action in the actions field. In the when box, select enter until exit to make the new action an
System startup Switch on/off Enter details Enter Pr_id Administrator Enter name Delete Items Data base Update Items Enter Pr_id
Add Items
Enter Pr_id
Search Items
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 S 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 T 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
yes
no
no
no
provide error
Stock maintaince
Enter Product id Product id found Yes No Enter product details Error message
Stock maintanence
Enter Pr_id Pr_id found? Yes No Provide Error Display Items details
Stock maintaince
ADD STOCK:
/get product id checking [product id not available] [ product id present] Add to database
rejected
SEARCH STOCK
/get product id checking [valid product id] [invalid product id] print details
rejected
DELETE STOCK: /get product id checking [valid product id] [invalid product id] delete details
rejected
GENERATING SEQUENCE DIAGRAM, COLLABORATION DIAGRAM, COMPONENT DIAGRAM, DEPLOYMENT DIAGRAM USING RATIONAL ROSE
PROCEDURE: 1. 2. 3. 4. 5. 6. Start Rational Rose Enterprise Edition. Create New Use case view. Draw the use case diagram. Draw the corresponding Class diagram. Draw the state chart and activity diagrams. 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. 2. 3. 4. Right click the appropriate use case in the browser. From the short cut menu, select new->collaboration diagram. Name the new collaboration diagram. 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
1: request to delete 2: Enter pr_id 3: Check for pro_id 5: Return status 4: Check Database
1: request to add 2: Enter details 3: Check for pro_id 5: Return status 4: Check Database
ADMINISTRATOR
SYSTEM
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
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
4 : C h e c k D a ta b a s e
3 : C h e c k f o r Dp a ot a_ bi da s r 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 DETAILS
DATABA SE
DEPLOYMENT DIAGRAM:
ADD STOCK
SEARCH ST OCK
DELETE ST OCK
SAVE ST OCK
ADMIN
DATABAS E
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:
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: 2. Alternate flow: invalid name/password 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.
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: 4. Precondition: 5. Post condition: If the use case was successful, the actor is now logged into the system. If not the system state is unchanged The actor should select any category None
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: 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 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
3. Special requirements: 4. Precondition: 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 Use case will connect to the entry form interface. None
Search: Flow of events: 1. Basic flow 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 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.
3. Special requirements: 4. Precondition: 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. use case will connect to the search form interface. None
Delete: Flow of events: 1. Basic flow 2. Alternate flow: invalid data item 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.
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: 4. Precondition: 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. use case will connect to the delete form interface. None
Calculate Allowance: Flow of events: 1. Basic flow 2. Alternate flow: There is no chance for error. The allowance is calculated for existing record only. 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.
3. Special requirements: 4. Precondition: 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. use case will connect to the calculate allowance form interface. None
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. 2. appear. To add a state, select state from the tool box bar. Click on the state transition diagram where the state should
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.
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 e M a na g e r nte r e id e nte r e id e nte r d e ta ils D e le te ite m s U p d a te
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
enam e e id d e s ig n b a s ic p a y a d d re s s phone b lo o d g ro u p a d d ()
D e le te
enam e e id d e s ig n b a s ic p a y a d d re s s phone b lo o d g ro u p d e le t e()
S e a rc h
enam e e id d e s ig n b a s ic p a y a d d re s s phone b lo o d g ro u p s e a rc h ()
c a lc ula te a llo w a nc e
HRA TA DM S A PF S a la ry ()
ACTIVITY DIAGRAM
p a yro ll syste m
E nte r kind
C a lcula te a llo wa nc e
ye s D isp la y D e ta ils
V ie w sa la ry
no
P ro vid e e rro r m e s sa g e
Add EmpDetails:
/get eid Checking eid not Available eid Present Rejected Add to Database
Search EmpDetails:
/get eid Checking valid eid invalid eid Rejected Display Details
Delete EmpDetails:
/get eid Checking valid eid invalid eid Rejected Delete Details
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. 2. 3. 4. Right click the appropriate use case in the browser. From the short cut menu, select new->collaboration diagram. Name the new collaboration diagram. 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
System
Database
2.Enter Details
4.Check Database
7.Terminate
M n ger aa
S ste y m
D taba a se
4 C eck D ta se : h a ba
7 T in : erm ate
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
7 : Te rm ina te
COLLABORATION DIAGRAM:
5: 5.Return Status
4: 4.Check Database
Database
D bas ata e
1: Request to Delete 7: Term inate M anager 2: Enter eid 6: Delete Details System
Databas e
COMPONENT DIAGRAM:
Log on
Emp Details
Data Base
DEPLOYMENT DIAGRAM:
A d d d e t a i ls D e le t e D e ta i ls
S e a rc h D e ta i ls
A llo w a n c e D e t a i ls
m anager
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:
ALLOWANCE CALCULATION
RESULT:
Thus the implementation of THE PAYROLL SYSTEM is developed using visual basic and output is tested using rational rose software.