Você está na página 1de 167

T.Kujani/CSE Date: Ex.No: 1 Aim: To implement ATM project using Rational Rose and Visual Basic.

ATM SYSTEM

1. Problem analysis and project planning


1.1 Introduction:
Banking is one of the common and day to day attribute of life. Now-a-days it is totally different from that existed a few years ago banking has become completely computerized new facilities such as credit cards, debit cards & ATM has been introduced. ATM is automatic teller machine which is basically used to withdraw money from an account.

1.2 Objectives:
The objective of this software is similar to ATM software installed in ATM center. It should first validate the pin in the ATM card. Then the type of transaction is enquired and the information from the customer is validated. If it is a withdrawal the amount is asked. After the money is delivered the transaction just made is updated in the database where the customers information is stored.

1.3 Scope:
The scope of the project is to design an ATM system that will help in completely automatic banking this software is going to be designed for withdrawal and deposit of money and register the transaction in the database where the customers information is stored.

1.4 Problem Statement


ATM is another type of banking where the most frequently type of transaction made is withdrawal. A user may withdraw as much as many amount as he wants until his account holds a sum greater than his withdrawal amount. ATM is completely automated and there is no necessity of the ATM center being placed at the bank itself. This ATM system can use any kind of interface. But it should be user friendly and not confusing. Manuals should be provided in case any customer has problem working with the software. The system will retain information on the entire customer who has necessity rights to access the service. It will contain the balance amount in the account and most of all pin number of the customer. The ATM system should be compatible MS-ACCES databases.

T.Kujani/CSE

The ATM should provide easy access to the data for the customer. It should also have a highly secure interface so that one can take money one behalf of others. So the security is one of the main aspects in ATM.

2. Problem Statement( USE Case Analysis) 2.1 Identified Use cases a) Login verify:
Here the user enters the card and password to enter into the main form. If the password is correct the system will display the next form.

b) Withdraw:
Allows to withdraw the amount required by user.

c) Deposit:
Allows the user to Deposit the amount

d) Mini Statement:
Give a mini statement regarding all the trnsaction details.

e) ATM_status:
It gives the status of the transaction occurring in the system.

2.2 Identified Actors a) Customer:


He is the external user of the ATM system for taking money and depositing money also.

b) SystemAdmin:
System administrator plays an important role. He is the system designer. All the updating works is done by him only like adding, deleting customer accounts.

T.Kujani/CSE

2.3. Use case Diagram

3. Design of ATM system 3.1 Login:


3.1.1 Brief description: The use case describes how the user logs into the system. 3.1.2 Flow of Events: 3.1.2.1 Basic flow: This use case starts with the actor wishes to log into the ATM system. 1. The system requests the user to enter the name and pin. 2. The actor enters the name and pin. 3. The system validates the name and pin and logs the user into the system. 3.1.2.2 Alternative flow: If the customer enters any wrong information then the system displays an error message.

T.Kujani/CSE

3.1.3 Pre conditions: None 3.1.4 Post conditions: User will perform the corresponding transactions.

3. 2 Withdraw: 3.2.1 Brief description:


Describes the withdrawal that the user is performing. 3.2.2 Flow of Events: 3.2.2.1 Basic flow: This use case starts after the user has logged on the system. 1. The system requests the user to select the withdrawal type. 2. The actor enters the type and customer information. 3. The system displays the corresponding transaction details.

3.2.2.2 Alternative flow:


If the customer enter any wrong information then the system displays an error message. 3.2.3 Pre conditions: The user logs on the system. 3.2.4 Post conditions: User gets the withdrawal screen with all information.

3.3 Deposit: 3.3.1 Brief description:


Describes the deposit operation that the user is performing.

3.3.2 Flow of Events: 3.3.2.1 Basic flow:


This use case starts after the user has logged on the system. 1. The system request the user to select the deposit type. 2. The actor enters the type and customer information. 3. The system displays the corresponding transaction details.

3.3.2.2 Alternative flow:


If the customer enters any wrong information then the system displays an error message. 3.3.3 Pre conditions: The user logs on the system. 3.3.4 Post conditions: User gets the deposit screen with all information.

3.4 Mini_stmt:

T.Kujani/CSE

3.4.1 Brief description:


Describes the mini statement operation, that the user isperofrming.

3.4.2 Flow of Events: 3.4.2.1 Basic flow:


This use case starts after the user has logged on the system. 1. The system request the user to select the mini statement type. 2. The system displays the corresponding mini statement details.

3.4.2.2 Alternative flow:


If the customer enters any wrong information then the system displays an error message.

3.4.3 Pre conditions:


The user logs on the system.

3. 4.4 Post conditions:


User gets the mini statement screen with all information.

3.5 ATM_status: 3.5.1 Brief description:


Describes the ATM transactions status that occurs on the system.

3.5.2 Flow of Events: 3.5.2.1 Basic flow:


The transaction taking places on the system have various status at different transaction levels. The system control and store all the status of the transaction. 3.5.2.2 Alternative flow: If the customer enter any wrong information the status is not been stored in the database.

3.5.3 Pre conditions:


The user performs the transactions.

3.5.4 Post conditions:


User gets the status of all the transaction.

T.Kujani/CSE

4.Class Diagram

5. ACTIVITY DIAGRAM

T.Kujani/CSE

6. STATE CHART DIAGRAM

7. SEQUENCE DIAGRAM LOGIN

T.Kujani/CSE

DEPOSIT

WITHDRAW

T.Kujani/CSE

MINISTATEMENT

MACHINE STATUS

8. COLLABORATION DIAGRAM

T.Kujani/CSE

LOGIN

DEPOSIT

T.Kujani/CSE

MINI STATEMENT

WITHDRAW

T.Kujani/CSE

MACHINE STATUS

9. COMPONENT DIAGRAM

T.Kujani/CSE

10. DEPLOYMENT DIAGRAM

VB CODE
Database Information Table: user table fields 1. User_name 2. password 3. Acct_no Table: trans_table fields 1. Acc_no 2. Trans_date 3. Trans_type 4. Trans_amount 5. Trans_balance Table: acc_table fields 1. Acct_no 2. Balance
Form1: Private Sub Login_Click() Dim log1 As atm_mc Set log1 = New atm_mc MsgBox "hi" Call log1.Login_verify(Trim(Text1.Text), Trim(Text2.Text)) End Sub

T.Kujani/CSE

Form1:

Form2: Private Sub Command2_Click() Dim act As Class1 Dim tn As Class3 Set act = New Class1 Set tn = New Class3 If Option1.Value = True Then MsgBox " withdraw" Call act.withdraw(Trim(Text1.Text)) Else If Option2.Value = True Then MsgBox "deposit" Call act.deposit(Trim(Text1.Text)) Else If Option3.Value = True Then MsgBox "mini" Call tn.ministatement(Form1.Label1.Caption) End If End If End If End Sub

T.Kujani/CSE

Form2:

Account class: Option Explicit '##ModelId=4D7B08470290 Private Acc_no As Integer '##ModelId=4D7B08560213 Private Balance As Integer '##ModelId=4D7B08AA0109 Public NewProperty As Transaction '##ModelId=4D7B0864034B Public Sub withdraw(amount As Integer) Set db = OpenDatabase("D:\OOADLAB\atmdb.mdb") Set rs = db.OpenRecordset("act_table") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Trim(Form1.Label1.Caption) Then If rs(1).Value > amount Then rs.EditMode rs(0).Value = Trim(Form1.Label1.Caption) rs(1).Value = rs(1).Value - amount rs.update MsgBox rs(1).Value Call NewProperty2.update_transaction(rs(0).Value, "wd", amount, rs(1).Value)

T.Kujani/CSE

Call display_availability(1) Exit Do Else Call display_availability(0) End If End If rs.MoveNext Loop rs.Close db.Close End Sub

'##ModelId=4D7B0871036B Public Sub deposit() Set db = OpenDatabase("D:\OOADLAB\atm.mdb") Set rs = db.OpenRecordset("acc_table") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Trim(Form1.Label1.Caption) Then rs.EditMode rs(1).Value = rs(1).Value + amount rs.update Call NewProperty2.update_transaction(rs(0).Value, "deposit", amount, rs(1).Value) Exit Do End If rs.MoveNext Loop rs.Close db.Close End Sub '##ModelId=4D7B087A0138 Public Sub display_availability(flag As Integer) If flag = 1 Then MsgBox "success" Else MsgBox "not available" End If End Sub

ATM class: Option Explicit '##ModelId=4D7B08470290 Private Acc_no As Integer

T.Kujani/CSE

'##ModelId=4D7B08560213 Private Balance As Integer '##ModelId=4D7B08AA0109 Public NewProperty As Transaction '##ModelId=4D7B0864034B Public Sub withdraw(amount As Integer) Set db = OpenDatabase("D:\OOADLAB\atmdb.mdb") Set rs = db.OpenRecordset("act_table") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Trim(Form1.Label1.Caption) Then If rs(1).Value > amount Then rs.EditMode rs(0).Value = Trim(Form1.Label1.Caption) rs(1).Value = rs(1).Value - amount rs.update MsgBox rs(1).Value Call NewProperty2.update_transaction(rs(0).Value, "wd", amount, rs(1).Value) Call display_availability(1) Exit Do Else Call display_availability(0) End If End If rs.MoveNext Loop rs.Close db.Close End Sub

'##ModelId=4D7B0871036B Public Sub deposit() Set db = OpenDatabase("D:\OOADLAB\atm.mdb") Set rs = db.OpenRecordset("acc_table") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Trim(Form1.Label1.Caption) Then rs.EditMode rs(1).Value = rs(1).Value + amount rs.update Call NewProperty2.update_transaction(rs(0).Value, "deposit", amount, rs(1).Value) Exit Do End If

T.Kujani/CSE

rs.MoveNext Loop rs.Close db.Close End Sub '##ModelId=4D7B087A0138 Public Sub display_availability(flag As Integer) If flag = 1 Then MsgBox "success" Else MsgBox "not available" End If End Sub

Transaction Class: Option Explicit '##ModelId=4D7B08470290 Private Acc_no As Integer '##ModelId=4D7B08560213 Private Balance As Integer '##ModelId=4D7B08AA0109 Public NewProperty As Transaction '##ModelId=4D7B0864034B Public Sub withdraw(amount As Integer) Set db = OpenDatabase("D:\OOADLAB\atmdb.mdb") Set rs = db.OpenRecordset("act_table") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Trim(Form1.Label1.Caption) Then If rs(1).Value > amount Then rs.EditMode rs(0).Value = Trim(Form1.Label1.Caption) rs(1).Value = rs(1).Value - amount rs.update MsgBox rs(1).Value Call NewProperty2.update_transaction(rs(0).Value, "wd", amount, rs(1).Value) Call display_availability(1) Exit Do Else Call display_availability(0) End If End If

T.Kujani/CSE

rs.MoveNext Loop rs.Close db.Close End Sub

'##ModelId=4D7B0871036B Public Sub deposit() Set db = OpenDatabase("D:\OOADLAB\atm.mdb") Set rs = db.OpenRecordset("acc_table") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Trim(Form1.Label1.Caption) Then rs.EditMode rs(1).Value = rs(1).Value + amount rs.update Call NewProperty2.update_transaction(rs(0).Value, "deposit", amount, rs(1).Value) Exit Do End If rs.MoveNext Loop rs.Close db.Close End Sub '##ModelId=4D7B087A0138 Public Sub display_availability(flag As Integer) If flag = 1 Then MsgBox "success" Else MsgBox "not available" End If End Sub

USER MODULE Option Explicit '##ModelId=4D7B07010138 Private User_name As String '##ModelId=4D7B0714009C Private Password As String
selva363@gmail.com<kvinoth1991@gmail.com>jselvaraj.js@gmail.com

T.Kujani/CSE

'##ModelId=4D7B07210128 Private DOB As Date '##ModelId=4D7B072E032C Private ACCNO As Integer '##ModelId=4D7B08A2001F Public NewProperty As ATM '##ModelId=4D7B08A60000 Public NewProperty2 As Account '##ModelId=4D7B073C030D Public Sub read() End Sub '##ModelId=4D7B0747002E Public Sub write1() End Sub

RESULT: Thus the mini project for ATM has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE

Date: STOCK MAINTENANCE Exp:2 Aim: To implement Stock project using Rational Rose and Visual Basic.

1. Problem analysis and project planning


1.3 Introduction
The stock maintenance system is basically for the customers who access the information about the stock (here it is books in the book store) and retrieves the information.

1.4Objectives
The purpose of the document is to define the requirements of the stock maintenance system. This supplementary specification lists the requirements that are not readily captured in the use cases of the use case model. The supplementary specification & the use case model together capture a complete set of requirement on the system.

1.3 Scope:
This supplementary specification applies to the stock maintenance system. This specification defines the non-functional requirements of the system, such as reliability, usability, performance and supportability as well as functional requirements that are common across a number of use cases.

1.4 Problem statement:


A new stock maintenance system for a book store is to replace the existing maintenance system which is in efficient. The new stock maintenance system will allow the admin to record information of the books available in the book store and generate report based on the total amount of sales. The new system has a windows based desktop interface to allow admin to enter books newly entered , deleted and create reports. The system retains information on all the books in the shop. The system retains the records of the cost, edition, author, publication of the books. The employee maintains the information of the sale of books. He can add the books at right time and update the database.

T.Kujani/CSE

2.Problem statement (Use case) analysis: 2.1 Identified use cases:


a).Login:
It is a transaction performed by the user when he wishes to the stock maintenance system.

b).Maintain Books:
It is a transaction performed by the employee when he wishes to add, change and/or delete books information from the system.

c).View Stock:
It is a transaction performed by the manager when he wishes to view the books available in the stock maintenance system.

d).View report:
It is a transaction performed by the administrator when he wishes to view the report generated after all the stock update.

2.2 Identified Actors:


a).Customer:
The customer can just view the books available in the system.

b).Administrator:
The administrator maintains all the database and reports. He is responsible for changing the information of database and takes care of the payment and administrative reports.

T.Kujani/CSE

2.3 Use-case diagram:

Login

insert

delete

Admin search

totalbooks

Report

3.Design of stock maintenance: 3.1 Login:


3.1.1 Brief description: Initiated by user to view the stock details and admin to update the details. 3. 1.2 Flow of Events: 3.1.2.1 Basic flow: 1. Enter the name. 2. Enter the password. 3. Verify the name and password in database. 3.1.2.2 Alternative flow: None 3.1.3 Pre conditions: None

T.Kujani/CSE

3.1.4 Post-condition:
The given details must be matched with database details to log on to the system.

3.2 Insert:
3.2.1 Brief description: Performed by admin to insert the books. 3.2.2 Flow of Events: 3.2.2.1 Basic flow: 1. Enter the name and password. 2. Verify the details in database. 3. Insert the book details in the database. 3.2.2.2 Alternative flow: None 3.2.3 Pre conditions: The admin must have log on to the system.

3.2.4 Post-condition:
Store it in database

3.3 Search:
3.3.1 Brief description: Initiated by user to search the details. 3. 3.2 Flow of Events: 3.3.2.1 Basic flow: 1. Enter the name of the book. 2. Enter the name of the author. 3. Search the book in database. 3.3.2.2 Alternative flow: 1. Enter the name of the book. 2. Search the book the details in database. 3.3.3 Pre conditions: User must be logged on to the system. 3.3.4 Post-condition: Data retrieved from database.

3.4 Delete:
3.4.1 Brief description: Initiated by admin to delete the details. 3. 4.2 Flow of Events: 3.4.2.1 Basic flow: 1. Enter the name of the book. 2. Enter the name of the author. 3. Delete the book in database.

T.Kujani/CSE

3.4.2.2 Alternative flow: 1. Enter the name of the book. 2. Delete the book the details in database 3.4.3 Pre conditions: Admin must be logged on to the system.

3.4.4 Post-condition:
Corresponding book must be deleted from the database

4.Class Diagram:

5. Sequence Diagram:

Login:

: User : Admin

login_verify( )

confirmation( )

T.Kujani/CSE

Insert:

: Admin

Database

Enter the book name

Enter the author name

Enter price of the book

Insert

Display

Delete:

: Admin

Database

Enter the book name

Delete

Display

T.Kujani/CSE

Search:

User : User

: Admin

Database

login_verify( )

confirmation( )

Enter book name

Transfer the details

Search

Display

6.Collaburation Diagram:

Login:
2: confirmation( )

1: login_verify( ) : Admin

: User

T.Kujani/CSE

Insert:
4: Insert 1: Enter the book name 2: Enter the author name 3: Enter price of the book Database 5: Display : Admin

Search:

Database 6: Display User : User

1: login_verify( ) 3: Enter book name 2: confirmation( )

4: Transfer the details

: Admin

Delete:
2: Delete

1: Enter the book name Database 3: Display : Admin

T.Kujani/CSE

7.State chart Diagram:

getting user name

login

getting pwd

error occured:enter details

validate the user name and pwd

rejecting error

validating

8.Activity Diagram:

Enter user details check Not available Error message

available Login

Admin

User

Insert Insert the book Delete Delete the book

Search Serach the book details Display View the details

Logout

Logout

T.Kujani/CSE

9.Component Diagram:

Books

search_book customer

request_book book_ce nter

access_over

store_in

Database

10.Deployment diagram:

custom er acccess_over database_serv er access_for_book

store_details

book_center_ server

T.Kujani/CSE

VB CODING Database details:


Table: Admin fields 1. U_name 2. Pwd Table: Book fields: 1. Book name 2. Author name 3. Price

Form:1
Option Explicit '##ModelId=4D77F2CB00EA Private name As Str '##ModelId=4D77F2D1000F Private pwd As Str '##ModelId=4D77F34302BF Public NewProperty As Admin '##ModelId=4D77F34C0261 Public NewProperty2 As Collection '##ModelId=4D77F2D90186 Public Sub login() Dim log1 As Admin Set log1 = New Admin MsgBox "welcome" Call log1.Login_verify(Trim(Text1.Text), Trim(Text2.Text)) End Sub

T.Kujani/CSE

Form:2
Private Sub Command1_Click() Set bookdet = New Bookdetails Call bookdet.insert End Sub Private Sub Command2_Click() Set bookdet = New Bookdetails Call bookdet.delete End Sub Private Sub Command3_Click() Set bookdet = New Bookdetails Call bookdet.search End Sub Private Sub Command5_Click() DataReport1.Show vbModal End Sub

Private Sub Command6_Click() Set bookdet = New Bookdetails Call bookdet.total End Sub

T.Kujani/CSE

Class modules coding:


Admin:
Private name As Str '##ModelId=4D77F2A901C5 Private pwd As Str '##ModelId=4D77F35B0196 Public NewProperty As Collection '##ModelId=4D77F2BB01E4 Public Sub Login_verify() Public Sub Login_verify(U_name As String, pwd As String) MsgBox "inside" Set db = OpenDatabase("D:\thulasi\atm107.mdb") Set rs = db.OpenRecordset("user") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = uname Then If rs(1).Value = pwd Then MsgBox rs(0).Value Form1.Label1.Caption = rs(2).Value Form1.Hide

T.Kujani/CSE

Form2.Show Exit Do End If End If rs.MoveNext Loop End Sub

Book details:
Option Explicit '##ModelId=4D77F2E202DE Private b_name As Str '##ModelId=4D77F2EC038A Private author As Str '##ModelId=4D77F2F30119 Private price As Integer '##ModelId=4D77F3040251 Dim count As Integer Dim db As DAO.Database Dim rs As DAO.Recordset Public Sub insert() Set db = DAO.OpenDatabase("D:\thulasi\stockdb.mdb") Set rs = db.OpenRecordset("Book details") rs.AddNew rs(0).Value = Form2.Text1.Text rs(1).Value = Form2.Text2.Text rs(2).Value = Int(Form2.Text3.Text) rs.Update MsgBox "Values Inserted" End Sub

'##ModelId=4D77F309036B Public Sub delete() Set db = DAO.OpenDatabase("D:\thulasi\stockdb.mdb") Set rs = db.OpenRecordset("Book details") Do While Not rs.EOF rs.Edit If Form2.Text1.Text = rs(0).Value Then rs(0).Value = Form2.Text1.Text rs(1).Value = Form2.Text2.Text rs(2).Value = Int(Form2.Text3.Text) rs.delete MsgBox "Values Deleted" Exit Do

T.Kujani/CSE

End If rs.MoveNext Loop End Sub '##ModelId=4D77F30E01C5 Public Sub search() Set db = DAO.OpenDatabase("D:\thulasi\stockdb.mdb") Set rs = db.OpenRecordset("Book details") rs.MoveFirst Do While Not rs.EOF If Form2.Text1.Text = rs(0).Value Then count = count + 1 Exit Do End If rs.MoveNext Loop Form2.Text4.Text = count End Sub '##ModelId=4D77F31100AB Public Sub totalbooks() Set db = DAO.OpenDatabase("D:\thulasi\stockdb.mdb") Set rs = db.OpenRecordset("Book details") rs.MoveFirst count = 0 While Not rs.EOF count = count + 1 rs.MoveNext Wend MsgBox "Total books Available" & count End Sub

T.Kujani/CSE

Report Generation:

RESULT: Thus the mini project for stock management has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE Date: Ex.No: 3 Aim: To implement E-Book Management system using Rational Rose and Visual Basic.

E-BOOK MANAGEMENT

1. Problem analysis and project planning


1.1 INTRODUCTION:
The e-booking management system has been designed to carry out the book management process as a web service. The book arrival and withdrawal can be updated accordingly by the administrator without much of manual involvement.

1.2 OBJECTIVE:
The purpose of this document is to define the requirements of the e-book management system. This system reduces the manual work to great extent. The e-book management is carried out by the system in an efficient manner.

1.3 SCOPE:
The scope of the project is to design an e-book management system that will help in completely automatic booking of the required books. This software is going to be designed for the searching and purchasing of the books online and every customer can maintain a membership in this system who can have more special features than the customer who is not a member.

1.4 PROBLEM STATEMENT:


The e-book management system is to be built up for the purpose of serving the client with the books that they demand. In this system, member can search for the books that they require and they can also get the book details. Purchasing can also be done through this system and the particular commodities will be delivered to the customers home. The customer is the new user who must join as a member in order to access the system. The administrator can update about the entries of new book and the departure of existing books in the database. Once the purchase has been done, the details about the respective transaction will be updated in the users database and the corresponding amount will be deducted from their account.

2. Problem Statement( USE Case Analysis)

T.Kujani/CSE

2.1 Identified Use cases a) Sign In:


This use case describes how a user logs into the e _book management system.

b) Sign Out:
This use case describes how a user logs out from the e-book management system.

c) Add Book:
This use case allows the user to make a record of the available books.

d) Get Book Details:


This use case allows the user to get the details of the required book.

e) Search Books:
This use case allows the user to search the details of the particular book that they require.

f) Purchase:
This use case describes how the user purchases the book and it updates the details of purchased book in the database.

g) Comments:
This use case allows the users and the members to leave the comments about the e-book management system.

2.2 Identified Actors a) Customers


The person can access the system only if he joins the system as a member.

b) Members:
The person who can do all the transactions using the system like search books, get book details, purchase etc.

2.3. USE-CASE DIAGRAM:

T.Kujani/CSE

3. Design of e-book management system:


3.1.1 Login:
3.1.1.1 Brief description: The use case describes how the user logs into the system. 3.1. 1.2 Flow of Events: 3.1.1.2.1 Basic flow: This use case starts with the actor wishes to log into the ATM system. 1. The system requests the user to enter the name and pin. 2. The actor enters the name and pin. 3. The system validates the name and pin and logs the user into the system. 3.1. 1.2.2 Alternative flow: If the customer enters any wrong information then the system displays an error message.

3.1.1.3 Pre conditions: None 3.1.1.4 Post conditions: User will perform the corresponding transactions.

3.1.2. Sign up: 3.1.3.1 Brief description:


Describes the sign up operation that the user is doing.

T.Kujani/CSE

3.1.3.2 Flow of Events: 3.1.3.2.1 Basic flow:


This use case starts after the user has logged on the system. 1. The system requests the user to sign up. 2. The actor enters the customer information. 3. The system displays the corresponding details about the user.

3.1.3.2.2 Alternative flow:


The user can also use the system as a non member. 3.1.3.3 Pre conditions: The user must not be a member of the system. 3.1.3.4 Post conditions: User gets the signup screen with all information.

3.1. 2.Add Book: 3.1.2.1 Brief description:


Describes how the admin can add the book to the database. 3.1.2.2 Flow of Events: 3.1.2.2.1 Basic flow: This use case starts after the user has logged on the system. 1. The system requests the user to give the book details. 2. The actor enters the book information and add it to the database. 3. The system displays the corresponding transaction details.

3.1.2.2.2 Alternative flow:


If the customers enter any wrong information then the system displays an error message. 3.1.2.3 Pre conditions: The user logs on the system and is a member. 3.1.2.4 Post conditions: User gets the message for successful updation of the database.

3.1.3. Search Book: 3.1. 3.1 Brief description:


Describes how the user can search for a particular books availability.

3.1.3.2 Flow of Events: 3.1.3.2.1 Basic flow:


This use case starts after the user has logged on the system. 1. The system requests the user to submit the book details. 2. The actor enters the book name and author.

T.Kujani/CSE

3. The system displays the corresponding availability details of the books.

3.1.3.2.2 Alternative flow:


If the customer enters any wrong information then the system displays an error message. 3.1.3.3 Pre conditions: The user logs on the system and is a member. 3.1.3.4 Post conditions: User gets the availability details of the requested book.

3.1.3. Get Book Details: 3.1.3.1 Brief description:


Describes the get_book_details operation that the user is performing.

3.1.3.2 Flow of Events: 3.1.3.2.1 Basic flow:


This use case starts after the user has logged on the system. 1. The system requests the user to provide the book name. 2. The actor enters the name and author of the book. 3. The system displays the corresponding details of that book.

3.1.3.2.2 Alternative flow:


If the customer enters any wrong information then the system displays an error message. 3.1.3.3 Pre conditions: The user logs on the system and is a member. 3.1.3.4 Post conditions: User gets the book details screen with all information.

3.1.3. Purchase: 3.1. 3.1 Brief description:


Describes the purchase operation that the user is doing.

3.1.3.2 Flow of Events: 3.1.3.2.1 Basic flow:


This use case starts after the user has logged on the system. 1. The system requests the user to select the payment type. 2. The actor enters the payment type and the book details. 3. The system displays the corresponding transaction details. 3.1.3.2.2 Alternative flow:

T.Kujani/CSE

If the customers enter any wrong information then the system displays an error message.

3.1.3.3 Pre conditions:


The user logs on the system and is a member.

3.1.3.4 Post conditions:


User gets the purchase successful message.

4. CLASS DIAGRAM:

5.SEQUENCE DIAGRAM: SIGN IN:

SIGN UP:

T.Kujani/CSE

ADD BOOK:

ADD CUSTOMER:

ADD COMMENTS:

T.Kujani/CSE

GET BOOK DETAILS:

PURCHASE:

SEARCH BOOK:

T.Kujani/CSE

6. COLLABORATION DIAGRAM: SIGNIN:

SIGNUP:
ADD BOOK:

ADD CUSTOMER:

T.Kujani/CSE

GET BOOK DETAILS:

SEARCH BOOK:

T.Kujani/CSE

PURCHASE:

8)ADD COMMENTS:

7. STATE TRANSITION DIAGRAM:

T.Kujani/CSE

8. ACTIVITY DIAGRAM:

9.COMPONENT DIAGRAM:

T.Kujani/CSE

10. DEPLOYMENT DIAGRAM:

VB CODING:

T.Kujani/CSE

DATA BASE: 1. customer Table uname string password string cname string DOB Date Ph number Number Mem id Number Email string Security- string Answer string Balance Number 2. book Table bname string author string publication string ISBN Number Edition string Price Number

3. transaction Table uname string mem id Number book name string Author name - string

FORM1 (Login):
Private Sub Command1_Click() //SIGN IN Dim mem As member Dim cus As customer Set mem = New member Set cus = New customer Call mem.login_verify(Trim(Text1.Text), Trim(Text2.Text)) End Sub Private Sub Command2_Click() Form1.Hide Form2.Show End Sub //SIGN UP

T.Kujani/CSE

Private Sub Command3_Click() Form1.Hide Call pwdform End Sub Public Sub pwdform() Form4.Show Form4.Command1.Visible = False Form4.Text3.Visible = False Form4.Label4.Visible = False End Sub

//PASSWORD

FORM2 (Sign Up): Private Sub Command1_Click() //Join Dim mem As member Dim cus As customer Set mem = New member Set cus = New customer Call cus.addcustomer(Text2.Text, Text3.Text, Text1.Text, Text8.Text, Text6.Text, Text4.Text, Combo4.Text, Text7.Text) End Sub Private Sub Command2_Click() End End Sub //Cancel

T.Kujani/CSE

Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Combo4.Text = "" End Sub Private Sub Command4_Click() Form2.Hide Form1.Show Form1.Text1.Text = "" Form1.Text2.Text = "" End Sub Public Sub clearit() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Combo4.Text = "" End Sub

//Clear

//Home

T.Kujani/CSE

FORM3 (Main page): Private Sub Command1_Click() //Search Dim mem As member Dim cus As customer Set mem = New member Set cus = New customer Call mem.searchbook(Text1.Text, Text2.Text) End Sub Private Sub Command2_Click() //Get Details Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("book") rs.MoveFirst Do While Not rs.EOF If (Text1.Text = rs(0).Value) Then If (Text2.Text = rs(1).Value) Then Text3.Text = "" Text3.Text = "Name=" & rs(0).Value & vbCrLf & " Author=" & rs(1).Value & vbCrLf & " Publication=" & rs(2).Value & vbCrLf & " ISBN=" & rs(3).Value & vbCrLf & " Edition=" & rs(4).Value Exit Do End If End If rs.MoveNext Loop End Sub Private Sub Command4_Click() Form3.Hide Form1.Show Form1.Text1.Text = "" Form1.Text2.Text = "" End Sub Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" End Sub Private Sub Command5_Click() Form3.Hide Form5.Show End Sub //Home

//Clear

//Contact

T.Kujani/CSE

Private Sub Command6_Click(Index As Integer) Dim add1 As member Set add1 = New member Call add1.addbook(Text1.Text, Text2.Text) End Sub

//Add

Private Sub Command7_Click(Index As Integer) //Buy Form3.Hide Form6.Show End Sub

FORM4 (Password):

Dim db As DAO.Database Dim rs As DAO.Recordset Private Sub Command1_Click() //Save Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.MoveFirst Do While Not rs.EOF If (Text1.Text = rs(0).Value) Then If (Text2.Text = rs(5).Value) Then rs.Edit rs(1).Value = Text3.Text rs.Update

T.Kujani/CSE

MsgBox "Your password is updated" Exit Do End If End If rs.MoveNext Loop Form4.Hide Form1.Show End Sub Private Sub Command2_Click() Form4.Hide Form1.Show Form1.Text1.Text = "" Form1.Text2.Text = "" End Sub

//Home

Private Sub Command3_Click() //Check mem ID Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.MoveFirst Do While Not rs.EOF If (Text1.Text = rs(0).Value) Then If (Text2.Text = rs(5).Value) Then Form4.Command1.Visible = True Form4.Label4.Visible = True Form4.Text3.Visible = True Exit Do End If End If rs.MoveNext Loop End Sub

T.Kujani/CSE

FORM5 (Contact):

Private Sub Command1_Click() MsgBox "Your Message has been Sent" Call clearit End Sub Private Sub Command2_Click() Form5.Hide Form3.Show End Sub Private Sub Command3_Click() Form5.Hide Form1.Show Form1.Text1.Text = "" Form1.Text2.Text = "" End Sub Private Sub Command4_Click() End End Sub Public Sub clearit() Text2.Text = "" Text3.Text = "" End Sub

//Send

//Cancel

//Home

//Logout

T.Kujani/CSE

FORM6 (Purchase):

Dim db As DAO.Database Dim rs As DAO.Recordset Private Sub Command1_Click(Index As Integer) Dim tr As transaction Set tr = New transaction Call tr.purchase(Text3.Text, Text4.Text) End Sub //Purchase

Private Sub Command2_Click(Index As Integer) //Logout End End Sub Private Sub Command3_Click(Index As Integer) //Home Form6.Hide Form1.Show End Sub Private Sub Text1_Change() //MemId Text box Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.MoveFirst Do While Not rs.EOF If (Form1.Text1.Text = rs(0).Value) Then Form6.Text1.Text = rs(5).Value Exit Do End If rs.MoveNext Loop End Sub Private Sub Text2_Change() //Balance Text Box Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.MoveFirst Do While Not rs.EOF If (Form1.Text1.Text = rs(0).Value) Then Form6.Text2.Text = rs(9).Value Exit Do End If rs.MoveNext Loop

T.Kujani/CSE

End Sub Private Sub Text3_Change() //Price Text Box Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("book") rs.MoveFirst Do While Not rs.EOF If (Form3.Text1.Text = rs(0).Value) Then Form6.Text3.Text = rs(5).Value Exit Do End If rs.MoveNext Loop End Sub

CLASS CODING
CUSTOMER CLASS:
Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset '##ModelId=4D77B7100132 Private cname As String '##ModelId=4D77B7140084 Private uname As String '##ModelId=4D77B71801CD Private pwd As String

T.Kujani/CSE

'##ModelId=4D77B71B01F0 Private ddate As Date '##ModelId=4D77B7C003DE Private phno As Integer '##ModelId=4D77B7E10004 Private mail As String '##ModelId=4D77B7E401BD Private security As String '##ModelId=4D77B7EA004F Private ans As String '##ModelId=3C30FB8E000F Public Sub addcustomer(uname As String, pwd As String, cname As String, ddate As Date, phno As Integer, mail As String, security As String, ans As String) Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.AddNew rs(0).Value = uname rs(1).Value = pwd rs(2).Value = cname rs(3).Value = ddate rs(4).Value = phno rs(5).Value = phno - 1023 rs(6).Value = mail rs(7).Value = security rs(8).Value = ans rs.Update MsgBox "Your Details has been Added" MsgBox rs(5).Value Call clearit rs.Close db.Close End Sub

MEMBER CLASS:
Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset

T.Kujani/CSE

Dim rs1 As DAO.Recordset Dim a As Integer '##ModelId=4D77B8060219 Private uname As String '##ModelId=4D77B80B0017 Private pwd As String '##ModelId=4D77B81B02EC Private bname As String '##ModelId=4D77B8200114 Private author As String '##ModelId=4D77B84B002D Private aname As String '##ModelId=4D77B85001C4 Private price As Integer '##ModelId=4D77B85302D2 Private total As Integer

'##ModelId=3C30FBCD00CB Public Sub login_verify(uname As String, pwd As String) Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = uname Then If rs(1).Value = pwd Then MsgBox ("welcome " + rs(2).Value) Form1.Hide Form3.Show Exit Do End If End If rs.MoveNext Loop End Sub

'##ModelId=3C30FBD500AB

T.Kujani/CSE

Public Sub searchbook(bname As String, author As String) Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("book") rs.MoveFirst Do While Not rs.EOF If (rs(0).Value = bname) Then If (rs(1).Value = author) Then MsgBox (rs(0).Value + " Book is available") Exit Do End If End If rs.MoveNext Loop End Sub '##ModelId=4D77B89402FB Public Sub addbook(bname As String, aname As String) Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("transaction") Set rs1 = db.OpenRecordset("customer") rs1.MoveFirst Do While Not rs1.EOF If (rs1(0).Value = Form1.Text1.Text) Then a = rs1(5).Value End If rs1.MoveNext Loop rs.AddNew rs(0).Value = Form1.Text1.Text rs(1).Value = a rs(2).Value = bname rs(3).Value = aname rs.Update MsgBox "Book is added to your Account" End Sub

TRANSACTION CLASS:
Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset

T.Kujani/CSE

'##ModelId=3C30B87403D8 Private price As Integer '##ModelId=3C30B88703B9 Private total As Integer '##ModelId=4D77B8960247 Public Sub purchase(price As Integer, total As Integer) Set db = OpenDatabase("C:\Documents and Settings\PRABA\Desktop\ebook\ebook.mdb") Set rs = db.OpenRecordset("customer") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Form1.Text1.Text Then rs.Edit rs(9).Value = rs(9).Value - (price * total) rs.Update Exit Do End If rs.MoveNext Loop MsgBox "You have purchased the book" Form6.Hide Form3.Show End Sub

RESULT: Thus the mini project for e_booking management has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE Date: Ex.No: 4

E-TICKETING

Aim: To implement E-Ticketing project using Rational Rose and Visual Basic.

1.Problem analysis and project planning 1.1 Introduction


This document deals with online ticket reservation for theaters .This document is designed in such a way that readers understand it. The use case description and other documents are described in such a way that the system reaches the people easily.

1.2 Objectives
The purpose of this document is to know about the availability of seats. According to the requirements spectators reserve his/her tickets.

1.3 Scope
This document for online ticket reservation for theater makes the work easy for the Spectators to book the tickets. This time consuming process is made easy by booking tickets online.,

1.4Problem Statement
Computers play an integral part in day to day life. It makes work faster and easy. Every job is computerized now. So is the ticket reservation, we can book our tickets online. During the reservation of tickets the spectators has to select the theatre, date, show, no of seats ,etc.,The reservation counter keeps track of passengers information. System wil have all the details about the theatres and the facilities provided by them. A database is maintained by the database administrator. Spectators can select theatres according to their convenience, they select their desired shows in the desired date and pay the amount by the credit card.

2.Problem statement (Use case) analysis 2.1Identified use cases


a) Login It helps to check the logs into the system b) View account details It helps the users to view their account information c) View theatre details The spectators can select the theatres, day, show and view the availability d) Booking Ticket The spectators can book their desired no of tickets

2.2 Identified Actors


a) User: The person who wishes to book his/her ticket for the movie

T.Kujani/CSE

2.3 Use case diagram:

3. Design of Online Booking Systems 3.1. Login:


3.1.1 Brief description: This use case describes how the user logs into the system. We give the required details, if the details are valid then the user enters the system else display an error message. 3.1.2 Flow of Events: 3.1.2.1 Basic flow: 1. The system request for the credit card no and password. 2. The user enter the details. 3. The system validates the detail and logs into the system. 3.1.2.2 Alternative flow: 1. If the details entered by the actors are incorrect an error message is displayed. 2. The user re-enter the details. 3.1.3 Pre conditions: None.

T.Kujani/CSE

3.1.4 Post conditions: If the use case is successful the actor logs into the system.

3.2 View account details:


3.2.1 Brief description This use case provides the account details of the user. The name of the user ,account no, balance are displayed. 3.2.2 Flow of Events 3.2.2.1 Basic Flow The account details of the user are displayed in the system. 3.2.2.2 Alternative Flow It will display a error message if the credit card is not valid. 3.2.3 Pre Condition Credit card should be valid. 3.2.4 Post Condition If the use case is successful the details are displayed

3.3 View Theatre Details:


3.3.1 Brief description: This use case will allow the spectators to book the tickets online. Accordingly all the Theater available and no of seats will be displayed. These details are taken from the database. 3.3.2 Flow of Events 3.3.2.1 Basic flow: 1. The spectators will enter the credit details 2. The spectators will choose the view status option 3. The list of seats available for the particular theatre will displayed 4. The Actor chooses the desired option

3.3.2.2 Alternative flow: 1. If there is no seats available (or) 2. If the balance is less, then the error message is displayed. 3.3.3 Pre conditions: None 3.3.4 Post conditions: If the use case is successful the actor books the ticket in the desired theatre.

3.4 Booking Tickets:


3.4.1 Brief description If the desired seats are available in the desired theatre book the desired no of seats in the particular theatre. 3.4.2 Flow of events: 3.4.2.1 Basic Flow: 1. The spectators will see the available tickets.

T.Kujani/CSE

2. The spectators will book the desired tickets. 3.4.2.2 Alternative Flow: 1. If the required seats are not available then show the error message. 3.4.3 Pre Condition: There are enough no of seats in the theatre, 3.4.4 Post Condition If the use case is successful then the tickets are booked correctly 4.Class Diagram

5.Sequence Diagram. Login:

T.Kujani/CSE

Account Details:

Book Ticket:

T.Kujani/CSE

Display Details:

6. Collaboration Diagram Login:

Account Details:

T.Kujani/CSE

Book Ticket:

Display Details:

View Details:

T.Kujani/CSE

7.Activity Diagram

8.State Chart Diagram

T.Kujani/CSE

9.Component Diagram

10.Deployment Diagram

T.Kujani/CSE

VB CODING: DATABASE:
Table: USERDETAIL FIELDS

1. Username 2. password 3. Acctno 4. Balance 5. Credit no Table: DAY1, DAY2 &DAY3 FIELDS
1. Theatername 2. Ticket_rate 3. Total seats 4. Morning 5. Noon 6. Evening 7. Night FORM 1 Login: Private Sub Command1_Click() Dim log1 As user

T.Kujani/CSE

Set log1 = New user Call log1.login_verify(Trim(Text1.Text), Trim(Text2.Text)) End Sub

FORM 2

Book Ticket Private Sub Command1_Click() Form2.Hide Form3.show End Sub

T.Kujani/CSE

FORM 3 Display Details Dim log2 As website Set log2 = New website If Option1.Value = True Then Call log2.display_det1(Combo1.Text, Combo2.Text, Option1.Value) End If If Option2.Value = True Then Call log2.display_det2(Combo1.Text, Combo2.Text, Option2.Value) End If If Option3.Value = True Then Call log2.display_det3(Combo1.Text, Combo2.Text, Option3.Value) End If If Option4.Value = True Then Call log2.display_det4(Combo1.Text, Combo2.Text, Option4.Value) End If End Sub Book Private Sub Command1_Click() Dim log1 As user Set log1 = New user Call log1.booktic(Combo1.Text, Combo2.Text, Trim(Text2.Text)) End Sub

T.Kujani/CSE

FORM 4

Back Private Sub Command1_Click() Form4.Hide Form3.show End Sub

Account Private Sub Command3_Click() Form4.Hide Form2.show Set db = OpenDatabase("D:\eticket\userdetails.mdb") Set rs = db.OpenRecordset("userdetails") Form2.Text1.Text = rs(1).Value Form2.Text3.Text = rs(2).Value Form2.Text2.Text = rs(4).Value End Sub

T.Kujani/CSE

Class coding User


Option Explicit Public flag As Boolean Public creditno As String Public password As String Public theater As String Public day As String Public show As String Dim db As DAO.Database Dim rs As DAO.Recordset '##ModelId=4D6FC6FF01A5 Public Sub login_verify(creditno As String, password As String) Set db = OpenDatabase("D:\eticket\userdetails.mdb") Set rs = db.OpenRecordset("userdetails") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = creditno Then If rs(2).Value = password Then flag = True

T.Kujani/CSE

Exit Do End If End If rs.MoveNext Loop If flag = True Then MsgBox "Hi" MsgBox rs(1).Value Form1.Hide Form2.show Form2.Text1.Text = rs(1).Value Form2.Text3.Text = rs(2).Value Form2.Text2.Text = rs(4).Value Else MsgBox "Invalid Login" End End If End Sub ##ModelId=4D6FD4A50203 Public Sub booktic(theatername As String, dat As String, seats As Integer) If dat = "day1" Then Set db = DAO.OpenDatabase("D:\eticket\day1.mdb") Set rs = db.OpenRecordset("day1") End If If dat = "day2" Then Set db = DAO.OpenDatabase("D:\eticket\day2.mdb") Set rs = db.OpenRecordset("day2") End If If dat = "day3" Then Set db = DAO.OpenDatabase("D:\eticket\day3.mdb") Set rs = db.OpenRecordset("day3") End If rs.MoveFirst Do While Not rs.EOF If rs(0).Value = theatername Then If Form3.Option1.Value = True Then If rs(3).Value > seats Then rs.Edit rs(3).Value = rs(3).Value - seats rs.Update rs.Close db.Close Call credit Call details(Trim(Form3.Combo1.Text), Trim(Form3.Combo2.Text), Trim(Form3.Option1. Caption), Trim(Form3.Text2.Text)) Else: MsgBox "SORRY!!!Required seats not available!!!"

T.Kujani/CSE

End If End If If Form3.Option2.Value = True Then If rs(4).Value > seats Then rs.Edit rs(4).Value = rs(4).Value - seats rs.Update rs.Close db.Close Call credit Call details(Trim(Form3.Combo1.Text), Trim(Form3.Combo2.Text), Trim(Form3.Option2. Caption), Trim(Form3.Text2.Text)) Else: MsgBox "SORRY!!!Required seats not available" End If End If If Form3.Option3.Value = True Then If rs(5).Value > seats Then rs.Edit rs(5).Value = rs(5).Value - seats rs.Update rs.Close db.Close Call credit Call details(Trim(Form3.Combo1.Text), Trim(Form3.Combo2.Text), Trim(Form3.Option3. Caption), Trim(Form3.Text2.Text)) Else: MsgBox "SORRY!!!Required seats not available!!!" End If End If If Form3.Option4 = True Then If rs(6).Value > seats Then rs.Edit rs(6).Value = rs(6).Value - seats rs.Update rs.Close db.Close Call credit Call details(Trim(Form3.Combo1.Text), Trim(Form3.Combo2.Text), Trim(Form3.Option4. Caption), Trim(Form3.Text2.Text)) Else: MsgBox "SORRY!!!Required seats not available!!!" End If End If Exit Do End If rs.MoveNext Loop End Sub

T.Kujani/CSE

'##ModelId=4D6FC6FF01A5 Public Sub credit() Set db = OpenDatabase("D:\eticket\userdetails.mdb") Set rs = db.OpenRecordset("userdetails") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = Form1.Text1.Text Then rs.Edit rs(4).Value = rs(4).Value - (Form3.Text2.Text * 100) rs.Update rs.Close db.Close MsgBox "CONGRATS!!Your tickets are booked!!!" Form3.Hide Form4.show Exit Do End If rs.MoveNext Loop End Sub

'##ModelId=4D6FC6FF01A5 Public Sub details(theater As String, day As String, show As String, seats As String) Set db = OpenDatabase("D:\eticket\userdetails.mdb") Set rs = db.OpenRecordset("userdetails") rs.MoveFirst Do While Not rs.EOF If rs(1).Value = Form2.Text1.Text Then Form4.Text1.Text = "Name :" & rs(1).Value & vbCrLf & " Theater:" & theater & vbCrLf & " Day:" & day & vbCrLf & " Show:" & show & vbCrLf & " No of seats:" & seats Exit Do End If rs.MoveNext Loop End Sub Website Private theater As String Private day As String Private show As String Dim db As DAO.Database Dim rs As DAO.Recordset

'##ModelId=4D6FC7880290

T.Kujani/CSE

Public Sub display_det1(theatername As String, dat As String, show As String) If Form3.Combo2.Text = "day1" Then Set db = DAO.OpenDatabase("D:\eticket\day1.mdb") Set rs = db.OpenRecordset("day1") End If If Form3.Combo2.Text = "day2" Then Set db = DAO.OpenDatabase("D:\eticket\day2.mdb") Set rs = db.OpenRecordset("day2") End If If Form3.Combo2.Text = "day3" Then Set db = DAO.OpenDatabase("D:\eticket\day3.mdb") Set rs = db.OpenRecordset("day3") End If rs.MoveFirst Do While Not rs.EOF If rs(0).Value = theatername Then Form3.Text1.Text = rs(3).Value Exit Do End If rs.MoveNext Loop End Sub

'##ModelId=4D6FC6FF01A5 Public Sub display_det2(theatername As String, dat As String, show As String) If Form3.Combo2.Text = "day1" Then Set db = DAO.OpenDatabase("D:\eticket\day1.mdb") Set rs = db.OpenRecordset("day1") End If If Form3.Combo2.Text = "day2" Then Set db = DAO.OpenDatabase("D:\eticket\day2.mdb") Set rs = db.OpenRecordset("day2") End If If Form3.Combo2.Text = "day3" Then Set db = DAO.OpenDatabase("D:\eticket\day3.mdb") Set rs = db.OpenRecordset("day3") End If rs.MoveFirst Do While Not rs.EOF If rs(0).Value = theatername Then Form3.Text1.Text = rs(4).Value Exit Do End If rs.MoveNext loop End Sub

T.Kujani/CSE

'##ModelId=4D6FC6FFA435 Public Sub display_det3(theatername As String, dat As String, show As String) If Form3.Combo2.Text = "day1" Then Set db = DAO.OpenDatabase("D:\eticket\day1.mdb") Set rs = db.OpenRecordset("day1") End If If Form3.Combo2.Text = "day2" Then Set db = DAO.OpenDatabase("D:\eticket\day2.mdb") Set rs = db.OpenRecordset("day2") End If If Form3.Combo2.Text = "day3" Then Set db = DAO.OpenDatabase("D:\eticket\day3.mdb") Set rs = db.OpenRecordset("day3") End If rs.MoveFirst Do While Not rs.EOF If rs(0).Value = theatername Then Form3.Text1.Text = rs(5).Value Exit Do End If rs.MoveNext Loop End Sub

'##ModelId=4D65A4FF01A5 Public Sub display_det4(theatername As String, dat As String, show As String) If Form3.Combo2.Text = "day1" Then Set db = DAO.OpenDatabase("D:\eticket\day1.mdb") Set rs = db.OpenRecordset("day1") End If If Form3.Combo2.Text = "day2" Then Set db = DAO.OpenDatabase("D:\eticket\day2.mdb") Set rs = db.OpenRecordset("day2") End If If Form3.Combo2.Text = "day3" Then Set db = DAO.OpenDatabase("D:\eticket\day3.mdb") Set rs = db.OpenRecordset("day3") End If rs.MoveFirst Do While Not rs.EOF If rs(0).Value = theatername Then Form3.Text1.Text = rs(6).Value Exit Do End If

T.Kujani/CSE

rs.MoveNext Loop End Sub

RESULT: Thus the mini project for e_ticketing has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE

Date: no: Exp no: 5

ONLINE EXAMINATION SYSTEM

Aim: To implement Online Examination System project using Rational Rose and Visual basic.

1. Problem analysis and project planning


1.1 Introduction:
The online examination system has been designed to carry out the examination in online itself. By this online examination system, stress level of students could reduced, and result can also be seen immediately by the student.

1.2 Objective:
The purpose of this document is to define the online examination system. This system reduces the manual work to great extent. The online examination system is carried out by the system in an efficient manner.

1.3 Scope:
The scope of the project is to design an online examination system, that will help the student to write the examination in a easier manner, which also helps the student to test their capability.

1.4 Problem statement:


By this online examination system the student can attend examination frequently in a effective manner which make the student to judge themselves. This Online examination system can use any kind of interface. But it should be user friendly and not confusing.

2. Problem Statement( USE Case Analysis) 2.1 Identified Use cases


a). SIGN IN: This use case describes how a user logs in to the online examination system. b). SIGN UP: This use case describes how a user enter the details in to the online examination system c). START THE EXAM: This use case describes how a user entering the online examination and also it takes to signup form. d). VIEW RESULT: This use case describes how a user views the result.

2.2 Identified Actors

T.Kujani/CSE

a). STUDENT:
The person who can write the exam and views the result.

2.3 USE-CASE DIAGRAM:

start the exam

view result student if member

signin

signup

4.CLASS DIAGRAM:

5.SEQUENCE DIAGRAM: SIGN IN:

T.Kujani/CSE

: student login_verify

member database verify

allow user to view result

SIGN UP:

: student

member database

add student details

store student details

make student as member

START THE EXAM:

: student

member database

enter the exam

display the questions

VIEW RESULT:

T.Kujani/CSE

: student

member database

request result

display result

6.COLLABORATION DIAGRAM: SIGNIN:


2: verify

1: login_verify member database : student 3: allow user to view result

SIGNUP:

2: store student details

1: add student details member database

: student

3: make student as member

T.Kujani/CSE

START THE EXAM:

1: enter the exam member database 2: display the questions : student

VIEW RESULT:

1: request result member database 2: display result : student

7. STATE TRANSITION DIAGRAM:

T.Kujani/CSE

start

login

join as member

user details validate not member sign up

if member enter member details

enter exam To Exam

finished the exam End of Exam view result view result Display Result

8.ACTIVITY DIAGRAM:

T.Kujani/CSE

start

start the exam enter user details

view result enter the details signin

signup details not found check attend the exam to exam

answer the questions

details found

end of the exam

exam finished

display result

9.COMPONENT DIAGRAM:
Database

Exam Details Student Details

Exam

student

10.DEPLOYMENT DIAGRAM:

T.Kujani/CSE

student database

enter user details

store student result

student View Exam Questions

Exam Database

VB CODING: DATABASE INFORMATION


Table: student _table fields

1. stname 2. collname 3. Dept 4. address 5. memberid 6. marks

FORM1 (begin the exam):


Private Sub Command1_Click() // start the exam MsgBox "WELCOME TO CSE ENTRANCE EXAMINATION" begin.Hide signup.Show End Sub Private Sub Command2_Click() // view result MsgBox "Once again welcome for viewing your Result" begin.Hide signin.Show End Sub

T.Kujani/CSE

FORM2 (Sign Up):


Private Sub Command1_Click() // signup to exam Dim cus As customer Set cus = New customer Call cus.addcustomer(Text1.Text, Text4.Text, Combo1.Text, Text2.Text, Text3.Text) MsgBox "THE E-WAR BEGINS" signup.Hide q1.Show End Sub Private Sub Command2_Click() // cancel signup.Hide begin.Show End Sub

T.Kujani/CSE

Question-1 Private Sub Command1_Click() // next question Dim ex As exam Set ex = New exam If Option1.Value = True Then Call ex.marks Else Call ex.demarks End If q1.Hide q2.Show End Sub Private Sub Command2_Click() // end now Dim ex As exam Set ex = New exam MsgBox "Your exam is interupted in middle" Call ex.total End Sub

Question-2 Private Sub Command1_Click() //next question Dim ex As exam Set ex = New exam If Option3.Value = True Then Call ex.marks

T.Kujani/CSE

Else Call ex.demarks End If q2.Hide q3.Show End Sub Private Sub Command2_Click() // end now Dim ex As exam Set ex = New exam MsgBox "Your exam is interupted in middle" Call ex.total End Sub

Question-3 Private Sub Command1_Click() //next question Dim ex As exam Set ex = New exam If Option3.Value = True Then Call ex.marks Else Call ex.demarks End If q3.Hide q4.Show End Sub

T.Kujani/CSE

Private Sub Command2_Click() // end now Dim ex As exam Set ex = New exam MsgBox "Your exam is interupted in middle" Call ex.total End Sub

Question-4 Private Sub Command1_Click() //next question Dim ex As exam Set ex = New exam If Option2.Value = True Then Call ex.marks Else Call ex.demarks End If q4.Hide q5.Show End Sub Private Sub Command2_Click() // end now Dim ex As exam Set ex = New exam MsgBox "Your exam is interupted in middle" Call ex.total End Sub

T.Kujani/CSE

Question-9 Private Sub Command1_Click() //finish Dim ex As exam Set ex = New exam If Option3.Value = True Then Call ex.marks Else Call ex.demarks End If q5.Hide MsgBox "YOU FINISHED YOUR EXAM" Call ex.total begin.Show End Sub

T.Kujani/CSE

Login Private Sub Command1_Click() //Enter Dim cus As customer Set cus = New customer Call cus.addcustomer(Text1.Text, Text4.Text, Combo1.Text, Text2.Text, Text3.Text) MsgBox "THE E-WAR BEGINS" signup.Hide q1.Show End Sub Private Sub Command2_Click() //cancel signup.Hide begin.Show End Sub

Class module code:


Option Explicit '##ModelId=4D7F6DED01EE '##ModelId=4D810B8B0203 Dim db As Database Dim rs As Recordset Public Sub addcustomer(uname As String, memid As Integer, dept As String, coll As String, addr As String) Set db = DAO.OpenDatabase("C:\Users\Vinoth Kumar K\Desktop\online examination\online examination\choosebestans.mdb") Set rs = db.OpenRecordset("student") rs.AddNew

T.Kujani/CSE

rs(0).Value = uname rs(1).Value = coll rs(2).Value = dept rs(3).Value = addr rs(4).Value = memid rs(5).Value = 0 rs.Update End Sub

EXAM:
Option Explicit '##ModelId=4D7F6D4F0247 Private mid As Integer '##ModelId=4D7F6D5800D7 Private stname As String '##ModelId=4D7F6F410385 Public NewProperty As member Public db As DAO.Database Public rs As DAO.Recordset '##ModelId=4D810BA10251 Public Sub login(mid As Integer, stname As String) Set db = DAO.OpenDatabase("C:\Users\Vinoth Kumar K\Desktop\online examination\online examination\choosebestans.mdb") Set rs = db.OpenRecordset("student") rs.MoveFirst Do While Not rs.EOF If (rs(4).Value = mid) Then If (rs(0).Value = stname) Then MsgBox " your score is " MsgBox rs(5).Value End If End If rs.MoveNext Loop End Sub '##ModelId=4D810BA7006D Public Sub marks () Set db = DAO.OpenDatabase("C:\Users\Vinoth Kumar K\Desktop\online examination\online examination\choosebestans.mdb") Set rs = db.OpenRecordset("student") rs.MoveFirst Do While Not rs.EOF If (rs(0).Value = signup.Text1.Text) Then rs.Edit

T.Kujani/CSE

rs(5).Value = rs(5).Value + 10 rs.Update Exit Do End If rs.MoveNext Loop End Sub '##ModelId=4D810BAA01C5 Public Sub demarks() Set db = DAO.OpenDatabase("C:\Users\Vinoth Kumar K\Desktop\online examination\online examination\choosebestans.mdb") Set rs = db.OpenRecordset("student") rs.MoveFirst Do While Not rs.EOF If (rs(0).Value = signup.Text1.Text) Then rs.Edit rs(5).Value = rs(5).Value - 3 rs.Update End If rs.MoveNext Loop End Sub '##ModelId=4D810BB501A5 Public Sub total() Set db = DAO.OpenDatabase("C:\Users\Vinoth Kumar K\Desktop\online examination\online examination\choosebestans.mdb") Set rs = db.OpenRecordset("student") rs.MoveFirst Do While Not rs.EOF If (rs(0).Value = signup.Text1.Text) Then MsgBox "Your score is " MsgBox rs(5).Value End If rs.MoveNext Loop End Sub

RESULT: Thus the mini project for online examination system has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE Date: Exp no:6

RECRUITMENT SYSTEM

Aim: To implement Recruitment System project using Rational Rose and Visual Basic.

1. Problem analysis and project planning


1.1 Introduction
Recruitment refers to the process of attracting, screening, and selecting qualified people for a job at an organization or firm. For some components of the recruitment process, mid- and large-size organizations often retain professional recruiters or outsource some of the process to recruitment agencies. The recruitment industry has five main types of agencies: employment agencies, recruitment websites and job search engines, "headhunters" for executive and professional recruitment, niche agencies which specialize in a particular area of staffing, or employer branding strategy and in-house recruitment. The stages in recruitment include sourcing candidates by advertising or other methods, and screening and selecting potential candidates using tests or interviews.

1.2 Objectives
The Objective of this project is to create a portal in par with the existing Job Portals. In this Portal for Recruitment System the candiates can apply for a job and search for the jobs . Also the Recruiter can post his requirements for any post in the company.

1.3 Scope
This portal will help the Graduates to easily find a job and gives a plate full of choices for them to choose from. It will aslo make a recruiters job very easy to find his employeee. It will be a one stop Portal for the Candidates and Recruiters.

1.4Problem Statement
The emergence of meta-search engines allows job-seekers to search across multiple websites. Some of these new search engines index and list the advertisements of traditional job boards. These sites tend to aim for providing a "one-stop shop" for jobseekers. However, there are many other job search engines which index pages solely from employers' websites, choosing to bypass traditional job boards entirely. These vertical search engines allow job-seekers to find new positions that may not be advertised on traditional job boards, and online recruitment websites.

T.Kujani/CSE

In this project we have developed a System where Recruirter can Post the requirements of his Company and Search for the candidate who matches his requirements. The details of the Candidate will be diplayed to the recuiter . Candidate can Post his Resume on the Portal, Search for a Job by specifying his Skill, and also apply for a Job. The Resume of the Candidate will be stored in the Database along with the number of jobs he has applied for.

2. Problem Statement( USE Case Analysis)


2.1 Identified Use cases a) Login The Candidate and the User have to login to the Portal to access the repository of Information. b) Post Jobs The Recruiter can Post the Jobs in this site. c) Match Jobs The Recruiter can find the Candidate who matched the requirement of the Job. d) Register The Candidates have to register first in the site and only then can find jobs in the portal. e) Post Skills The candidate can post the Skills in which he/she is good at so that he can search the job accordingly. f) Search Jobs The candidate can search the Jobs based on his skill and the location of his Preference.

2.2 Identified Actors a) Recruiter The Companies who employs the candidates are the Recruiters. b) Candidate The gradudates in search of a job who come and seek for a better job is called a candidate.

T.Kujani/CSE

2.3 Use case diagram

3.Design of Recruitment system 3.1 Login:


3.1.1 Brief description: The use case describes how the user logs into the system. 3.1.2 Flow of Events: 3.1.2.1 Basic flow: This use case starts when the actor wishes to log into the Recruitment system. 1. The system requests the user to enter the name and pin. 2. The actor enters the name and pin. 3. The system validates the name and pin and logs the user into the system. 3.1.2.2 Alternative flow: If the customer enters any wrong information then the system displays an error message. 3.1.3 Pre conditions: None 3.1.4 Post conditions: User will perform the corresponding actions.

3.2 Candidate: 3.2.1 Brief description:


This describes the candidates complete actions in the portal. 3.2.2 Flow of Events: 3.2.2.1 Basic flow: This use case starts after the candidate has logged on the system. 1. The system request the candidate to post his resume. 2. The actor enters resume and gives the skills and location .

T.Kujani/CSE

3. The actor searches for the job and the system gives the corresponding details. 3.2.2.2 Alternative flow: The actor can apply for the job if he has already given his details. 3.2.3 Pre conditions: The user logs on the system. 3.2.4 Post conditions: User gets the job of his choice.

3.3 Recruiter:
3.3.1 Brief description: Describes the complete action of the recruiter on the portal.

3.1.3.2 Flow of Events: 3.3.2.1 Basic flow:


This use case starts after the recruiter has logged on the system. 1.The system request the recruiter to post the job on the portal. 2.The actor enters the job requirement details. 3.The recruiter then finds the employee who matches his requirements.

3.3.2.2 Alternative flow:


The recruiter can directly find the candidates for the jobs already posted. 3.3.3 Pre conditions: The recruiter logs on the system. 3.3.4 Post conditions: The recruiter can find the best employee for his job.

3.4 Register: 3.4.1 Brief description:


Describes how the candidate registers into the portal.

3.4.2 Flow of Events: 3.4.2.1 Basic flow:


This use case begins when a candidate wants to be a part of the Portal. 1. The system requests the user to give a Username and Password. 2. The system generates an ID for the candidate which is Unique for each One. 3. The system takes the user to the Main page to login and continue. 3.4.2.2 Alternative flow: If the user is already registered then the user can login directly. 3.4.3 Pre conditions: The user wishes to be a part of this portal. 3.4.4 Post conditions: The user becomes a registered user of the portal.

T.Kujani/CSE

4. CLASS DIAGRAM

5.SEQUENCE DIAGRAMS LOGIN CANDIDATE

T.Kujani/CSE

LOGIN RECRUITER

CANDIDATE

REGISTER

T.Kujani/CSE

RECRUITER

6. COLLABORATION DIAGRAM LOGIN CANDIDATE

LOGIN RECRUITER

T.Kujani/CSE

CANDIDATE

REGISTER

RECRUITER

T.Kujani/CSE

7.STATE CHART DIAGRAM

8. ACTIVITY DIAGRAM

T.Kujani/CSE

9.COMPONENT DIAGRAM

10.DEPLOYNENT DIAGRAM

T.Kujani/CSE

VB CODING DATABASE TABLES: 1. Applied: Empid Jobid 2. Candidate: EmpId Ename Contact Address Skills Experience Location Age 3. Jobs JobId JobName ComName JobDesc Location Skills 4. User Uname Password UserId

5. User1 RecName Pwd CompId FORM 1CODING Private Sub Command1_Click() MsgBox "Welcome" Dim log1 As Portal Dim log2 As User If Option1.Value = True Then Set log1 = New Portal Call log1.Login_verify(Trim(Text1.Text), Trim(Text2.Text)) Else

T.Kujani/CSE

If Option2.Value = True Then Set log2 = New User Call log2.Login(Trim(Text1.Text), Trim(Text2.Text)) End If End If End Sub

Register Form Register Private Sub Command1_Click() Dim r As User Set r = New User Call r.confirm(Trim(Text1.Text), Trim(Text2.Text)) End Sub

T.Kujani/CSE

MATCH JOB Private Sub Command2_Click() Dim m As Recruit Set m = New Recruit Call m.match(Combo1.Text, Text2.Text) End Sub

POST JOB Private Sub Command1_Click() Dim p As Recruit Set p = New Recruit Call p.postjob(Text6.Text, Text7.Text, Text11.Text, Text8.Text, Text9.Text, Text10.Text) End Sub

T.Kujani/CSE

CLEAR Private Sub Command4_Click() Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" End Sub

CANDIDATE POST RESUME Private Sub Command1_Click() Dim p As Apply Set p = New Apply Call p.postskills(Text1.Text, Text2.Text, Text3.Text, Text4.Text, Text5.Text, Text6.Text) End Sub

T.Kujani/CSE

Search Jobs
Private Sub Command2_Click() Dim s As Apply Set s = New Apply Call s.search(Trim(Form3.Combo1.Text), Trim(Form3.Combo2.Text)) End Sub

APPLY Private Sub Command3_Click() Dim a As Apply Set a = New Apply Call a.confirm(Trim(Text8.Text), Trim(Text9.Text)) End Sub

T.Kujani/CSE

TOTAL JOBS APPLIED Private Sub Command5_Click() Dim tot As Apply Set tot = New Apply Call tot.total End Sub

LOGOUT Private Sub Command4_Click() End End Sub CODINGS FOR CLASS APPLY Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset '##ModelId=4D5AAC1D02BF Private Can_name As Variant '##ModelId=4D5AAC2400CB Private C_id As Variant '##ModelId=4D5AAD4503B9

T.Kujani/CSE

Public Sub postskills(name As String, age As Integer, con As Integer, add As String, skills As String, exp As Integer) Set db = OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("Candidate") rs.AddNew rs(1).Value = name rs(7).Value = age rs(2).Value = con rs(3).Value = add rs(4).Value = skills rs(5).Value = exp rs.Update rs.Close db.Close MsgBox "Resume Posted" End Sub '##ModelId=4D5AAD4D0261 Public Sub search(a As String, b As String) Set db = OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("Jobs") rs.MoveFirst Do While Not rs.EOF If rs(4).Value = b And rs(5).Value = a Then Form3.Text7.Text = "Job ID: " & rs(0).Value & vbCrLf & "Job Name: " & rs(1).Value & vbCrLf & "Company Name: " & rs(2).Value & vbCrLf & "Job Description: " & rs(3).Value End If rs.MoveNext Loop MsgBox "Found!" End Sub '##ModelId=4D5B21F00242 Public Sub confirm(b As Integer, c As String) Dim a As Integer Set db = OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("Applied") a = Form1.Label1.Caption rs.AddNew rs(0).Value = a rs(1).Value = b rs.Update rs.Close db.Close MsgBox "Applied" End Sub

T.Kujani/CSE

Public Sub total() Dim a As Integer Dim Count As Integer Set db = OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("Applied") a = Form1.Label1.Caption rs.MoveFirst Count = 0 While Not rs.EOF If rs(0).Value = a Then Count = Count + 1 rs.MoveNext End If Wend MsgBox "Number of Jobs Applied.... " & Count End Sub

PORTAL Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset '##ModelId=4D5AAB7900BB Private C_id As Variant '##ModelId=4D5AAB83009C Private R_id As Variant '##ModelId=4D5AAD90035B Public NewProperty As Apply '##ModelId=4D5AABE8005D Public Sub Login_verify(username As String, Password As String) MsgBox "Inside" Set db = OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("User1") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = username Then If rs(1).Value = Password Then MsgBox rs(0).Value Form1.Hide Form2.Show

T.Kujani/CSE

Exit Do End If End If rs.MoveNext Loop End Sub '##ModelId=4D5AADD00109 Public Sub confirmation() End Sub RECRUIT Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset '##ModelId=4D5AABFE003E Private Company_name As Variant '##ModelId=4D5AAC070157 Private R_id As Variant '##ModelId=4D5AAC10000F Public Sub postjob(jobid As Integer, jname As String, skill As String, cname As String, jdesc As String, loc As String) Set db = DAO.OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("Jobs") rs.AddNew rs(0).Value = jobid rs(1).Value = jname rs(2).Value = cname rs(3).Value = jdesc rs(4).Value = loc rs(5).Value = skill rs.Update rs.Close db.Close MsgBox "Job Posted" End Sub

'##ModelId=4D5AAC160280 Public Sub match(skill As String, jobid As Integer) Set db = DAO.OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("Candidate")

T.Kujani/CSE

rs.MoveFirst Do While Not rs.EOF If rs(4).Value = Form2.Combo1.Text Then Form2.Text1.Text = rs(1).Value Form2.Text3.Text = rs(7).Value Form2.Text4.Text = rs(5).Value Form2.Text5.Text = rs(2).Value Exit Do End If rs.MoveNext Loop End Sub '##ModelId=4D5B21EB02AF Public Sub confirm() End Sub

USER Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset '##ModelId=4D5AAB20002E Private U_name As Variant '##ModelId=4D5AAB28032C Private Password As Variant '##ModelId=4D5AAD6E0232 Public NewProperty As Portal '##ModelId=4D5AAD7F02EE Public NewProperty2 As Recruit

'##ModelId=4D5AAB580280 Public Sub confirm(Uname As String, pwd As String) Set db = OpenDatabase("J:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("User") Dim num As Integer Dim i As Date rs.MoveFirst i = Second(Now) num = Int(2 * i)

T.Kujani/CSE

rs.AddNew rs(0).Value = Uname rs(1).Value = pwd rs(2).Value = num rs.Update rs.Close db.Close MsgBox "Registered Successfully" Form4.Hide Form1.Show End Sub '##ModelId=4D5AAB6A0157 Public Sub Login(username As String, Password As String) MsgBox "Inside" Set db = OpenDatabase("F:\OOAD\RS\RS_DB.mdb") Set rs = db.OpenRecordset("User") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = username Then If rs(1).Value = Password Then MsgBox rs(0).Value Form1.Label1.Caption = rs(2).Value Form1.Hide Form3.Show Exit Do End If End If rs.MoveNext Loop End Sub

RESULT: Thus the mini project for recruitment system has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE

Date: Exp no: 7

SOFTWARE PERSONAL MANAGEMENT

Aim: To implement Software Personal Management system using Rational Rose and Visual basic.

1. PROBLEM ANALYSIS AND PROJECT PLANNING: 1.1 INTRODUCTION: The Software Personal Management is used to maintain the personal and salary details of an employee working in the software company. The employees personal details and salary details will be maintained separately in the database. 1.2 OBJECT: The purpose of this document is to maintain the salary and personal details of an employee. This system reduces the manual work to great extent. 1.3 SCOPE: This system is very essential for every software companies as it reduces man power. This system can be used for all kinds of software companies to maintain personal and salary details and generate reports of specified criteria. 1.4 PROBLEM STATEMENT: In this system, we are going to display the personal details of the employee as well as the salary details of the employee. The manager can add the employee details or can delete the employee details based on the performance. The personal details include details about the idno, name, department, experience, address, date of birth etc.The employee can view the personal details but they cannot change the details then can inform the mistake to the respective concern about the changes. And then employee salary details will be also be displayed based on the idno and the department.The employee can view the salary details but they cannot change. By giving the basic the system will calculate the hra, da, gross pay, bpf, deduction, netpay. And then we can generate the report for the employees personal details as well as the salary details.

T.Kujani/CSE

2. PROBLEM STATEMENT(Use Case)analysis: 2.1 IDENTIFIED USE CASES: a) get_per_detail: This use case allows the manager to enter the personal details of an employee into the personal details database. b) get_salary _detail: This use case allows the manager to enter the salary details of an employee into the salary details database. c) Calculate: This use case is used to calculate basic, hra, da, bpf, gpay, deduction and net pay for each and every employee. d) display detail: This use case is used to display the personal and salary details of an employee whenever the employees identity number along with department is provided. 2.2 IDENTIFIED ACTORS: a) Manager: The manager provides the personal and salary details of an employee and maintains the system. b) Person: The particular employee can view his own salary and personal details.

2.3USECASE DIAGRAM:

T.Kujani/CSE

get_per_detail

get_salary_detail

person

manager

display_detail

calculate

4.CLASS DIAGRAM:

T.Kujani/CSE

5.SEQUENCE DIAGRAM: calculate


: salary_detail : manager

calculate( )

The manager will calculate the salary details of the particular employee.

display detail

: manager

: personal_detail

: salary_detail

display_per_detail( )

display_salary_detail( )

The employees pesonal details will be displayed by using the display_per_detail() and then we can also display the salary details by using the display_salary_detail().

T.Kujani/CSE

get_per_detail

: person

: personal_detail

add_per_detail( )

The employees personal detail is added by using the add_per_detail()

get_salary_detail

: manager

: salary_detail

add_salary_detail( )

The manager can add the salary details by using the add_salary_detail().

T.Kujani/CSE

6.COLLABORTION DIAGRAM: Calculate


1: calculate( ) : salary_detail : manager

display_detail
1: display_per_detail( ) : personal_detail

: manager

2: display_salary_detail( ) : salary_detail

get_per_detail
1: add_per_detail( ) : personal_detail : person

get_salary_detail
1: add_salary_detail( ) : salary_detail : manager

T.Kujani/CSE

7.ACTIVATION DIAGRAM:

start

authentication

login

personal details salary details management employee basic set salary detail display personal details view personal details

calculate calculate the salary add or delete add or delete the details display

display

stop

8. STATE CHART DIAGRAM:

T.Kujani/CSE

start display salary details final state

display salary

enter the id

calculate the salary details final state

get the id

get dep detail

calculate salary calculate

display the personal details final state display detail

enter the department

9. COMPONENT DIAGRAM:
employe e personal detail

salary detail

10. PACKAGE DIAGRAM:

T.Kujani/CSE

personal details UI employee details salary details

11. DEPLOYMENT DIAGRAM:


employe e personal detail

salary detail

VB CODING DATABASE DETAILS: TABLE1 NAME:per117 FIELDS:


eid:integer name:string dob:date dep:string exp:integer address:string

TABLE2 NAME:sal117 FIELDS:


eid: integer dep: string Basic: integer Hra:integer

T.Kujani/CSE

da: integer bpf: integer Gpay: integer Deduction: integer net pay: integer

FORM1 CODING:
Private Sub Command1_Click() //VIEW PERSONAL Form2.Show End Sub Private Sub Command2_Click() //VIEW SALARY Form3.Show End Sub Private Sub Command3_Click() //EXIT End End sub

FORM2 CODING:

T.Kujani/CSE

Dim s_per As personal_detail Private Sub Command1_Click() Set s_per = New personal_detail Call s_per.add_per_detail(Text1.Text, Text2.Text, Text3.Text, Text4.Text, Text5.Text, Text6.Text) End Sub Private Sub Command2_Click() Set s_per = New personal_detail Call s_per.display_per_detail(Trim(Text1.Text), Trim(Text2.Text)) End Sub Private Sub Command3_Click() Form2.Hide Form1.Show End Sub Private Sub Command4_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" End Sub Private Sub Command5_Click() DataReport1.Show vbModal End Sub Private Sub Command6_Click() Set s_per = New personal_detail Call s_per.delete_per_detail End Sub Private Sub Form_Load() Text1.Text = Form3.Text1.Text End Sub

T.Kujani/CSE

FORM3 CODING:
Dim s_det As salary_detail Private Sub Command1_Click() Set s_det = New salary_detail Call s_det.add_salary_detail(Trim(Text1.Text), Trim(Text2.Text), Int(Trim(Text3.Text)), Int(Trim(Text4.Text)), Int(Trim(Text5.Text)), Int(Trim(Text6.Text)), Int(Trim(Text7.Text)), Int(Trim(Text8.Text)), Int(Trim(Text9.Text))) End Sub Private Sub Command2_Click() Set s_det = New salary_detail Call s_det.calculate(Trim(Text1.Text), Trim(Text2.Text)) End Sub Private Sub Command3_Click() End End Sub Private Sub Command4_Click() Form3.Hide Form1.Show End Sub Private Sub Command5_Click() Text1.Text = ""

T.Kujani/CSE

Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" End Sub Private Sub Command6_Click() Set s_det = New salary_detail Call s_det.display_salary_detail(Trim(Text1.Text), Trim(Text2.Text)) End Sub Private Sub Command7_Click() DataReport1.Show vbModal End Sub Private Sub Command8_Click() Set s_det = New salary_detail Call s_det.delete_salary_detail End Sub

CLASS CODING: PERSONAL DETAILS CLASS:


Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset

T.Kujani/CSE

Private eid As String Private name As String Private dob As Date Private dep As String Private exp As Integer Private address As String Public NewProperty As salary_detail Public Sub display_per_detail(eid As String, name As String) Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("per117") rs.MoveFirst Do While Not rs.EOF If Trim(rs(0).Value) = Trim(Form2.Text1.Text) Then Form2.Text1.Text = rs(0).Value Form2.Text2.Text = rs(1).Value Form2.Text3.Text = rs(2).Value Form2.Text4.Text = rs(3).Value Form2.Text5.Text = rs(4).Value Form2.Text6.Text = rs(5).Value Exit Do End If rs.MoveNext Loop rs.Close db.Close End Sub Public Sub add_per_detail(eid As String, name As String, dob As Date, dep As String, exp As Integer, address As String) Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("per117") rs.AddNew rs(0).Value = Form2.Text1.Text rs(1).Value = Form2.Text2.Text rs(2).Value = Form2.Text3.Text rs(3).Value = Form2.Text4.Text rs(4).Value = Int(Form2.Text5.Text) rs(5).Value = Form2.Text6.Text rs.Update MsgBox "values inserted" rs.Close db.Close End Sub

T.Kujani/CSE

Public Sub delete_per_detail() Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("per117") rs.MoveFirst Do While Not rs.EOF If Form2.Text1.Text = rs(0).Value Then rs.Delete End If rs.MoveNext Loop MsgBox "details deleted" End Sub SALARY DEAILS CLASS: Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset Private eid As String Private dep As String Private basic As Integer Private hra As Integer Private da As Integer Private bpf As Integer Private gpay As Integer Private deduction As Integer Private netpay As Integer Public Sub add_salary_detail(eid As String, dep As String, basic As Integer, hra As Integer, da As Integer, bpf As Integer, gpay As Integer, deduction As Integer, netpay As Integer) Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("sal117") MsgBox "inside" rs.AddNew rs(0).Value = Form3.Text1.Text rs(1).Value = Form3.Text2.Text rs(2).Value = Int(Form3.Text3.Text) rs(3).Value = Int(Form3.Text4.Text) rs(4).Value = Int(Form3.Text5.Text) rs(5).Value = Int(Form3.Text6.Text) rs(6).Value = Int(Form3.Text7.Text) rs(7).Value = Int(Form3.Text8.Text) rs(8).Value = Int(Form3.Text9.Text) rs.Update MsgBox "values inserted" rs.Close

T.Kujani/CSE

db.Close End Sub Public Sub calculate(eid As String, dep As String) Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("sal117") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = eid Then If rs(1).Value = dep Then rs.Edit rs(3).Value = (rs(2).Value * 0.1224) Form3.Text4.Text = rs(3).Value rs(4).Value = (rs(2).Value * 0.15) Form3.Text5.Text = rs(4).Value rs(5).Value = (rs(2).Value * 0.25) Form3.Text6.Text = rs(5).Value rs(6).Value = (rs(3).Value + rs(4).Value + rs(5).Value - 1500) Form3.Text7.Text = rs(6).Value rs(7).Value = 200 Form3.Text8.Text = rs(7).Value rs(8).Value = (rs(6).Value + rs(7).Value) Form3.Text9.Text = rs(8).Value rs.Update MsgBox "payslip is generated" Exit Do End If End If rs.MoveNext Loop rs.Close db.Close End Sub Public Sub display_salary_detail(eid As String, dep As String) MsgBox "please enter dep" Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("sal117") rs.MoveFirst Do While Not rs.EOF Form3.Text2.Text = Form2.Text4.Text If rs(0).Value = eid Then If rs(1).Value = dep Then Form3.Text2.Text = rs(1).Value Form3.Text3.Text = rs(2).Value Form3.Text4.Text = rs(3).Value Form3.Text5.Text = rs(4).Value

T.Kujani/CSE

Form3.Text6.Text = rs(5).Value Form3.Text7.Text = rs(6).Value Form3.Text8.Text = rs(7).Value Form3.Text9.Text = rs(8).Value Exit Do End If End If rs.MoveNext Loop MsgBox "payslip is generated" rs.Close db.Close End Sub Public Sub delete_salary_detail() Set db = DAO.OpenDatabase("D:/msp/software/soft.mdb") Set rs = db.OpenRecordset("sal117") rs.MoveFirst Do While Not rs.EOF If Form3.Text1.Text = rs(0).Value Then rs.Delete End If rs.MoveNext Loop MsgBox "details deleted" End Sub

RESULT: Thus the mini project for software personal management has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE

Date:

EXAM REGISTRATION
Exp no: 8

Aim:
To implement exam registration project using Rational Rose and Visual Basic.

1. PROBLEM ANALYSIS AND PROJECT PLANNING: 1.1 INTRODUCTION:

The exam registration system is used to have the details about the exams registration and the details about the person who have cancelled the exam registration. In this we can insert the details of the person who have registered and then we can view the details about the cancellation.
1.2 OBJECTIVE:

The purpose of this document is to maintain the details of the registration of the particular person and cancellation details.
1.3 SCOPE:

This system is very essential for every registration as it reduces the man power. This system can be used for all kinds of the registration and cancellation.
1.4 PROBLEM STATEMENT:

In this system we are going to register the exam by giving their personal details as well as the subject what he/she is going register. We can also insert the details of the person and then we can delete personal details of the person. In one form we can register the details about the exam registration. In another form we can cancel the registration by giving the id of the particular student and then details will be deleted automatically and then we can verify in the database table. It will reduce the man power.

T.Kujani/CSE

2. PROBLEM STATEMENT(Use Case)analysis: 2.1 IDENTIFIED USE CASES:

a)get_stud_detail: This use case allows the examimer to enter the personal details of the student to the database. b)display_stud_detail: This use case allows to display the student personal details including the registered. c)update_stud_detail: This use case allows the examiner to update the details of the student based on the registration. d)update_data_detail: This use case is used to update the details of the student to the database and then it can be verified whenever we needed.
2.2 IDENTIFIED ACTORS:

a) Student: The student provides the personal details including the registration of the subjects which is maintained in the system. b)database: The database will provide the details including the registration and cancellation.

T.Kujani/CSE

2.3 USECASE DIAGRAM:

get_stud_detail

display_stud_detail

student

database

update_stud_detail

update_data_detail

4.CLASS DIAGRAM:

T.Kujani/CSE

5.SEQUENCE DIAGRAM:
display_stud_detail:

: student : stud_detail

display_stud_detail( )

The student personal detail is added by using the display_stud_detail() it includes the details such as name,subject,address etc. get_stud_details:

: student : stud_detail

add_stud_detail( )

The student details can be added by using the add_stud_detail().

T.Kujani/CSE

update_data_detail:

: database : data_detail

update_data_detail( )

The database will update the data by using the update_data_detail() update_stud_detail:

: student

: stud_detail

update_stud_detail( )

The student details will be updated in the database by using update_stud_detail().

T.Kujani/CSE

6.COLLABORTION DIAGRAM:
display_stud_detail:
1: display_stud_detail( ) : stud_detail

: student

get_stud_details:
1: add_stud_detail( ) : stud_detail

: student

update_data_detail:

1: update_data_detail( )

: data_detail

: database

update_stud_detail:
1: update_stud_detail( ) : stud_detail

: student

T.Kujani/CSE

7.ACTIVITY DIAGRAM:
start

enter into system

register

cancellation

cancel registration

enter the subject

apply

stop

8.STATECHART DIAGRAM:
start start enter id cancellatio n

final state

cancelling

registration final state geting the subject

getting the id

registering

enter subject

T.Kujani/CSE

9.COMPONENT DIAGRAM:
student exam registration

database

10.PACKAGE DIAGRAM:

UI

student details

Registration database

11.DEPLOYMENT DIAGRAM:
student exam registration

database

T.Kujani/CSE

VB CODING:

DATABASE DETAILS: TABLE1 NAME: data117 FIELDS: id: integer subject: string TABLE2 NAME: stud117 FIELDS: id: integer name: string address: string phoneno: integer subject: integer

FORM1 CODING: Private Sub Command1_Click() Form1.Hide Form2.Show End Sub Private Sub Command2_Click() Form1.Hide Form3.Show End Sub Private Sub Command3_Click() End End Sub

T.Kujani/CSE

FORM2 CODING: Dim s_detail As stud_detail Private Sub Command1_Click() Set s_detail = New stud_detail Call s_detail.add_stud_detail(Text1.Text, Text2.Text, Text3.Text, Text4.Text, Text5.Text) End Sub Private Sub Command2_Click() Set s_detail = New stud_detail Call s_detail.cancel_stud_detail End Sub Private Sub Command3_Click() Form2.Hide Form1.Show End Sub Private Sub Command4_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" End Sub Private Sub Command5_Click() Set s_detail = New stud_detail Call s_detail.display_stud_detail(Trim(Text1.Text), Trim(Text2.Text)) End Sub Private Sub Command6_Click() DataReport1.Show vbModal End Sub Private Sub Form_Load() Text1.Text = Form3.Text1.Text End Sub

T.Kujani/CSE

FORM3 CODING: Dim d_detail As data_detail Private Sub Command1_Click() Set d_detail = New data_detail Call d_detail.delete_data_detail End Sub Private Sub Command2_Click() Set d_detail = New data_detail Call d_detail.cancel_data_detail End Sub Private Sub Command3_Click() Form3.Hide Form1.Show End Sub Private Sub Command4_Click() Text1.Text = "" Text2.Text = "" End Sub Private Sub Command5_Click() DataReport1.Show vbModal End Sub

T.Kujani/CSE

CLASS CODING: DATA DETAIL CLASS: Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset Private id As String Private subject As String Public Sub delete_data_detail() Set db = DAO.OpenDatabase("D:\117\exam\register.mdb") Set rs = db.OpenRecordset("data117") rs.MoveFirst Do While Not rs.EOF If Form3.Text1.Text = rs(0).Value Then If Form3.Text2.Text = rs(1).Value Then rs.Delete End If End If rs.MoveNext Loop MsgBox "details deleted" rs.Close

T.Kujani/CSE

db.Close End Sub Public Sub cancel_data_detail() End End Sub Public Sub update_data_detail(id As String, subject As String) Set db = DAO.OpenDatabase("D:\117\exam\register.mdb") Set rs = db.OpenRecordset("data117") rs.AddNew rs(0).Value = id rs(1).Value = subject rs.Update rs.Close db.Close End Sub STUDENE DETAILS CLASS: Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset Private id As String Private name As String Private address As String Private phoneno As String Private subject As String Public NewProperty As data_detail Public Sub add_stud_detail(id As String, name As String, address As String, phoneno As String, subject As String) Set db = DAO.OpenDatabase("D:\117\exam\register.mdb") Set rs = db.OpenRecordset("stud117") rs.AddNew rs(0).Value = Form2.Text1.Text rs(1).Value = Form2.Text2.Text rs(2).Value = Form2.Text3.Text rs(3).Value = Form2.Text4.Text rs(4).Value = Form2.Text5.Text rs.Update MsgBox "details added" rs.Close db.Close End Sub

T.Kujani/CSE

Public Sub cancel_stud_detail() End End Sub Public Sub display_stud_detail(id As String, name As String) MsgBox "please enter id" Set db = DAO.OpenDatabase("D:\117\exam\register.mdb") Set rs = db.OpenRecordset("stud117") rs.MoveFirst Do While Not rs.EOF If Trim(rs(0).Value) = Trim(Form2.Text1.Text) Then Form2.Text1.Text = rs(0).Value Form2.Text2.Text = rs(1).Value Form2.Text3.Text = rs(2).Value Form2.Text4.Text = rs(3).Value Form2.Text5.Text = rs(4).Value Exit Do End If rs.MoveNext Loop rs.Close db.Close End Sub Public Sub update_stud_detail(id As String, name As String, address As String, phoneno As Integer, subject As String) Set db = DAO.OpenDatabase("D:\117\exam\register.mdb") Set rs = db.OpenRecordset("stud117") rs.AddNew rs(0).Value = id rs(1).Value = name rs(2).Value = address rs(3).Value = phoneno rs(4).Value = subject rs.Update rs.Close db.Close End Sub

RESULT: Thus the mini project for exam registration system has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

T.Kujani/CSE Date: Exp no: 9

COURSE RESERVATION SYSTEM

Aim:
To implement course reservation project using Rational Rose and Visual Basic.

1.Problem analysis and project planning 1.Introduction


This software is designed in such a way that it receives the name and other particulars from the candidate if he/she is a new user. If he/she is already a member or user he/she no need to fill their personal details. Only work for the candidate is to fill the form and reserve the course which he/she desired.

2.Objectives
The ultimate objective of this software is to eliminate hassles that the candidate overcomes while registering him. The software will reduce the paper work. This also reduces the time delay.

3.Scope
If the candidate is a new user he is requested to fill the form. This form will contain important particulars of the candidate like name, DOB, Resident address, Belongs to (i.e., whether the candidate is belongs to school or college or a working person) etc. Then the candidate can fill up the course details and reserve the course. If he is an already user he no need to fill the form, he can directly register the course.

4.Problem Statement
The system is built for the candidate who may belongs to any category such as school student, working person, college student or may be others to reserve the course in a particular Institute. If the candidate is an already user he can directly login and can reserve the course that he desired. If the candidate is a new user, then he must submit his own details. After filling the details he can reserve his course at particular/desired center location. If the candidate wants to edit his/her profile he can edit it. Both the new user and already user can view the availability of seats in particular course in a particular location. If the seats are available, he/she can register the course. All the updates and changes are stored in Database.

2.Problem statement(Use case) analysis

T.Kujani/CSE

2.1 Identified use cases a)Login


This use case describes how the already user logs into the system.

b)Sign in
This use case describes how the New user logs into the system.

c)Enter the details


The candidate uses this use case to fill their own details.

d)Register the course


The candidate uses this case for register the course.

e)Display availability
This use case display the availability of seats to the candidate.

2.2 Identified Actors a)Already user


The already user is the one who is logged in and he/she is already a member.

b)New user
The new user is the one who is new to the institute, so he must fill his required details.

T.Kujani/CSE

2.3 Use Case Diagram


Login

signin

alreadyuser Enter_the_details

newcandi

register_the_course

display_availability

3. Design of Course Reservation System 3.1 Login 3.1.1 Brief description:


This use case describes how the already user logs into the system.

3.1.2 Flow of events: 3.1.2.1 Basic flow:


1. The system requests the actor to enter the name and the password. 2. The actor enters the name and the password. 3. The system validates the entered name and password and logs the actor in to the system.

3.1.2.2 Alternative flow:


1. If in the basic flow the actor enters the invalid name or password then display an error message. 2. The actor can choose either to return to the beginning of the basic flow or can sign up as a new user.

3.1.3 Pre conditions:


The candidate should be an already user.

3.1.4 Post conditions:


The use case was successful and the actor is now logged into the system.

T.Kujani/CSE

3.2 Sign Up 3.2.1 Brief description:


This use case describes how the New user logs into the system.

3.2.2 Flow of events: 3.2.2.1 Basic flow:


1. The system requests the actor to enter the name and the password. 2. The actor enters the name and the password. 3. Now he is signed up.

3.2.2.2 Alternative flow:


The actor can cancel the login at which point use ends.

3.2.3 Pre conditions:


None

3.2.4 Post conditions:


The use case was successful and the actor is now signed up into the system.

3.3 Enter the details 3.3.1 Brief description:


The candidate uses this use case to fill their own details.

3.3.2 Flow of events: 3.3.2.1 Basic flow:


1. The candidate personal details form asks for the candidates details. 2. The actor enters the details required. 3. If the details are filled by the actor then it will be stored in database and confirmation message will be displayed.

3.3.2.2 Alternative flow:


If the actor is not ready to fill his own details he can logout.

3.3.3 Pre conditions:


The actor will need to have successfully logged in.

3.3.4 Post conditions:


If the actor has successfully entered the details then he/she can move to fill the course registration form.

3.4 Register the course 3.4.1 Brief description:


The candidate uses this case for register the course.

3.4.2 Flow of events: 3.4.2.1 Basic flow:


1. The actor asks for the registration form. 2. The registration form asks for the course details. 3. The actor enters the details.

T.Kujani/CSE

4. The actor can view the availability of seats in a particular course in a particular center. 5. If the contents are true then the details will be stored in the database and confirmation message will be displayed.

3.4.2.2 Alternative flow:


The actors can logout if no vacancy. 3.4.3 Pre conditions: None

3.4.4 Post conditions:


The actor can register the course.

3.5 Display availability 3.5.1 Brief description:


This use case display the availability of seats to the candidate.

3.5.2 Flow of events: 3.5.2.1 Basic flow:


1. Both the already user and new user can view the availability of the seats for the particular course in the particular center. 2. After the view of seats availability the actor can choose the alternative centre or the course.

3.5.2.2 Alternative flow:


If no availability in the particular center the actor can choose the alternative centre or the course.

3.5.3 Pre conditions:


The actor should successfully logged in and entered the details.

3.5.4 Post conditions:


The actor registers the desired course at a particular center.

4.Class Diagram:

T.Kujani/CSE

5. Activity Diagram:

6. State Diagram:
Go to main page start Login Page New user? Details Page

Already user? show details/logout End Display Details

Reserve seat/logout

end

Reservatio n Page

T.Kujani/CSE

7.Sequence Diagram: Login:


alreadyuser verify login

confirmation

Signup:
newcandi database

signup

add_details added_as_member

Enter the details:


newcandi database

enter_details

added_in_database added

T.Kujani/CSE

Register the course:


alreadyuser newcandi database

select_course add_course

Registered select_course

added

registered

Display availability:
member database

requesting_availability

searching

display_availability

8.Collaboration diagram Login:


alreadyus er 1: verify 2: confirmation

login

T.Kujani/CSE

Sign up:
newcandi 1: signup 2: add_details

3: added_as_member database

Enter the details:


newcandi 1: enter_details 2: added_in_database

3: added database

Register the course:


alreadyus er 1: select_course

5: added

3: Registered database 4: select_course

newcandi

6: registered

T.Kujani/CSE

Display availability:
2: searching

database

3: display_availability

member 1: requesting_availability

9.Component Diagram:

server

UserInterface

course register

Databas e

candidate details course details candidate

T.Kujani/CSE

10.Deployment Diagram:

SERVER Store details

DATA BASE

Course Registration

Enter the details

user

VB CODING: Database Information Table : 1.Course_details


1. Center_Location 2. C 3. C++ 4. JAVA 5. DOTNET 6. DBMS

2.Student_details :
1. 2. 3. 4. 5. Name Password DOB Resident Belongs to 6. Qualification

FORM 1: Private Sub Login_Click()


Dim log As stud Set log = New stud Call log.verify(Trim(Text1.Text), Trim(Text2.Text))

T.Kujani/CSE

Form1.Hide Form3.Show End Sub

Private Sub SignUp_Click()


Dim log1 As stud Set log1 = New stud Call log1.verify1(Trim(Text3.Text), Trim(Text4.Text)) Form1.Hide Form2.Show End Sub

FORM 2:
Private Sub Submit_Click() Dim s As stud Set s = New stud Call s.submit(Text1.Text, Text2.Text, Text3.Text, Combo2.Text, Text4.Text) MsgBox "Your details are successfully added" Form2.Hide Form3.Show End Sub Private Sub Logout_Click() End End Sub

T.Kujani/CSE

FROM 3:
Private Sub Display_Click() Set c = New course Call c.disp(Combo1.Text, Combo2.Text) End Sub Private Sub Register_Click() Set c = New course Call c.register(Combo1.Text, Combo2.Text) MsgBox "Your requested course is registered successfully" End Sub

Private Sub Logout_Click() End End Sub Private Sub EditProfile_Click() Form3.Hide Form2.Show End Sub

T.Kujani/CSE

CLASS CODING Course class:


Option Explicit Private cname As String Private loc As String Dim db As DAO.Database Dim rs As DAO.Recordset Public Sub register (cname As String, loc As String) Set db = DAO.OpenDatabase("E:\coursereg\stud_det.mdb") Set rs = db.OpenRecordset("course_det") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = loc Then rs.Edit If cname = "C" Then rs(1).Value = rs(1).Value - 1 End If If cname = "C++" Then rs(2).Value = rs(2).Value - 1 End If If cname = "JAVA" Then rs(3).Value = rs(3).Value - 1 End If If cname = "DOTNET" Then rs(4).Value = rs(4).Value - 1 End If

T.Kujani/CSE

If cname = "DBMS" Then rs(5).Value = rs(5).Value - 1 End If rs.Update Exit Do End If rs.MoveNext Loop End Sub

Public Sub disp(cname As String, loc As String) Set db = DAO.OpenDatabase("E:\coursereg\stud_det.mdb") Set rs = db.OpenRecordset("course_det") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = loc Then If cname = "C" Then Form3.Text2.Text = rs(1).Value End If If cname = "C++" Then Form3.Text2.Text = rs(2).Value End If If cname = "JAVA" Then Form3.Text2.Text = rs(3).Value End If If cname = "DOTNET" Then Form3.Text2.Text = rs(4).Value End If If cname = "DBMS" Then Form3.Text2.Text = rs(5).Value End If Exit Do End If rs.MoveNext Loop End Sub

Student class:
Option Explicit Dim db As DAO.Database Dim rs As DAO.Recordset Private name As String Private flag As Boolean Private pswd As String

T.Kujani/CSE

Public Sub verify(name As String, pswd As String) Set db = DAO.OpenDatabase("E:\coursereg\stud_det.mdb") Set rs = db.OpenRecordset("student_det") rs.MoveFirst Do While Not rs.EOF If rs(0).Value = name Then If rs(1).Value = pswd Then MsgBox "Hi" MsgBox rs(0).Value Form1.Hide Form3.Show flag = True Exit Do End If End If rs.MoveNext Loop If flag = False Then MsgBox "You are not a member yet!! Signin pls!!" End End If rs.Close db.Close End Sub Public Sub verify1(name As String, pswd As String) Set db = DAO.OpenDatabase("E:\coursereg\stud_det.mdb") Set rs = db.OpenRecordset("student_det") rs.AddNew rs(0).Value = name rs(1).Value = pswd rs.Update rs.Close db.Close Form1.Hide Form2.Show MsgBox "Enter your details here!!" End Sub Public Sub submit(name As String, dob As Date, resident As String, belong As String, qual As String) Set db = DAO.OpenDatabase("E:\coursereg\stud_det.mdb") Set rs = db.OpenRecordset("student_det") Do While Not rs.EOF If rs(0).Value = name Then rs.Edit rs(2).Value = dob

T.Kujani/CSE

rs(3).Value = resident rs(4).Value = belong rs(5).Value = qual rs.Update Exit Do End If rs.MoveNext Loop rs.Close db.Close End Sub

RESULT: Thus the mini project for course registration system has been successfully implemented using Rational Rose and Transformed with Visual Basic Code.

Você também pode gostar