Ex.No. STOCK MAINTAINANCE
.08.09
PROBLEM STATEMENT :
To develop a project "STOCK MAINTENANCE SYSTEM" using the
Rational Rose Software for UML diagrams and to implement the software in Visual
Basic.
REQUIREMENT ANALYSIS :
It is a process of analyzing the User needs and transforming into a Problem
requirement. This application allows the patient to view the product details through the
database and the database is maintained by the Administrator to enter,update and add the
new products to the Database. The requirements are
1. Customer
2. Administrator
3. Products
4. DataBase
DATA MODELING :
The project can be explained diagrammatically using the following diagrams:
Use Case Diagram
Class Diagram
Sequence Diagram
Collaboration Diagram
Activity Diagram
USE CASE DIAGRAM :
A Use case is a set of scenarios tied together by a common user goal. A scenario
is a sequence of steps describing an interaction between a user and a system.
ACTORS :
An actor is a role that a user plays with respect to the system. The actors are:
Customer
Administrator
Products
DataBase
USECASE:
1.UseCaseName:CUSTOMER
Description
The Customer can login in to the system and view the system and view the stock
details and purchase.
Steps:
Enter the User ID and Password
Press the view Button to view the details of the products.
2.UsecaseName:ADMINISTATOR
Description:
The Administrator can login into the system and add or remove the stock based on
minimum availability in the database.
Steps:
Enter the admin ID and password.
Maintain the Recording level.
Add or Remove the products by pressing the corresponding buttons.
CLASS DIAGRAM :
A Class diagram describes the types of objects in the System and the various
kinds of static relationships that exist among them.
Description :
The classes used in this project are
Customer
Administrator
Database
SEQUENCE DIAGRAM:
A Sequence Diagram is a kind of interaction diagram in which an object is shown
as a box at a top of a dashed vertical line. This vertical line is called as object’s lifeline.
The lifeline represents the object’s life during the interaction. Object Deletion is
shown with a large X. Object’s can be destroyed by another message.
Description :
The various scenarios of the sequence diagram used in this project are
Customer
Database
Administrator
COLLABORATION DIAGRAM :
In a Collaboration diagram, object’s are shown as icons. As on a sequence
diagram, arrow indicate the message sent within the given Use Case. The sequence is
indicated by numbering to the messages.
Description :
This diagram contains the group of classes created, interfaces and the elements that
work together to provide the overall behavior of the project. It also describes the
relationship between each classes and how they relate with each other.
ACTIVITY DIAGRAM :
The Activity diagram describes the sequencing of activities, with support for
both conditional and parallel behavior. An activity diagram is a variant of state diagram.
Description :
The Activity diagram is similar to a traditional flowchart. It captures the event
that happens either within an object or within a group of objects.
Steps :
Check whether the person is Customer or Adminstrator.
If customer ,view the products by giving the products ID.
If Administrator, select the any one of the option Like view the detail or update or
add new.
In Customer view,check the products quantity.
Then Check for the minimum quantity.
Then Check for the minimum quantity.
In Results analysis,view thw products name
To quit the System,click and end process.
IMPLEMENTATION:
Form coding:
Form1:
Private Sub Command1_Click()
If Combo1.Text = "admin" And Text2.Text = "eswar" Then
Me.Hide
Form2.Show
ElseIf Combo1.Text = "user" And Text2.Text = "" Then
Me.Hide
Form4.Show
Else
MsgBox "invalid", 2
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Combo1.additem "admin"
Combo1.additem "user"
End Sub
Private Sub Timer1_Timer()
Label1.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
Form2:
Private Sub Command1_Click()
Me.Hide
Form3.Show
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.update
End Sub
Private Sub Command3_Click()
Me.Hide
Form1.Show
End Sub
Private Sub Command4_Click()
DataReport1.Show
End Sub
Form3:
Private Sub Command1_Click()
Me.Hide
Form2.Show
End Sub
Private Sub Timer1_Timer()
Label1.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
Form4:
Private Sub Command1_Click()
Me.Hide
Form3.Show
End Sub
Private Sub Command2_Click()
MsgBox "Enter the quantity"
Label4.Visible = True
Text7.Visible = True
Command3.Visible = True
End Sub
Private Sub Command3_Click()
Label9.Visible = True
Text8.Visible = True
Command4.Visible = True
If Val(Text3.Text) > Val(Text7.Text) Then
Text8.Text = Val(Text7.Text) * Val(Text6.Text)
Text3.Text = Val(Text3.Text) - Val(Text7.Text)
ElseIf Val(Text3.Text) < Val(Text7.Text) Then
MsgBox "Not available that much Quantity"
End If
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.update
MsgBox "Pay the Bill"
MsgBox "You bought the Item"
Me.Hide
Form5.Show
End Sub
Form5:
Private Sub Command1_Click()
Me.Hide
Form4.Show
End Sub
Private Sub Command2_Click()
MsgBox "Thank You! Welcome Again"
End
End Sub
Class modules:
customer.cls
Option Explicit
'##ModelId=4A8D04A0007D
Private name As Variant
'##ModelId=4A8D04A10128
Private qualification As Variant
'##ModelId=4A8D04A701A5
Private specialisation As Variant
'##ModelId=4A8D04BA02BF
Public Sub cures_disease()
End Sub
Admistrator.cls:
Option Explicit
'##ModelId=4A8D041F0128
Private name As Variant
'##ModelId=4A8D0420033C
Private age As Variant
'##ModelId=4A8D0423031C
Private address As Variant
'##ModelId=4A8D04CA00EA
Public NewProperty As rep
'##ModelId=4A8D04E1004E
Public NewProperty2 As doctor1
'##ModelId=4A8D042D01B5
Public Sub visits()
End Sub
'##ModelId=4A8D04330148
Public Sub admit()
End Sub
Database.cls:
Option Explicit
'##ModelId=4A8D048100BB
Private name As Variant
'##ModelId=4A8D0482008C
Private age As Variant
'##ModelId=4A8D04830242
Private salary As Variant
'##ModelId=4A8D04D903B9
Public NewProperty As patient1
'##ModelId=4A8D04DE00AB
Public NewProperty2 As doctor1
'##ModelId=4A8D048B02AF
Public Sub sees_i_f()
End Sub
TESTING-STOCK MAINTAINANCE
TESTING :
Testing is the process of executing a program with the intent of finding errors.
TESTCASE 1 :
BLACKBOX TESTING :
Black box testing or behavioral testing focuses on the functional requirements
of software. Black box testing enables the software Engineer to drive sets of input
condition that will fully exercise all functional requirements for a program.
Input :
Product Name or products ID
Output :
View the products details which is purchased.
Remark :
Expected result is obtained.
TEST CASE 2 :
VALIDATION TESTING :
Validation testing refers to a different set of activities that ensures that the
software that has been built is traceable to customer requirements.
CUSTOMER DETAILS:
Input :
Customer Name,ID,Product Name,ID.
Output :
View and Purchase operations are carried out.
Remark :
Expected result for is obtained.
ADMINSTRATOR DETAILS:
Input :
Admin Name,Admin Id Product ID.
Output :
Add,view and Update operation are carried out.
Remark :
Expected result for is obtained.
RESULTCHECKING:
Input:
Given the products are displayed.
Output:
Total purchased products are displayed.
Remark:
Expected result is obtained.
CONCLUSION :
Thus the STOCK MAINTAINANCE SYSTEM was developed using Rational
Rose for UML(Unified Modeling Language) diagrams and the software was implemented
in Visual Basic and the output was verified.