Manual
Manual
Problem Statement
As the head of information systems for a college, you are tasked with developing
a new student registration system. The college would like a new client-server system to
replace its much older system developed around main frame technology. The new system
will allow students to register for courses and view report cards from PCs attached to the
campus LAN. Professors will be able to access the system to sign up to teach courses as
well as record grades.
Students may request a course catalogue containing list of course offering for all
college. Information about each course, such as professor, department and prerequisites,
will be included to help students make informed decisions.
Once the registration process is completed for the student, the registration system
sends information to the billing system so that the student can be billed for the course.
1
USE CASE DIAGRAM-STUDENT
CLASS DIAGRAM
2
ACTIVITY DIAGRAM
3
SEQUENCE DIAGRAM
4
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
5
STAT E CHART DIAGRAM
6
AFTER CODE GENERATION:
#ifndef ADMINISTRATOR_H_HEADER_INCLUDED_B57DCBB5
#define ADMINISTRATOR_H_HEADER_INCLUDED_B57DCBB5
//##ModelId=4A78FD620284
class ADMINISTRATOR : public DataBase
{
public:
//##ModelId=4A78FF110388
Course();
//##ModelId=4A78FF1801A4
Level checking();
//##ModelId=4A78FF210156
Login();
private:
//##ModelId=4A78FF2A02CE
Admin pass;
};
#endif /* ADMINISTRATOR_H_HEADER_INCLUDED_B57DCBB5 */
REVERSE ENGINEERING
#ifndef ADMINISTRATOR_H_HEADER_INCLUDED_B57DCBB5
#define ADMINISTRATOR_H_HEADER_INCLUDED_B57DCBB5
//##ModelId=4A78FD620284
class ADMINISTRATOR : public DataBase
{
public:
//##ModelId=4A78FF110388
Course();
//##ModelId=4A78FF1801A4
Level checking();
//##ModelId=4A78FF210156
Login();
private:
//##ModelId=4A78FF2A02CE
Admins pass;
};
#endif /* ADMINISTRATOR_H_HEADER_INCLUDED_B57DCBB5 */
7
IMPLEMENTAION USING VB AND MS ACCESS
Form 1:
Form 2:
8
Form 3:
CODING:
9
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\
no_of_seats.mdb;Persist Security Info=False"
db.Open
End Sub
Form 4:
CODING:
10
Form2.Hide
Form3.Show
End Sub
Form 5:
11
CODING:
12
str1 = "update table2 set no_of_seats='" + s1 + "' where colleges='" + Combo2.Text + "'
and branch='" + Combo4.Text + "'"
Set rs = db.Execute(str1)
MsgBox ("SUCCESSFULLY REGISTER")
Form3.Show
Form5.Hide
End Sub
Private Sub Command3_Click()
Form5.Hide
Form3.Show
End Sub
Result
Thus the course registration system has been developed successfully using VB
and its output is verified.
VIVA QUESTION
13
Ex. No. 2 E- TICKETING
Date:
Problem Statement
Our project is carried out to develop software for online Railway Reservation
System. The software is coded in VB, which is the front end, and it has Back end, which
contains information about the reservation and the availability of seats in trains. It has
various options like reservation, cancellation and to view details about available seats.
Our project mainly simulates the role of a Railway ticket booking officer, in a
computerized way.
The reservation option enables a person to reserve for a ticket at their home itself.
All he/ she has to do is to just login and enter the required details. After this the
reservation database is updated with the person details, train name and also the source
and destination place.
The cancellation option enables the passenger to cancel the tickets that has been
already booked by him/her.
The availability option prompts the person to enter train number, train name and
date of travel. After this the availability database is accessed and available positions are
produced.
14
CLASS DIAGRAM :-
15
INTERACTION DIAGRAM :-
16
ACTIVITY DIAGRAM :-
17
STATE CHART DIAGRAM :-
18
COMPONENT DIAGRAM :-
DEPLOYMENT DIAGRAM :-
19
FORWARD ENGINEERING :-
Passenger.h
#ifndef PASSENGER_H_HEADER_INCLUDED_B57D8580
#define PASSENGER_H_HEADER_INCLUDED_B57D8580
#include "cancellation.h"
//##ModelId=4A79064B0139
class passenger : public cancellation
{
public:
//##ModelId=4A79069002E0
booking ();
//##ModelId=4A79069901A8
cancellation();
private:
//##ModelId=4A7906AB038D
name;
//##ModelId=4A7906B20012
age;
//##ModelId=4A7906B60254
sex;
//##ModelId=4A7906BB011C
addres;
};
#endif /* PASSENGER_H_HEADER_INCLUDED_B57D8580 */
Passenger.cpp
#include "passenger.h"
//##ModelId=4A79069002E0
passenger::booking ()
{
}
//##ModelId=4A79069901A8
passenger::cancellation()
{
}
20
REVERSE ENGINEERING :-
#ifndef PASSENGER_H_HEADER_INCLUDED_B57D8580
#define PASSENGER_H_HEADER_INCLUDED_B57D8580
#include "cancellation.h"
//##ModelId=4A79064B0139
class passenger : public cancellation
{
public:
//##ModelId=4A79069002E0
booking_ticket();
//##ModelId=4A79069901A8
cancellation();
private:
//##ModelId=4A7906AB038D
name;
//##ModelId=4A7906B20012
age;
//##ModelId=4A7906B60254
sex;
//##ModelId=4A7906BB011C
addres;
};#endif /* PASSENGER_H_HEADER_INCLUDED_B57D8580 */
21
FORM DESIGN USING VISUAL BASIC
FORM 1
CODE:
22
FORM 2:
CODE :
23
FORM 3:
CODE :
24
l = Val(rs(0))
p=l+1
s1 = p
str1 = "update passengerdet set sleeper='" + s1 + "' "
Set rs = db.Execute(str1)
End If
MsgBox "ticket has been cancelled"
End
End Sub
Private Sub Form_Load()
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\db\
form6.mdb;Persist Security Info=False"
db.Open
End Sub
FORM 4 :
CODE :
25
Text1.Text = rs(0)
End Sub
FORM 5 :
CODE :
26
str = "select sleeper from passengerdet "
Set rs = db.Execute(str)
l = Val(rs(0))
p=l-1
s1 = p
str1 = "update passengerdet set sleeper='" + s1 + "' "
Set rs = db.Execute(str1)
End If
Form6.Show
End Sub
FORM 6 :
CODE :
Result
Thus the E- ticket reservation system for railway has been developed successfully
and its output is verified.
27
VIVA QUESTION
1. What are all the applications of E- Ticketing?
2. List the disadvantage of E- Ticketing application.
3. How to resolve many to many relationships?
4. How do you represent static members and abstract classes in Class Diagram?
5. Can we use UML for user interface (UI) design?
6. How to reverse engineer C++ code in UML?
7. How do you convert uses cases into test cases?
8. Difference: Object Oriented Analysis (OOA) and Object Oriented Design
(OOD)?
9. What are the tools you used for OOAD?
10. What are the four phases of the Unified Process?
11. What is association?
12. How to use CRC Cards for Class Design?
PROBLEM STATEMENT
Design a Recruitment System with all necessary details such as Employee
number, Employee name, his personal details and Designation, etc. where a operator can
select his Employee number and see the details of him. And also calculate Basic pay,
HRA, Allowance, etc, for salary details. The Employee Payroll System consist of details
of Employee who already working in the company or a newly employed person. The
details of newly employed person should be updated in the database.
This new software for payroll does various tasks to facilitate the companies recruitment
and payroll calculation. The various tasks done are:
1. To get the employee ID that is used for login purposes. This ID is verified for
authentication with the database and the employee is given the rights to login.
2. After logging in, the next task is to display all the details of the employee
displaying the details such as
i. Name.
ii. Designation
iii. Employee ID
28
3. The next task is to calculate the salary of the employee taking into account the
following details such as HRA, DA, TA, PF, LIC as follows
Gross Salary = (per day salary * worked days) + (HRA + DA +
TA)
4. The final task is to calculate the net salary by calculating the detection
Deduction = PF + LIC
Net Salary = Gross Salary – Deduction
5. The salary calculation differs for each employee depending upon his designation
and it should be mentioned by the employee while logging in the system.
USECASE DIAGRAM:
CLASS DIAGRAM:
29
30
ACTIVITY DIAGRAM:
31
SEQUENCE DIAGRAM:
32
COLLABORATION DIAGRAM:
STATECHART DIAGRAM:
33
DEPLOYMENT DIAGRAM:
CODING:
Form 1:
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "Please Enter Username"
Text1.SetFocus
ElseIf Text1.Text = "admin" And Text2.Text = "password" Then
Form1.Hide
Form2.Show
Form2.SetFocus
ElseIf Text1.Text = "employee" And Text2.Text = "password" Then
Form1.Hide
Form4.Show
Form4.SetFocus
Else
34
MsgBox "Invalid Username or Password... Try Again!!!"
Text1.SetFocus
SendKeys "{home}+{end}"
Text2.Text = ""
End If
End Sub
Form 2:
Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub
35
Data1.Recordset.MoveFirst
End Sub
Form 3:
Private Sub Command1_Click()
Data1.Recordset.Edit
Text1.SetFocus
End Sub
36
Private Sub Command10_Click()
End
End Sub
37
Private Sub Command8_Click()
Form3.Hide
Form2.Show
Form2.SetFocus
End Sub
Form 4:
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub
38
Form1.Show
Form1.SetFocus
End Sub
Form 2:
39
Form 3:
Form 4:
40
RESULT
Thus the recruitment processing System in Visual Basic is successfully created,
executed and the output is verified.
VIVA QUESTION
1. What is meant by recruitment system?
2. What are all the main modules of this application?
3. Why generalization is very strong?
4. Differentiate Aggregation and containment?
5. Can link and Association applied interchangeably?
6. What is meant by “method-wars”?
7. Whether unified method and unified modeling language are same or different?
8. Who were the three famous amigos and what was their contribution to the object
community?
9. Differentiate the class representation of Booch, Rumbaugh and UML?
10. What do you mean by "Realization"?
11. What is a Persistent, Transient Object?
Problem Statement
Design an automated exam registration System that contains a database that holds
five different questions with four options. The user has to select one option and 2points is
awarded on each correct answer. The Quiz comprises of five questions. Each question
contains four options of which one is correct. The user has to select one option and he/she
is awarded 2points on each correct answer.
Design a Login form to enter Username. Before entering the Quiz, an Instruction
form is shown to the user. If the user accepts the instruction, the Quiz Questions form is
shown. The user has to select one correct option out of the four options for each question
and click next. 2points are awarded on each correct answer given. After answering the
last question of the Quiz, the Score form is displayed.
41
Use – Case Diagrams:
System:
Select Questions
Evaluate
System
Generate Report
Administrator:
Define Rules
Update Database
Administrator
Maintain Server
42
Participant:
Enter Details
Specify Field
Participant
Take the Test
Print Report
Class Diagram:
Admin User
name : String name : String
id : Integer id : Integer
update_db() register()
maintain() field()
test()
score()
0..*
Database Systm
field : String login : String
level : Integer password : String
1 1
question() verify()
validate() updatescore()
answer() 1 report()
1
score() time()
Exam
field : String
0..* level : Integer
no_qns : Integer
evaluate()
opname2()
opname3()
43
Sequence Diagram:
Acknowledge
Display Instruction
Provide Field
Retrieve Question
Provide Question
Give Answer
Validate Answer
Submit Score
Update Score
44
State Chart Diagram:
Idle Start
entry/ User & System at Idle State entry/ Login & Password
exit/ Ask for Password exit/ Successful Login
Test
Report Verify
45
Activity Diagram
Registers
Stores in
Provides id and Database
Password
Choses Field
Processes it
Selects the
questions
User answers
the questions
Validation
Pass Fail
Request
Store in
Database
Generate
Report
User Recieves
Report
Logout
46
Component Diagram:
Server
User Database
Interface
Deployment Diagram:
Server
TCP/IP
TCP/IP
Client PC
Database
LPT1
Printer
47
Reverse Engineering
Admin User
name : String name : String
id : Integer id : Integer
update_db() register()
maintaindetails() field()
test()
score()
0..*
Database Systm
field : String login : String
level : Integer password : String
1 1
question() verify()
validate() updatescore()
answer() 1 report()
1
score() time()
Exam
field : String
0..* level : Integer
no_qns : Integer
evaluate()
opname2()
opname3()
Admin.cpp
#include "Admin.h"
//##ModelId=4A6FD3E501DC
Admin::update_db()
{
}
//##ModelId=4A6FD3F50298
Admin::maintain()
{
}
Admin.h
#ifndef ADMIN_H_HEADER_INCLUDED_B57DB81C
#define ADMIN_H_HEADER_INCLUDED_B57DB81C
//##ModelId=4A6FD38E023A
class Admin
{
48
public:
//##ModelId=4A6FD3E501DC
update_db();
//##ModelId=4A6FD3F50298
maintain();
private:
//##ModelId=4A6FD39D0269
String name;
//##ModelId=4A6FD3C80150
Integer id;
};
#endif /* ADMIN_H_HEADER_INCLUDED_B57DB81C */
Admin.h(Reverse Engineering)
#ifndef ADMIN_H_HEADER_INCLUDED_B57DB81C
#define ADMIN_H_HEADER_INCLUDED_B57DB81C
//##ModelId=4A6FD38E023A
class Admin
{
public:
//##ModelId=4A6FD3E501DC
update_db();
//##ModelId=4A6FD3F50298
maintaindetails();
private:
//##ModelId=4A6FD39D0269
String name;
//##ModelId=4A6FD3C80150
Integer id;
};
#endif /* ADMIN_H_HEADER_INCLUDED_B57DB81C */
49
Form 1:
Form 2:
50
Form 3:
Form 4:
51
Form 5:
52
Form 1:
Form 2:
53
If Check1.Value = 0 Then
Command2.Enabled = False
End If
End Sub
Form 3:
54
Unload Me
End Sub
Private Sub Command2_Click()
Form1.Show
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
Combo1.Clear
Combo2.Clear
For i = 1 To 31
Combo1.AddItem i
Next i
For i = 1 To 12
Combo2.AddItem i
Next i
For i = 1970 To DateTime.Year(DateTime.Date)
Combo3.AddItem i
Next i
End Sub
Form 4:
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i As Integer
Dim s As String
Dim q(20) As String
Dim c1(20) As String
Dim c2(20) As String
Dim c3(20) As String
Dim c4(20) As String
Dim ans(20), mans(20) As String
Dim ch(20) As Integer
Dim j As Integer
Dim k As Integer
Dim cnt As Integer
Dim choice(5) As Boolean
Dim s1, m As Integer
Private Sub Command1_Click()
If Option1.Value = True Then
mans(j) = Option1.Caption
End If
If Option2.Value = True Then
mans(j) = Option2.Caption
End If
If Option3.Value = True Then
mans(j) = Option3.Caption
55
End If
If Option4.Value = True Then
mans(j) = Option4.Caption
End If
'MsgBox mans(j)
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
If Label2.Caption = 4 Then
cnt = 1
MsgBox cnt
End If
If j < 5 Then
j = j + 1
Command1.Visible = True
Label1.Caption = q(j)
Option1.Caption = c1(j)
Option2.Caption = c2(j)
Option3.Caption = c3(j)
Option4.Caption = c4(j)
k = k + 1
'MsgBox mans(j)
End If
If j = 4 Then
Command1.Visible = False
End If
If j > 0 Then
Command2.Visible = True
End If
Label2.Caption = j
End Sub
Private Sub Command2_Click()
'j = j - 1
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
k = k - 1
If Option1.Value = True Then
mans(k) = Option1.Caption
End If
If Option2.Value = True Then
mans(k) = Option2.Caption
End If
If Option3.Value = True Then
mans(k) = Option3.Caption
56
End If
If Option4.Value = True Then
mans(k) = Option4.Caption
End If
If k >= 0 Then
Command2.Visible = True
Label1.Caption = q(k)
Option1.Caption = c1(k)
Option2.Caption = c2(k)
Option3.Caption = c3(k)
Option4.Caption = c4(k)
j = j - 1
End If
If k = 0 Then
Command2.Visible = False
j = 0
End If
If j < 5 Then
Command1.Visible = True
End If
Label2.Caption = j
End Sub
Private Sub Command3_Click()
Dim u, score As Integer
score = 0
rs.Close
rs.Open
Set rs = db.Execute("select ans,chosen from question")
rs.MoveFirst
Do Until rs.EOF
If rs(0) = rs(1) Then
score = score + 1
db.Execute ("update question set chosen='nil' where
chosen='" + rs(1) + "'")
End If
rs.MoveNext
Loop
Dim scr As String
scr = score
db.Execute ("update score set score=" + scr)
db.Close
Command2.Visible = False
Form5.Show
Unload Me
End Sub
Private Sub Form_Load()
57
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Z:\quiz development\quiz.mdb;Persist Security
Info=False"
db.Open
Set rs = db.Execute("select * from question")
i = 0
Do While Not rs.EOF
q(i) = rs(1)
c1(i) = rs(2)
c2(i) = rs(3)
c3(i) = rs(4)
c4(i) = rs(5)
ans(i) = rs(6)
rs.MoveNext
'MsgBox choice(i)
i = i + 1
Loop
Label1.Caption = q(0)
Option1.Caption = c1(0)
Option2.Caption = c2(0)
Option3.Caption = c3(0)
Option4.Caption = c4(0)
j = 0
Label2.Caption = j
k = 0
cnt = 0
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
m = 1
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
db.Execute ("update question set chosen='" + Option1.Caption
+ "' where ques='" + Label1.Caption + "'")
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
db.Execute ("update question set chosen='" + Option2.Caption
+ "' where ques='" + Label1.Caption + "'")
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
58
db.Execute ("update question set chosen='" + Option3.Caption
+ "' where ques='" + Label1.Caption + "'")
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
db.Execute ("update question set chosen='" + Option4.Caption
+ "' where ques='" + Label1.Caption + "'")
End If
End Sub
Private Sub Timer1_Timer()
Label3.Caption = s1
s1 = s1 + 1
If Label3.Caption = "300" Then
Label4.Caption = m
m = m + 1
s1 = 0
End If
End Sub
Private Sub Timer2_Timer()
If Label4.Caption = "60" Then
Timer1.Enabled = False
Command3.Value = True
End If
End Sub
Form 5:
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
59
'MsgBox sc
Set rs = db.Execute("select name,email from regdetails")
Label2.Caption = "UserID:" + user
Label1.Caption = "Name:" + rs(0)
Label3.Caption = "Score:" + sc
Dim p As Integer
p = (Val(sc) / 5) * 100
If p > 40 Then
Label4.Caption = "PASS"
Else
Label4.Caption = "FAIL"
End If
Label5.Caption = "Email ID:" + rs(1)
db.Execute ("delete * from score")
db.Close
End Sub
Private Sub Timer1_Timer()
Animation1.Visible = False
Timer1.Enabled = False
End Sub
RESULT:
Thus the exam registration System in Visual Basic is successfully created,
executed and the output is verified.
VIVA QUESTION
1. What is meant by exam registration system?
2. What are all the applications of this project?
3. How to Create a Domain Model — Three Steps
4. Define Conceptual Classes
5. What is meant by Attributes?
6. What is aggregation in UML?
7. What is meant by fork in activity diagram?
8. What are the three types of Stereotype Classes?
9. Define merge
10. ____________is a function with object scope.
11. When to Use: State Diagrams?
12. Does a class inherit the constructors of its super class?
60
Date:
PROBLEM STATEMENT
Design a Student Mark Analyzing System with Total, Grade, and Result &
Percentage calculation. Each Student should have their own Register Number which is
unique. The Student Analysis System consists of the login form where either student or
staff can login. If logged in as staff, the form provides options for Student Details entry
such as Name, RegNo, Marks etc,. Else If logged in as student, the form displays
Student’s Mark Analysis with Total, Grade, Result and Percentage Calculated.
Design a Login form where either student or staff can login. The Student Details
form for staff login must provide options for Student Details entry. The Student Details
form for student login must contain all details of the student including total, grade, result
& percentage of each student.
Usecase Diagram
61
CLASS DIAGRAM:
ACTIVITY DIAGRAM:
62
SEQUENCE DIAGRAM:
63
STATECHART DIAGRAM:
DEPLOYMENT DIAGRAM:
64
CODING:
Form 1:
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "Please Enter UserName"
Text1.SetFocus
ElseIf Text1.Text = "student" And Text2.Text = "password" Then
Form1.Hide
Form3.Show
ElseIf Text1.Text = "staff" And Text2.Text = "password" Then
Form1.Hide
Form2.Show
Else
MsgBox "Invalid UserName or Password. Try Again."
Text2.Text = ""
Text1.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Form 2:
Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub
65
If Val(Text3.Text) >= 50 And Val(Text4.Text) >= 50 And Val(Text5.Text) >= 50
Then
If Val(Text6.Text) / 3 >= 80 Then
Text7.Text = "A"
ElseIf Val(Text6.Text) / 3 >= 70 And Val(Text6.Text) / 3 < 80 Then
Text7.Text = "B"
ElseIf Val(Text6.Text) / 3 >= 60 And Val(Text6.Text) / 3 < 70 Then
Text7.Text = "C"
ElseIf Val(Text6.Text) / 3 >= 50 And Val(Text6.Text) / 3 < 60 Then
Text7.Text = "D"
Else
Text7.Text = "-"
End If
Else
Text7.Text = "-"
End If
End Sub
66
Private Sub Command13_Click()
Text6.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text)
If Val(Text3.Text) >= 50 And Val(Text4.Text) >= 50 And Val(Text5.Text) >= 50
Then
If Val(Text6.Text) / 3 >= 80 Then
Text7.Text = "A"
ElseIf Val(Text6.Text) / 3 >= 70 And Val(Text6.Text) / 3 < 80 Then
Text7.Text = "B"
ElseIf Val(Text6.Text) / 3 >= 60 And Val(Text6.Text) / 3 < 70 Then
Text7.Text = "C"
ElseIf Val(Text6.Text) / 3 >= 50 And Val(Text6.Text) / 3 < 60 Then
Text7.Text = "D"
Else
Text7.Text = "-"
End If
Else
Text7.Text = "-"
End If
If Val(Text3.Text) >= 50 And Val(Text4.Text) >= 50 And Val(Text5.Text) >= 50
Then
Text8.Text = "PASS"
Else
Text8.Text = "FAIL"
End If
Text9.Text = Val(Text6.Text) / 3
End Sub
67
Private Sub Command15_Click()
Form2.Hide
Form1.Show
End Sub
68
Private Sub Command9_Click()
Text6.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text)
End Sub
Form 3:
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub
69
OUTPUT:
Form 1:
Form2:
70
Form 3:
RESULT:
Thus the Personal management System in Visual Basic is successfully created,
executed and the output is verified
VIVA QUESTION
1. What is meant by personal management system?
2. List the applications of this software project.
3. Difference between Attribute and Association.
4. What are associative classes?
5. Explain Class Diagram in Detail.
6. Difference: 'uses', 'extends', 'includes'
7. What is composition?
8. Define Domain Model
9. What is activity parameter?
10. Define Swim lane
71
EX. No. 6 STOCK MAINTENANCE SYSTEM
Date:
Problem Statement
72
Stock maintenance System
Use Case Diagram
73
Class Diagram:
74
Interaction Diagrams:
Sequence Diagram:
75
Collaboration Diagram:
76
State Chart Diagram:
77
Activity Diagram:
valid
zz
confirms the
purchase indicate to DB tat
prod is not valid
generates the
report
bills the
products
78
Component Diagram:
Deployment Diagram:
79
Forward Engineering:
Cash.h:
#ifndef CASH_H_HEADER_INCLUDED_B57DD185
#define CASH_H_HEADER_INCLUDED_B57DD185
//##ModelId=4A6FD6C500BA
class Cash
{
public:
//##ModelId=4A6FD6F903A6
amt();
private:
//##ModelId=4A6FD6E40304
Long amount;
};
#endif /* CASH_H_HEADER_INCLUDED_B57DD185 */
Cash.cpp:
#include "Cash.h"
//##ModelId=4A6FD6F903A6
Cash::amt()
{
}
FORM1
80
CODING:
FORM2
CODING:
81
Private Sub Combo1_Click()
Dim ItemName As String
Dim a As String
Dim ItemAmt As Long
ItemName = Combo1.Text
a = "select ItemAmt from db1 where ItemName='" + ItemName + "'"
Set rs = db1.Execute(a)
ItemAmt = rs(0)
Text1.Text = ItemAmt
End Sub
FORM3
82
CODING:
Result
Thus the software for stock maintenance system has been developed in VB and its
output is verified.
VIVA QUESTION
83
Ex. No. 7 BOOK BANK
Date:
Problem Statement
Software is developed for Book bank management system coded in VB, which is
the front end, and it has a Microsoft Access database that is used as the back end, which
contains the information about the students and available books. It has various options
like issue, return, and to view details about available books. This project mainly simulates
the role of a librarian, in a computerized way.
The issue option enables a student to search for a book in an easier and efficient
manner. All he has to do is to just enter the required category and the author of the book.
Once the book is available the student is asked to enter his/her ID and the book is issued.
After this the student database is updated with the book ID and the status of the book is
changed to unavailable.
The view option enables the manager to view details about the available books
and to get the information about the students. By entering the students ID he can view the
list of books borrowed by the particular student.
The return option prompts the student to just enter his ID and books ID. After this
the student’s database is updated and the status of the book is changed as available.
84
Usecase Diagram
login
search a book
member
librarian
return a book
issue a book
Class Diagram
library incharge
user name
password
student
name login()
id update borrow()
year update return()
view book details()
borrow() view student details()
return()
has
maintains
books
id
name
author
status
status change()
85
Activity diagram
Borrow
accept student
details
check
no availability
yes
86
Return
accept
book ID
update
database
87
Sequence Diagram
enter data
send data
search database
check availability
books found
update database
book issued
88
Collaboration Diagram
GUI
8: check availability
6: send data 11: database updation report
7: search database
10: update database
server databas
e
9: books found
89
Component Diagram
system
user
database
Deployment Diagram
PC printer
90
Forward Engineering
#include "Admin.h"
//##ModelId=4A6FD3E501DC
Admin::update_db()
{
}
//##ModelId=4A6FD3F50298
Admin::maintain()
{
}
Admin.h
#ifndef ADMIN_H_HEADER_INCLUDED_B57DB81C
#define ADMIN_H_HEADER_INCLUDED_B57DB81C
//##ModelId=4A6FD38E023A
class Admin
{
public:
//##ModelId=4A6FD3E501DC
update_db();
//##ModelId=4A6FD3F50298
maintain();
private:
//##ModelId=4A6FD39D0269
String name;
//##ModelId=4A6FD3C80150
Integer id;
};
#endif /* ADMIN_H_HEADER_INCLUDED_B57DB81C */
Reverse Engineering
#ifndef ADMIN_H_HEADER_INCLUDED_B57DB81C
#define ADMIN_H_HEADER_INCLUDED_B57DB81C
91
//##ModelId=4A6FD38E023A
class Admin
{
public:
//##ModelId=4A6FD3E501DC
update_db();
//##ModelId=4A6FD3F50298
maintaindetails();
private:
//##ModelId=4A6FD39D0269
String name;
//##ModelId=4A6FD3C80150
Integer id;
};
#endif /* ADMIN_H_HEADER_INCLUDED_B57DB81C */
VB Coding
92
Form 1:
93
Form 2:
94
Private Sub Command2_Click()
Form4.Show
Unload Me
End Sub
Form 3:
95
For i = 1 To 12
Combo2.AddItem i
Next i
For i = 1970 To DateTime.Year(DateTime.Date)
Combo3.AddItem i
Next i
End Sub
Form 4:
96
If Label2.Caption = 4 Then
cnt = 1
MsgBox cnt
End If
If j < 5 Then
j=j+1
Command1.Visible = True
Label1.Caption = q(j)
Option1.Caption = c1(j)
Option2.Caption = c2(j)
Option3.Caption = c3(j)
Option4.Caption = c4(j)
k=k+1
'MsgBox mans(j)
End If
If j = 4 Then
Command1.Visible = False
End If
If j > 0 Then
Command2.Visible = True
End If
Label2.Caption = j
End Sub
97
Option1.Caption = c1(k)
Option2.Caption = c2(k)
Option3.Caption = c3(k)
Option4.Caption = c4(k)
j=j-1
End If
If k = 0 Then
Command2.Visible = False
j=0
End If
If j < 5 Then
Command1.Visible = True
End If
Label2.Caption = j
End Sub
98
q(i) = rs(1)
c1(i) = rs(2)
c2(i) = rs(3)
c3(i) = rs(4)
c4(i) = rs(5)
ans(i) = rs(6)
rs.MoveNext
'MsgBox choice(i)
i=i+1
Loop
Label1.Caption = q(0)
Option1.Caption = c1(0)
Option2.Caption = c2(0)
Option3.Caption = c3(0)
Option4.Caption = c4(0)
j=0
Label2.Caption = j
k=0
cnt = 0
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
m=1
End Sub
99
Private Sub Option4_Click()
If Option4.Value = True Then
db.Execute ("update question set chosen='" + Option4.Caption + "' where ques='" +
Label1.Caption + "'")
End If
End Sub
Form 5:
100
End If
'MsgBox sc
Set rs = db.Execute("select name,email from regdetails")
Label2.Caption = "UserID:" + user
Label1.Caption = "Name:" + rs(0)
Label3.Caption = "Score:" + sc
Dim p As Integer
p = (Val(sc) / 5) * 100
If p > 40 Then
Label4.Caption = "PASS"
Else
Label4.Caption = "FAIL"
End If
Label5.Caption = "Email ID:" + rs(1)
db.Execute ("delete * from score")
db.Close
End Sub
Private Sub Timer1_Timer()
Animation1.Visible = False
Timer1.Enabled = False
End Sub
Result
Thus the application for book bank has been developed successfully and its output
is verified.
VIVA QUESTION
1. Explain about book bank application.
2. Explain the difference between composition and aggregation.
3. Explain the difference between design model and an implementation
model.
4. Explain the different relationship notations in UML that you have used
(e.g., generalization, association, and so on.)
5. If familiar with it, describe how you used any one of the “gang of four”
design patterns in recent model you produced.
6. If familiar with it, describe the “design by contract” approach.
7. If familiar with it, describe the concept of UML profile.
8. In RUP business modeling, what is the difference between Business Actor
and Business Worker?
9. In the past, have you ever traced design and/or implementation artifacts
back to the user requirements? If yes, how?
10. Is object persistence expressed in the analysis model, the design model or
both? Explain.
101
Ex. No. 8 CREDIT CARD SYSTEM
Date:
Problem Statement
Software is developed for credit card system coded in VB, which is the front end,
and it has a Microsoft Access database that is used as the back end, which contains the
information about the customer details and there account details. It has various options
like cash payment, amount balance books.
The buy option enables a customer to search for different things on internet easier
and efficient manner. All he has to do is to just enter the required category and the
amount transaction details. Once the item is available the customer is asked to enter
his/her account number and the item is issued.
The view option enables the customer to view details about the available balance
and to get the information about the transactions. By entering the account number he can
view the list of transaction details.
102
UseCase Diagram
Client
103
UML Class Diagram
104
Interaction Diagram
Sequence Diagram
105
Interaction Diagram
Collaboration Diagram
106
State Chart Diagram
107
Activity Diagram
108
Component Diagram
Deployment Diagram
109
Forward Engineering
Class account.h
#ifndef ACCOUNT_H_HEADER_INCLUDED_B57DA438
#define ACCOUNT_H_HEADER_INCLUDED_B57DA438
//##ModelId=4A6FD5AE00FC
class Account
{
public:
//##ModelId=4A6FD786007F
deposit();
//##ModelId=4A6FD78700DD
withdraw();
private:
//##ModelId=4A6FD75901C7
Integer number;
//##ModelId=4A6FD75A0273
Currency balance;
};
#endif /* ACCOUNT_H_HEADER_INCLUDED_B57DA438 */
Class account.cpp
#include "Account.h"
//##ModelId=4A6FD786007F
Account::deposit()
{
}
//##ModelId=4A6FD78700DD
Account::withdraw()
{
}
Reverse Engineering
Class account.h
#ifndef ACCOUNT_H_HEADER_INCLUDED_B57DA438
#define ACCOUNT_H_HEADER_INCLUDED_B57DA438
110
//##ModelId=4A6FD5AE00FC
class Account
{
public:
//##ModelId=4A6FD786007F
depositcash();
//##ModelId=4A6FD78700DD
withdraw();
private:
//##ModelId=4A6FD75901C7
Integer number;
//##ModelId=4A6FD75A0273
Currency balance;
};
#endif /* ACCOUNT_H_HEADER_INCLUDED_B57DA438 */
111
112
113
114
115
116
117
Form 1
Private Sub Command1_Click()
Form1.Visible = False
Form2.Show
End Sub
Form 2
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
118
db.Open
End Sub
Form 3
Private Sub Command1_Click()
Form3.Visible = False
Form6.Show
End Sub
Form 4
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
119
Form5.Show
Else
MsgBox ("Invalid Login!")
Text1.Text = ""
Text2.Text = ""
End If
End Sub
Form 5
Private Sub Command1_Click()
Form5.Visible = False
Form11.Show
End Sub
Form 6
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
120
Private Sub Command1_Click()
Dim withdraw As Long
Dim k As String
Dim l As String
Dim balance As Long
Dim newbalance As Long
Dim newbalance1 As String
Dim login As String
login = Form2.Text1.Text
withdraw = Text1.Text
k = "select balance from table1 where login='" + login + "'"
Set rs = db.Execute(k)
balance = rs(0)
If balance > withdraw Then
newbalance = balance - withdraw
newbalance1 = newbalance
l = "update table1 set balance='" + newbalance1 + "' where login='" + login + "'"
Set rs = db.Execute(l)
Text2.Text = "Withdrawn Amount=Rs " & Text1.Text
Else
Text1.Text = ""
Text2.Text = ""
MsgBox ("Amount not Available!!!!")
End If
End Sub
Form 7
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
Dim deposit As Long
Dim k As String
Dim l As String
Dim balance As Long
Dim newbalance As Long
Dim newbalance1 As String
Dim login As String
login = Form2.Text1.Text
deposit = Text1.Text
k = "select balance from table1 where login='" + login + "'"
Set rs = db.Execute(k)
balance = rs(0)
newbalance = balance + deposit
newbalance1 = newbalance
l = "update table1 set balance='" + newbalance1 + "' where login='" + login + "'"
Set rs = db.Execute(l)
121
Text2.Text = "The Deposited Amount=Rs " & Text1.Text
End Sub
Form 8
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form8.Visible = False
Form3.Show
End Sub
122
MsgBox ("Invalid!!")
End If
End Sub
Form 9
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Form 10
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
123
Dim newbalance As Integer
Dim balance As Integer
k = "select balance from table1"
Set rs = db.Execute(k)
balance = rs(0)
Text1.Text = balance
End Sub
Form 11
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
124
Text5.Text = ""
Form11.Visible = False
Form5.Show
End Sub
Form 12
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
125
Result
Thus the application for credit card system has been developed successfully and
its output is verified.
VIVA QUESTION
1. Do you feel UML (or other types of) models have any value once the
implementation code has been generated? Why?
2. Explain the difference between composition and aggregation.
3. Explain the difference between design model and an implementation
model.
4. Explain the different relationship notations in UML that you have used
(e.g., generalization, association, and so on.)
5. If familiar with it, describe how you used any one of the “gang of four”
design patterns in recent model you produced.
6. If familiar with it, describe the “design by contract” approach.
7. If familiar with it, describe the concept of UML profile.
8. In RUP business modeling, what is the difference between Business Actor
and Business Worker?
9. In the past, have you ever traced design and/or implementation artifacts
back to the user requirements? If yes, how?
10. Is object persistence expressed in the analysis model, the design model or
both? Explain.
126