Hostel Management Project Report CTP 6077
Hostel Management Project Report CTP 6077
Hostel Management Project Report CTP 6077
DECLARATION
I LWANGA DAVID do declare that the following work is my original copy in which I have
compiled all the necessary items. No part of this project has been presented for an academic award
in any place. No part of this project should be republished without my permission.
Student Registration No.: ...............................................................
Student signature: ..........................................................................
Date: ............................................................................................
Approved by:
Name of the supervisor: ..................................................................
Supervisor signature: ......................................................................
Date: .............................................................................................
ACKNOWLEDGEMENT
The special thank goes to Mr.John Muniu who has been helpful and supportive throughout
my project period.
I also appreciate all my friends for their support and encouragement, especially my Dad and
Mum and my brother Julius G Lwanga for their support and standing with me through
prayers and financially.
Without their efforts, the completion of the project would not have been possible.
I highly thank God for giving me the strength to successfully complete this project.
DEDICATION
I wish to dedicate this work to my Dad for having faith in me and for been supportive in my
life.
4
ABSTRACT
My Projects title is HOSTEL MANAGEMENT SYSTEM designed for UpperHill Hostels. The
main purpose of this project is to introduce a computerized environment to the hostel. The project
objectives is to give a system that will be fast to speed up operations, provide a less paper office,
give a systematic and efficient way of keeping Hostel records to avoid duplication and to give a
secure method of keeping room records to avoid data loss and intentional edit of data.
The project will cover Hostel admission, Payment, Expenditure, Room and Allotment parts. This is
to ensure that all personal data needed for a student is entered in the system during admission and
all payment and allotment record are correctly stored.
This project is carried out using Visual Basic as front end and Ms Access as back end.
INVESTIGATION
The investigation was conducted using questionnaires, interviews and direct observation.
Through these methods the users needs were clearly identified.
Questions used during this phase are found in the appendices
5
.2.1.2 HOSTEL DETAILS
Hostel name
Hostel Nick Name
Sex
Capacity
No of Rooms
Location
2.2.1.2 ROOM ALLOTMENT
Hostel name
Hostel Nick Name
Sex
Capacity
No of Rooms
Location
2.2.2. PROCESSES
Calculation of balances
Calculation of Total
Calculate of Non Allocated vacancies
Assigning Grades
2.2.3 OUTPUT SPECIFICATION
Payment Report-Reports showing payments details
Room Details Report-Reports on the all rooms in UpperHill hostels
Hostel Admission Report-A report that will show admission details.
Hostel Report. Show details pertaining each hostel
Expenditure Report- A report that will show all expenses incurred.
Admission Number
ID/Passport
First Name
Last Name
Sex
Date of Admission
Date of birth
Guardian
College/University
Year in College
2.2.4.2 ROOM DETAILS
Hostel name
Room Number
Room type
Sex
Amount
Room Capacity
Allocated
2.2.4.3 EXPENSES
Expense
Date
Amount
Updater
Total Expense
2.2.4.2 HOSTEL DETAILS
Hostel name
Hostel Nickname
Sex
Capacity
Room Number
Location
2.2.4.2 ROOM PAYMENT
Receipt Number
Full Names
Admission Number
Room type
Room Number
Hostel Name
Date of payment
Amount Expected
Amount Paid
Balance
2.2.4.2 ROOM ALLOTMENT
Admission Number
First Name
Last Name
Sex
Date of Allotment
Room type
Room Number
Semester
Year in Institution
2.3 NON-FUNCTIONAL REQUIREMENTS
Non-Functional Requirement is a requirement that specifies criteria that can be used to judge the
operation of a system, rather than specific behaviors.
7
The level of security to avoid damage and loss of information and
data.
The time that the system takes to react to a given input should be of
great consideration.
The degree to which the system meets the users requirements and
expectations.
8
2.4 NEW SYSTEMS SCOPE
1.8.1 HOSTEL ADMISSIONS
The system will be used in the hostel admission process. If a student is interested with the room,
the user must enter the students details in the system; hence the system will be used to assign
Hostel admission numbers.
1.8.2 ROOMS PAYMENT AND ALLOTMENT
The system will be used in keeping records of all the amounts paid for the rooms, balances. It will
also be used to allot rooms to the students who have already paid hostel fee and have been
registered.
1.8.3 HOSTEL EXPENDITURE
All hostel expenses are entered in this form. This includes and not limited to water bills, electricity
bills, wages and any other expense that occurs during that month. A total expense is calculated.
1.8.4 ROOM DETAILS
The system will be used to enter information about each room.
1.8.5 HOSTEL DETAILS
The system will be used to input and retrieve information about all New and Old Hostel
2.5 OBJECTIVES OF THE NEW SYSTEM
This system is the computerized version of the existing system. Provides easy and quick access
over the data Authorization schemes.
A system that will be used for assigning Room admission numbers to avoid duplication.
A system to keep accurate records for payments made by students for hostels.
A systematic way of keeping room details and hostels registration records.
A system that will be secure and which can create backups on a regular basis.
The user would like a system that is fast while working with it, which will provide an easy
way of retrieving and updating records.
2.6 CONSTRAINTS OF THE NEW SYSTEM
2.6.1 Finance
The cost of acquiring the required resources brings about a financial constraint since all the
hardware and software are to be purchased.
2.6.2 Technical Skills
The end user need skills to work with the proposed system hence leading to user training
2.6.3 Equipment/Resources
All hardware and software to be used must be acquired to enable the development of the new
system.
2.7 LIMITATION OF THE CURRENT SYSTEM
Errors in records
Time consuming
Lack of security
9
Cumbersome
2. DESIGN PHASE
Introduction
When designing a system you build a plan for how your project will go through the rest of the stages.
E.g. Development and Implementation Stages.
This document shows the design of the proposed Hostels Management System for UpperHill Hostels
.It shows details of the following:
Naming convention
Data validation
Output
Module
Login
User
Input
Username
Data Type
Text
Processing
Verify if username
Output
Allow access if
10
Admin
Hostel Admission
Room Details
Expenditure Details
Room Payment
Room allotment
Hostels Details
Password
Text
username and
password are
correct/Deny access
if they are not correct
Allow access if
Admin username and
Admin password are
correct/Deny access
if they are not correct
Details of the new
student
Username
Password
Text
Text
Verify if Admin
username and Admin
password are correct
Admission Number
ID/Passport
First Name
Last Name
Sex
Date of Admission
Date of birth
Guardian
College/University
Year in College
Hostel name
Room Number
Room type
Sex
Amount
Room Capacity
Allocated
Expense
Date
Amount
Updater
Total Expense
Text
Text
Text
Text
Text
Date/Time
Date/Time
Text
Text
Number
Text
Text
Text
Text
Currency
Number
Number
Text
Date/Time
Currency
Text
Amount
Receipt Number
Full Names
Admission Number
Room type
Room Number
Hostel Name
Date of payment
Amount Expected
Amount Paid
Balance
Admission Number
ID/ Passport Number
First Name
Last Name
Sex
Date of Allotment
Hostel Nick Name
Room type
Room Number
Semester
Year in Institution
Text
Text
Text
Text
Text
Text
Date/Time
Currency
Currency
Currency
Text
Number
Text
Text
Text
Date
Text
Text
Text
Number
Number
Hostel name
Hostel Nickname
Sex
Capacity
Room Number
Location
Text
Text
Text
Number
Text
Text
Hostels details
Report
Calculate Total
expenses
11
Report
Admission Number
Text
Admissions
Payments
Expenditures
Room Details
Room allotments
Hostel details
2.2.1 Entity Relationship Diagrams (ERD)
Student
Admission
Can be admitted
Can be done
Payment
Can make
Can be made
Room
Students
Can be allotted to
Can allot
Expenses
12
Size
AdmNo
ID/Passport
First name
Last name
Sex
Date of
admission
Date of birth
Guardian
Text
Number
Text
Text
Text
Date/Time
Admission Number
Identity card/Passport Number
First Name
Last Name
Sex
Date of Admission
8
10
18
22
25
Date/Time
Text
Date of Birth
Parents or Guardian phone number
4
1
College/Univ
Text
College or university
Primary
Key
Yes
No
No
No
No
No
Validation
No
No
Is Not Null
A or B
Is Not Null
No duplicate
Is Not Null
Is Not Null
Is Not Null
Is Not Null
Is Not Null
13
ersity
Year in
college
Number
Field Name
Receipt Number
Full Names
Admission
Number
Room type
Room Number
Hostel name
Date of payment
Default
Value
-
Receipt Number
First Name
Admission Number
Text
Text
Text
Room type
Room Number
Name of the Hostel
Date/Time
Date of Payment
Field Name
Expense
Data Type
Text
Description
Expense Incurred
Date
Amount
Update
Date/Time
Currency
Text
Total Expense
Integer
Date
Amount
Name of person updated the
expense
Overall expense
Size
Primary Key
Valida
8
6
6
Yes
No
No
Is Not
-
6
5
1
No
No
No
Is Not
Is not n
No
Is Not
Primary Key
Yes
5
3
3
Validation
No
duplicate
Is Not Null
-
Field Name
AdmNo
Text
Admission Number
Primary
Key
Yes
ID/Passport
First name
Last name
Text
Text
Text
10
18
22
No
No
No
No
duplicate
Is Not Null
Is Not Null
Is Not Null
Sex
Date of
allotment
Hostel nick
name
Room type
Text
Date/Time
Sex
Date of allotment
25
No
No
Is Not Null
Is Not Null
Text
No
Is Not Null
Text
Room type
No
A or B
Is Not Null
Semester
Year in
Institution
Number
Semester
Year in Institution
Field Name
Data Type
Description
Size
Validation
Hostel Name
Text
Primary
Key
Yes
Room
Number
Room type
Sex
Text
Room Number
10
No
No
duplicate
Is Not Null
Text
Text
18
22
No
No
Is Not Null
Is Not Null
Amount
Room
capacity
Currency
Number
Amount paid
No of student s it can hold
25
No
No
Is Not Null
Is Not Null
Default Value
Size
Validation
14
Allocated
Number
Field Name
No
Data
Type
Text
Description
Yes
Hostel
Nickname
Sex
Text
10
No
Text
Sex
18
No
Capacity
Number
22
No
Number of
Rooms
Location
Number
25
No
Text
Hostel Name
Primary Key
No
Is Not Null
Validatio
n
No
duplicate
Is Not
Null
Is Not
Null
Is Not
Null
Is Not
Null
Is Not
Null
Validation Rule
Must not be null
No duplicates
Must not be null
Must not be null
Must not be null
Should not be null
Must not be null and
should be either Single or
Double
Must not be null and
should be either A or B
Must not be null
And should not be later than
current date
Must not be null
Must not be null
And should not be later than
current date
15
2.6 OUTPUT
The proposed system will produce the following reports:
Room details Report- A report that will show all information about rooms
Hostels Report- This will show inform about the hostels e.g. capacity, name etc
Expenditure- This will show information about expenses incurred by the hostel
(current date)
ROOM PAYMENT REPORT
Logo
Admission Number
Hostel Name
Receipt No
Date of Payment
Name
Amount Expected
Room type
Amount Paid
Room Number
Hostel
Registration report Balance
UPPER
(current date)
(Page
#) HILL HOSTELS
Logo
Guardian
Date of Birth
Year in College
(Page #)
16
(current date)
HOSTEL DETAILS REPORT
Logo
Hostel Name
Sex
No of Rooms Location
Capacity
(Page #)
(current date)
HOSTEL EXPENDITURE REPORT
Logo
Expense
Date
Amount
Total
Updater
2.6.5 Room
Details
Report
Hostel
Details
report
UPPER
HILL
(current
This report shows details aboutHOSTELS
the Room. The details
to be date)
displayed in the form will be:
HOSTEL
REPORT
Hostel Name, Room Number, Room
Type,DETAILS
Amount Per
Month, Capacity, Sex and Allocated.
The following diagram depicts a sample of the Room Details report
#)
Hostel Name (Page
Room
Number
Room Type
Capacity
Sex
Allocate
d
17
(current date)
HOSTEL REGISTRATION REPORT
Logo
Admission Number
Last Name
Date of Allotment
ID/Passport No
Room Type
Sex
First name
Hostel Name
Semester
Last name
Year in College
(Page #)
Select an activity
Username:
Make Payment
Ok
Cancel
Performance
2.7.2 Activities Interface
Update
This will be the first interface to appear after the user successfully logs in. The user will select one activity from
the list in order to perform any task. The following diagram shows the activities interface
Reports
Cancel
18
Save
Admission
Number
Admission
Form
Term
Amount Paid
Total
Balance
Calculate
Save
New
Payments
Exit
19
CAT1 Average
Form
CAT2 Average
Stream
Exam
Grade
Total
Overall Grade
ListMarks
Average
Enter Marks
New
Save
Exit
Performance
Update
File
Admission
Performance
Payment
Exit
Backup
Admission Records
Adm_No Surname Other_Names Contacts Address DateofAdmission Form
View
Edit
Exit
Admission Records
Stream
20
2.8 Chart showing overall system design
Start
NO
NOO
Admission?
Payment?
Performance?
YES
YES
YES
No admission
YES
New student?
NO
NO
NO
Enter scores
YES
Calculations
Calculations
NO
All data is valid?
YES
Admission File
Payment File
Stop
Performance file
21
2.8.1 Flowchart key
Rounded rectangle- Shows start / stop
Decision-used where there are two choices to make (Has two options yes or no).
Manual operation-Indicates that there is manual work to be done while using the system.
Manual input-A user must input data manually. For example, key in data from the keyboard
Document-in this case it shows a document from the manual operation to show there is no
admission.
Data flow -Shows the flow and direction of data in the system .the arrow head shows the
destination
of the data.
2.8.2 Flowchart Algorithm
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Start
If activity is admission, then go to step 5.
If activity is payment, then go to step 12.
If activity is performance, then go to step 16.
Check if a student meets all requirements(Manually)
if student meets all requirements, then go to step 8
If student does not meet all requirements, No admission.
Enter student details.
Verify if entered data is valid.
If data entered is not valid, then go back to step 8
File student details (if student details are valid).
If payment is for a new student, go to step 14.
Enter amount paid (if payment is not for a new student), go to step 15.
Enter student details(if payment is for a new student)
Calculations(Calculate fee balance)
File student payments details in the payment file.
If performance is for a new student, then go to step 19.
18.
19.
20.
21.
22.
Enter performance details (if performance is not for a new student), go to step 20
Enter student and performance details (if performance is for a new student).
Calculations(Calculate total, average and grade)
file student performance details in the performance file
Stop
22
23
***The system will provide an option backup to backup data. The backup will be done once in a week, where it
will be saved on a compact disk incase the computer fails to function. This type of backup will allow the user to
restore back the system as per the last time the backup was done.
2.11 Design of a test strategy
i. Logical testing
The system will be tested using the logical operators (And/Or) relating to the data it should accept and
store in its database.
ii. Functional testing
This type of testing will be done to all modules separately to test if it gives out the expected
output/results as per the system design.
iii. System testing
System testing will be done to the system as a whole to test if the proposed system meets users
requirements and its objectives. Module compatibility will also be tested in system testing.
iv. Recovery testing
This type of testing will test how well and fast the system recovers from crashes, hardware failures or other
problems.
v. User acceptance testing
In this type of testing the users will be allowed to use the system for sometime to test if the system meets
his/her requirements. If the users approve the system then the system will be implemented.
2.12 Requirements of the Design phase
Login.Frm
Admission.frm
Performance.frm
Payment.frm
Activities.frm
Admission.dsr
Performance.dsr
Payment.dsr
24
AdoLogin.Visible = False
End Sub
Private Sub cmdOK_Click()
On Error GoTo 41:
'Select a username and password that matches the ones in the textboxes from the database
AdoLogin.RecordSource = "SELECT * FROM Login WHERE UserName='" +
TxtUserName.Text + "'"
AdoLogin.Refresh
If (AdoLogin.Recordset.EOF = False) Then
If (txtPassword.Text = AdoLogin.Recordset.Fields("Password")) Then
MsgBox "Login success", , "Feedback " 'if there is a username and password match
Unload Me
FrmSelectActivity.Show
Else
MsgBox "Invalid Password", , "Feedback " 'if there is no password match
txtPassword = ""
txtPassword.SetFocus
End If
Else
MsgBox "Invalid username", , "Feedback " 'if there is no password match
TxtUserName = ""
txtPassword = ""
TxtUserName.SetFocus
End If
Exit Sub
41:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub cmdCancel_Click()
End
End Sub
3.2 Admission.frm
Private Sub CmdSave_Click()
On Error GoTo 1
'Set text boxes to add data to the fields in the database
AdoView.Recordset.Fields("Adm_No") = TxtAdmNo.Text
AdoView.Recordset.Fields("Surname") = TxtSurname.Text
AdoView.Recordset.Fields("Other_Names") = TxtOther.Text
AdoView.Recordset.Fields("Contacts") = TxtContacts.Text
AdoView.Recordset.Fields("Address") = TxtAddress.Text
AdoView.Recordset.Fields("Stream") = CboStream.Text
AdoView.Recordset.Fields("Form") = CboForm.Text
AdoView.Recordset.Fields("DateofAdmission") = TxtDate.Text
AdoView.Recordset.Update
MsgBox "Record Saved", , "Response"
Exit Sub
1:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub MnuSave_Click()
25
On Error GoTo 2
'Set text boxes to add data to the fields in the database
AdoView.Recordset.Fields("Adm_No") = TxtAdmNo.Text
AdoView.Recordset.Fields("Surname") = TxtSurname.Text
AdoView.Recordset.Fields("Other_Names") = TxtOther.Text
AdoView.Recordset.Fields("Contacts") = TxtContacts.Text
AdoView.Recordset.Fields("Address") = TxtAddress.Text
AdoView.Recordset.Fields("Stream") = CboStream.Text
AdoView.Recordset.Fields("Form") = CboForm.Text
AdoView.Recordset.Fields("DateofAdmission") = TxtDate.Text
AdoView.Recordset.Update
MsgBox "Record Saved", , "Response"
Exit Sub
2:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdNew_Click()
On Error GoTo 3:
'add a new Record to the recordset
AdoView.Recordset.AddNew
TxtAdmNo.SetFocus 'set focus to the Admission Number textbox
TxtAdmNo = "SPR000"
TxtAddress = "P.o.Box"
'Set the default Value of the admission number to SPR000
Exit Sub:
3:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub MnuNew_Click()
On Error GoTo 4:
'add a new Record to the recordset
AdoView.Recordset.AddNew
TxtAdmNo.SetFocus 'set focus to the Admission Number textbox
TxtAdmNo = "SPR000" 'Set the default Value of the admission number to SPR000
Exit Sub
4:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub MnuDelete_Click()
On Error GoTo 5:
'Delete a record from the recordset
With AdoView.Recordset
.Delete
.MoveNext
If .EOF Then
.MovePrevious
If .BOF Then
MsgBox "the record set is empty", , "No records"
End If
End If
End With
Exit Sub
5:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
26
End Sub
Private Sub CmdExit_Click()
'Hide admission Form
Unload Me
'Show the select activiivy Form
FrmSelectActivity.Show
End Sub
Private Sub MnuExit_Click()
'Hide admission Form
Me.Hide
'Show the select activiivy Form
FrmSelectActivity.Show
End Sub
Private Sub CmdExt_Click()
'Hide admission form
Me.Hide
FrmSelectActivity.Show
End Sub
3.3 Payment.frm
Private Sub CmdCalculate_Click()
On Error GoTo 31:
'declaring variables
Dim total As Integer
Dim balance As Integer
Dim paid As Integer
Dim message As String
Dim Form1 As String
Dim term As String
Dim bal1, bal2, bal3, totalFee As Currency
'variable initialization
Form1 = CboForm.Text
term = CboTerm.Text
paid = TxtFeePaid.Text
TxtBal1 = balance
'Calculations
If Form1 = "One" Or Form1 = "Two" Then 'And term = "1" Then
If term = "1" Then
total = 12500
totalFee = total + bal3
balance = total - paid
bal1 = totalFee - paid
TxtTotal.Text = total
TxtBal.Text = balance
TxtBal1.Text = bal1
Else
If term = "2" Then
bal1 = TxtBal.Text
total = 13000
totalFee = total + bal1
27
balance = total - paid
bal2 = totalFee - paid
TxtTotal.Text = total
TxtBal.Text = balance
TxtBal2.Text = bal2
Else
If term = "3" Then
bal2 = TxtBal2.Text
total = 11000
totalFee = total + bal2
balance = total - paid
bal3 = totalFee - paid
TxtTotal.Text = total
TxtBal.Text = balance
TxtBal3.Text = bal3
TxtBal2.Text = 0
Else
MsgBox "Term or Form not valid"
End If
End If
End If
End If
'End If
If Form1 = "Three" Or Form1 = "Four" And term = "1" Then
If term = "1" Then
total = 13500
totalFee = total + bal3
balance = total - paid
bal1 = totalFee - paid
TxtTotal.Text = total
TxtBal.Text = balance
TxtBal1.Text = bal1
Else
If term = "2" Then
bal2 = TxtBal1.Text
total = 14000
totalFee = total + bal1
balance = total - paid
bal2 = totalFee - paid
TxtTotal.Text = total
TxtBal.Text = balance
TxtBal2.Text = bal2
Else
If term = "3" Then
bal2 = TxtBal1.Text
total = 12000
totalFee = total + bal2
balance = total - paid
bal3 = totalFee - paid
TxtTotal.Text = total
TxtBal.Text = balance
TxtBal3.Text = bal3
TxtBal2.Text = 0
Else
MsgBox "Term or Form not valid"
28
End If
End If
End If
End If
Exit Sub
31:
MsgBox "Error #" & Err.Number & vbNewLine & Err.Description, vbCritical, "error"
End Sub
Private Sub CmdExit_Click()
'hide form
FrmPayment.Hide
FrmSelectActivity.Show
End Sub
Private Sub CmdNew_Click()
On Error GoTo 32:
'add new record
AdoPayment.Recordset.AddNew
TxtAdmNo.SetFocus
TxtAdmNo = "SPR000"
TxtBal1.Text = 0
TxtBal2.Text = 0
TxtBal3.Text = 0
Exit Sub
32:
MsgBox "Error #" & Err.Number & vbNewLine & Err.Description, vbCritical, "error"
End Sub
Private Sub CmdSave_Click()
On Error GoTo 33:
'Save New record
AdoPayment.Recordset.Fields("Adm_No") = TxtAdmNo.Text
AdoPayment.Recordset.Fields("Fees_Paid") = TxtFeePaid.Text
AdoPayment.Recordset.Fields("Form") = CboForm.Text
AdoPayment.Recordset.Fields("Date") = TxtDate.Text
AdoPayment.Recordset.Fields("Total") = TxtTotal.Text
AdoPayment.Recordset.Fields("Balance") = TxtBal.Text
AdoPayment.Recordset.Fields("BalTerm1") = TxtBal1.Text
AdoPayment.Recordset.Fields("BalTerm2") = TxtBal2.Text
AdoPayment.Recordset.Fields("BalTerm3") = TxtBal3.Text
AdoPayment.Recordset.Update
MsgBox "Record Saved", , "Response"
Exit Sub
33:
MsgBox "Error #" & Err.Number & vbNewLine & Err.Description, vbCritical, "error"
End Sub
Private Sub MnuSave_Click()
AdoPayment.Recordset.Fields("Adm_No") = TxtAdmNo.Text
AdoPayment.Recordset.Fields("Fees_Paid") = TxtFeePaid.Text
AdoPayment.Recordset.Fields("Form") = CboForm.Text
AdoPayment.Recordset.Fields("Date") = TxtDate.Text
AdoPayment.Recordset.Fields("Total") = TxtTotal.Text
29
AdoPayment.Recordset.Fields("Balance") = TxtBal.Text
AdoPayment.Recordset.Update
End Sub
3.4 Performance.frm
Option Explicit 'general declaration
'Dim term As Integer
'Dim CAT1 As String
'Dim CAT2 As String
'Dim Endterm As Integer
Private Sub CmdMarks_Click()
On Error GoTo 123:
'declaring variables
Dim Marks() As Integer
Dim Counter As Integer
Dim Grade As String
Dim Average As String
Dim message As String
Dim total, TotalAvg As Integer
Dim Form1 As String
Dim exam As String
Dim term As Integer
Dim CAT1 As Integer
Dim CAT2 As Integer
Dim Endterm As Integer
Dim OverallGrade As String
'initialization
total = 0
Form1 = CboForm.Text
'calculations
If Form1 = "One" Or Form1 = "Two" Then
ReDim Marks(11)
For Counter = 1 To 11
Marks(Counter) = InputBox("Enter Marks", "Marks Prompt")
ListMarks.AddItem Marks(Counter)
total = total + Marks(Counter)
TxtTotal.Text = total
Average = total / Counter
TxtAverage.Text = Average
Next
'Assigning grades
If Average <= 25 Then
Grade = "E"
Else
If Average <= 30 Then
Grade = "D-"
Else
If Average <= 35 Then
Grade = "D"
Else
30
If Average <= 40 Then
Grade = "D+"
Else
If Average <= 45 Then
Grade = "C-"
Else
If Average <= 50 Then
Grade = "C"
Else
If Average <= 55 Then
Grade = "C+"
Else
If Average <= 60 Then
Grade = "B-"
Else
If Average <= 65 Then
Grade = "B"
Else
If Average <= 75 Then
Grade = "B+"
Else
If Average <= 85 Then
Grade = "A-"
'Else
'If Average <= 85 Then
Else
Grade = "A"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
'End If
TxtGrade.Text = Grade 'Display grade in a text box
Else
If Form1 = "Three" Or Form1 = "Four" Then
ReDim Marks(7)
For Counter = 1 To 7
Marks(Counter) = InputBox("Enter Marks", "Marks Prompt")
ListMarks.AddItem Marks(Counter)
total = total + Marks(Counter)
TxtTotal = total
TxtTotal = Str(total)
Average = total / Counter
TxtAverage.Text = Average 'Display average in a text box
Next
'Assigning grades
If Average <= 25 Then
Grade = "E"
31
Else
If Average <= 30 Then
Grade = "D-"
Else
If Average <= 35 Then
Grade = "D"
Else
If Average <= 40 Then
Grade = "D+"
Else
If Average <= 45 Then
Grade = "C-"
Else
If Average <= 50 Then
Grade = "C"
Else
If Average <= 55 Then
Grade = "C+"
Else
If Average <= 60 Then
Grade = "B-"
Else
If Average <= 65 Then
Grade = "B"
Else
If Average <= 75 Then
Grade = "B+"
Else
If Average <= 85 Then
Grade = "A-"
'Else
'If Average <= 85 Then
Else
Grade = "A"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
'End If
TxtGrade.Text = Grade 'Display grade in a text box
Else 'if a user enters an invalid form
MsgBox "Invalid form", , "Error"
End If
End If
'calculation to assign overall grade
exam = CboExam.Text 'Get exam name from the combo box
If exam = "CAT1" Then
TxtCat1.Text = Average
32
Else
If exam = "CAT2" Then
TxtCat2.Text = Average
Else
If exam = "Endterm" Then
TxtEnd = Average
'End If
'initialization of variables for overall grade calculation
Endterm = TxtEnd.Text
CAT1 = TxtCat1.Text
CAT2 = TxtCat2.Text
TotalAvg = (CAT1 + CAT2 + Endterm) / 3
'Assigning grades
Text1.Text = TotalAvg
If TotalAvg <= 25 Then
OverallGrade = "E"
Else
If TotalAvg <= 30 Then
OverallGrade = "D-"
Else
If TotalAvg <= 35 Then
OverallGrade = "D"
Else
If TotalAvg <= 40 Then
OverallGrade = "D+"
Else
If TotalAvg <= 45 Then
OverallGrade = "C-"
Else
If TotalAvg <= 50 Then
OverallGrade = "C"
Else
If TotalAvg <= 55 Then
OverallGrade = "C+"
Else
If TotalAvg <= 60 Then
OverallGrade = "B-"
Else
If TotalAvg <= 65 Then
OverallGrade = "B"
Else
If TotalAvg <= 75 Then
OverallGrade = "B+"
Else
If TotalAvg <= 85 Then
OverallGrade = "A-"
Else
'If TotalAvg <= 85 Then
OverallGrade = "A"
End If
End If
End If
End If
End If
33
End If
End If
End If
End If
End If
End If
End If
End If
End If
TxtOverallGrade.Text = OverallGrade
Exit Sub
123:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdNew_Click()
On Error GoTo 121:
'Add a new reord
AdoPerformance.Recordset.AddNew
TxtAdmNo.SetFocus
TxtAdmNo = "SPR000"
TxtCat1.Text = 0
TxtCat2.Text = 0
TxtEnd.Text = 0
Exit Sub
121:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
34
AdoAdm.Visible = False
DtaGridPerf.Visible = False
AdoPerf.Visible = False
DataGridPay.Visible = False
AdoPay.Visible = False
AdoConnect.Visible = False
CmdExitPrint.Visible = False
CmdExitPrintPerf.Visible = False
CmdExitPrintPay.Visible = False
LblUsername.Visible = False
LblPassword.Visible = False
txtPassword.Visible = False
txtUsername.Visible = False
CmdAdd.Visible = False
End Sub
Private Sub CmdSave_Click()
On Error GoTo 11:
'save records
AdoView.Recordset.Fields("Other_Names") = TxtOther.Text
AdoView.Recordset.Fields("Contacts") = TxtContacts.Text
AdoView.Recordset.Fields("Address") = TxtAddress.Text
AdoView.Recordset.Fields("Stream") = CboStream.Text
AdoView.Recordset.Fields("Form") = CboForm.Text
AdoView.Recordset.Fields("DateofAdmission") = TxtDate.Text
AdoView.Recordset.Update
MsgBox "Record Saved", , "Response"
AdoView.Recordset.AddNew
TxtAdmNo.SetFocus
Exit Sub
11:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdAdd_Click()
On Error GoTo 14:
'Add a username in the database
If txtUsername.Text = "" Then
MsgBox "Username must not be null", , "Feedback"
Else
AdoConnect.Recordset.AddNew
AdoConnect.Recordset.Fields("UserName") = txtUsername.Text
AdoConnect.Recordset.Fields("Password") = txtUsername.Text
txtUsername = ""
txtPassword = ""
txtUsername.SetFocus
End If
Exit Sub
14:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdExitPrint_Click()
'Exit Print command
CmdView.Visible = True
CmdEdit.Visible = True
CmdExit.Visible = True
35
AdoAdm.Visible = True
CmdExitPrint.Visible = False
End Sub
Private Sub CmdExitPrintPay_Click()
CmdViewPay.Visible = True
CmdEditPay.Visible = True
CmdExitPay.Visible = True
AdoPay.Visible = True
CmdExitPrintPay.Visible = False
End Sub
Private Sub CmdExitPrintPerf_Click()
CmdViewPerf.Visible = True
CmdEditPerf.Visible = True
CmdExitPerf.Visible = True
AdoPerf.Visible = True
CmdExitPrintPerf.Visible = False
End Sub
Private Sub CmdView_Click()
On Error GoTo 17:
'set Ado control and Data Grid properties
'to true when command view is clicked
DtaGridAdm.Visible = True
AdoAdm.Visible = True
'setting the ado record source
AdoAdm.RecordSource = "select * FROM ADMISSION"
AdoAdm.Refresh
DtaGridAdm.AllowUpdate = False
DtaGridAdm.AllowDelete = False
Exit Sub
17:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdViewPay_Click()
On Error GoTo 20:
DataGridPay.Visible = True
AdoPay.Visible = True
AdoPay.RecordSource = "select * FROM PAYMENT"
AdoPay.Refresh
DataGridPay.AllowUpdate = False
DataGridPay.AllowDelete = False
Exit Sub
20:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdViewPerf_Click()
On Error GoTo 18:
DtaGridAdm.Visible = True
AdoPerf.Visible = True
DtaGridPerf.Visible = True
AdoPerf.RecordSource = "select * FROM PERFORMANCE"
DtaGridPerf.AllowUpdate = True
DtaGridPerf.AllowDelete = False
36
AdoPerf.Refresh
Exit Sub
18:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdExit_Click()
FrmUpdate.Hide
FrmSelectActivity.Show
End Sub
Private Sub CmdEditPerf_Click()
On Error GoTo 19:
DataGridPerf.Visible = True
AdoPerf.Visible = True
AdoPerf.RecordSource = "select * FROM PERFORMANCE"
DataGridPerf.AllowUpdate = True
DataGridPerf.AllowDelete = False
AdoPerf.Refresh
Exit Sub
19:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdExitPerf_Click()
FrmUpdate.Hide
FrmSelectActivity.Show
End Sub
Private Sub CmdEditPay_Click()
On Error GoTo 21:
DataGridPay.Visible = True
AdoPay.RecordSource = "select * FROM PAYMENT"
DataGridPay.AllowUpdate = True
DataGridPay.AllowDelete = False
AdoPay.Refresh
Exit Sub
21:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub CmdExitPay_Click()
FrmUpdate.Hide
FrmSelectActivity.Show
End Sub
Private Sub CmdBackupExit_Click()
FrmUpdate.Hide
FrmSelectActivity.Show
End Sub
Private Sub CmdBackUp_Click()
On Error GoTo 15:
Dim FPath As String
FPath = Environ("windir") & "\system32\ntbackup.exe"
Shell "" & FPath & ""
Exit Sub
15:
37
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Print Error"
End Sub
Private Sub MnuAddusername_Click()
On Error GoTo 12
LblUsername.Visible = True
LblPassword.Visible = True
txtPassword.Visible = True
txtUsername.Visible = True
CmdAdd.Visible = True
AdoConnect.Recordset.AddNew
CmdBackUp.Visible = False
Exit Sub
12:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
Private Sub MnuBackup_Click()
On Error GoTo 15:
AdoConnect.Visible = False
LblUsername.Visible = False
LblPassword.Visible = False
txtPassword.Visible = False
txtUsername.Visible = False
CmdAdd.Visible = False
Dim FPath As String
FPath = Environ("windir") & "\system32\ntbackup.exe"
Shell "" & FPath & ""
Exit Sub
15:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Print Error"
End Sub
Private Sub MnuExit_Click()
FrmUpdate.Hide
FrmSelectActivity.Show
End Sub
Private Sub MnuPrint_Click()
On Error GoTo 13:
'set visibility property to either true or false
'menu for printing
CmdView.Visible = False
CmdEdit.Visible = False
CmdExit.Visible = False
AdoAdm.Visible = False
CmdExitPrint.Visible = True
CmdViewPerf.Visible = False
CmdEditPerf.Visible = False
CmdExitPerf.Visible = False
AdoPerf.Visible = False
CmdExitPrintPerf.Visible = True
CmdViewPay.Visible = False
38
CmdEditPay.Visible = False
CmdExitPay.Visible = False
AdoPay.Visible = False
CmdExitPrintPay.Visible = True
Call PrintForm
Printer.EndDoc
Exit Sub
13:
MsgBox "Error No.""" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
End Sub
3.6 Activities.frm
Private Sub CmdAdd_Click()
FrmSelectActivity.Hide
frmAdd.Show
End Sub
Private Sub CmdExit_Click()
End
End Sub
Private Sub CmdNewStud_Click()
FrmSelectActivity.Hide
FrmAdmission.Show
End Sub
Private Sub CmdPay_Click()
FrmSelectActivity.Hide
FrmPayment.Show
End Sub
Private Sub CmdPerf_Click()
FrmSelectActivity.Hide
FrmPerformance.Show
End Sub
Private Sub CmdPmt_Click()
FrmSelectActivity.Hide
FrmPayment.Show
End Sub
Private Sub CmdReports_Click()
FrmSelectActivity.Hide
frmreportinterface.Show
End Sub
Private Sub CmdUpdate_Click()
FrmSelectActivity.Hide
FrmUpdate.Show
End Sub
Private Sub Form_Activate()
39
'frmLogin.Show vbModal
End Sub
3.7 MDIform.frm
Private Sub CmdReports_Click()
frmreportinterface.Show
End Sub
Private Sub MDIForm_Load()
FrmUpdate.Hide
End Sub
Private Sub MnuAdm_Click()
FrmAdmission.Show
End Sub
Private Sub MnuExit_Click()
End
End Sub
Private Sub MnuPay_Click()
FrmPayment.Show
End Sub
Private Sub MnuPerf_Click()
FrmPerformance.Show
End Sub
Private Sub MnuReports_Click()
frmreportinterface.Show
End Sub
Private Sub MnuUpdate_Click()
FrmUpdate.Show
End Sub
Private Sub Update_Click()
FrmUpdate.Show
End Sub
40
4.1.2 Admission.frm
Shows personal data entered for a new student during admission.
4.1.3 Payment.frm
41
4.1.4 Performance.frm
4.1.5 Update.frm
4.1.5.1 View and edit admission records
Shows data in form of a table when the user want to view or edit the admission records
42
43
4.1.6 Activities.frm
44
4.1.7 Admission.rpt
45
4.1.7 Payment.rpt
46
4.1.8 Performance.rpt
47
5. USER MANUAL
5.1. INSTALLATION
Insert the compact disk that contains the program Open the folder, locate setup.exe and follow the
wizard.
1. User Manual
1.1Admission
1. Click home from the bar below the menu bar
2. Enter admission number. Increment it by one depending on the previous record. e.g if the
previous admission number is SPR0001,you should increment this by one and enter the
new admission number as SPR0002
3. Select Add new from the form or select from the file menu.
4. Fill in all the details in the form. All textboxes should contain relevant information. E.g. the
address field should contain data In this format .P.o Box 12, Nairobi.
5. Select form and term from the listed in the drop down menu.
48
6. Click save to add new students records to the database. If you enter data that is invalid
you will receive n error message. Check each values status else you will receive message
Record saved.
7. Click a
8. Add if you have another student details to record
9. Click exit if there is no other admission to be entered
NB: All textboxes should contain data. If a text box is empty you will receive an error requesting
you to check each status value.
5.2 RECORDING A PAYMENT
1. Click home from the bar below the menu bar or select payment form from the edit menu.
2. Select payment from the form or select from the edit menu.
3. If you are recording a new students payment click new. Enter the admission number ,term,
form date and amount paid
4. Click calculate to calculate the fee balance.
5. If the student is not new, enter term, form and fee paid.
6. Click save to update the record otherwise the records will not be saved. If the record is
successfully saved you will receive a message Record saved
NB: Navigate through the records using the diagram below the new save and exit buttons.
Moves record to next,
moves record to previous,
moves to the first record and
Moves to the last record.
5.3 RECORDING A PERFORMANCE
1. Click home from the bar below the menu bar or select performance form from the edit
menu.
2. Select performance from the form or select from the edit menu, or from the bar under the
menu bar
3. If performance is for a new student click new, enter Admission number, Exam, term and
form.
4. Click enter marks and enter the marks according to the prompt message
5. The total, average and grade will appear after entering the marks.
6. Click save.
7. Click save to update the record otherwise the records will not be saved. If the record is
successfully saved you will receive a message Record saved
8. If performance is not for a new student, navigate through the records until you reach the
records of the student you want to record performance for. Enter form, term then click enter
marks.
9. Click save.
49
NB: All exam scores are recorded as average
5.4 UPDATING RECORDS
1. Click update from the bar below the menu bar or click home then select update.
2. There are 4 tabs on the update form admission, payment performance and backup.
3. There are three buttons on each tab. View for viewing record s only, edit for changing records
and exit to exit the update form
4. Records are presented in a table format.
5. if you wish to print the form select print from the file menu.
5.5 Adding A Username
1. From the update form, select backup
2. Click add username from the edit menu
3. Enter username
4. And password in the text boxes then click add button
5.6 CREATING REPORTS
1. Select reports from the bar below the menu bar
2. Select the report you want to create
3. You can print the report using the printer icon on the top left hand corner.
4. Close the report
5.7 CREATING BACK UP/RESTORING FILES
Backup
1. From the update form select backup on the tab
2. A Wizard will appear on the screen
3. Follow the wizard. If you are backing data
Select backup files and settings, next.
Select let me choose what to backup next.
Locate the student information system, then tick it on it
Click browse to select the compact disk.
RESTORE
From the compact disk open the file you had last saved. Follow the wizard
50
6. APPENDICES
6.1. INTERVIEW QUESTIONS AND QUESTIONNAIRE
6. 1.1 Interview Questions
6.1.1.1. Interview Questions the school Principal
1.
2.
3.
4.
5.
6.
7.
Do you think that the proposed system will meet all your expectations?
What output would you want the system to produce?
Will you be reviewing the students records? If yes how often?
Have you ever tried to computerize your manual system before?
Do you have any computer skills?
How often would you want the proposed system to create backups?
When do you want to change from the manual system to a computerized system?
How long does it take to record a payment made by one student using the current system?
Do you think that the proposed system will minimize errors in your records?
What attributes would you like to be used in the payments records?
Do you have any computer skills?
Interview Questions the school Secretary
1. Do you think that the proposed system will minimize paper work in your office?
2. If security is to be incorporated in the proposed system, do you think that it will
improve the level of confidentiality in your records?
3. What attributes would you like to be used in the admission and performance
records?
4. What reports would you like the proposed system to produce?
5. Do you have any computer skills?
6.2 Questionnaire
Introduction
This document will be used to capture your views and comments regarding the proposed
system. It also gives out a clear view of the requirements that are needed for the development
of your schools computerized system.
Please make sure you answer all the questions and forward the filled document to me.
1. What features would you like to be incorporated in the proposed system?
2. How can you describe the current systems effectiveness and efficiency of students records?
51
3. What output would you want the system to produce?
4. Do you think that the proposed system will meet all your expectations?
Yes
No
5. How often would you like to create backups for your records?
6. Mention the attributes you would like to use in the system.
7. List down the reasons for changing from a manual system to a computerized system.