57
Selection, Investigation and Analysis ORGANISATION BACKGROUND Spurwings Island is a hotel that accommodates people around the world. It is located in the midst of Lake Kariba. Its headquarters is in Namibia and it was later introduced in Zimbabwe in 2006. The hotel has been using a manual system of telephone and paper for booking rooms. A lot of paper is used and it is getting expensive to buy the necessary stationary. Processing and searching of a single person’s details may take up to 20 minutes as there are a lot of paper flows which is time consuming. When information is lost or damaged the clerk faces some difficulties of recollecting the information as there are no back up facilities provided by the system.The employees are increasing in number as a lot of paperwork has to be done. The profit of the hotel is turning into loss.

Spurwings Hotel Final

Embed Size (px)

Citation preview

Selection, Investigation and Analysis

ORGANISATION BACKGROUND Spurwings Island is a hotel that accommodates people around the world. It is located in the midst of Lake Kariba. Its headquarters is in Namibia and it was later introduced in Zimbabwe in 2006. The hotel has been using a manual system of telephone and paper for booking rooms. A lot of paper is used and it is getting expensive to buy the necessary stationary. Processing and searching of a single person’s details may take up to 20 minutes as there are a lot of paper flows which is time consuming. When information is lost or damaged the clerk faces some difficulties of recollecting the information as there are no back up facilities provided by the system.The employees are increasing in number as a lot of paperwork has to be done. The profit of the hotel is turning into loss.

ORGANISATION CHART

Description of the current system

When a customer wants to book a room, the clerk first checks to see if there are free rooms. If there are free rooms he then enters the required customer’s records in the customer form required by the process. After that he updates the room file and also updates the customer file. Afterwards calculations are made and then the customer will be given a room number and keys and the customer record added to other records.

Data flow diagram

The following diagram can be used to fully understand the system described above. The following symbols are used in data flow diagrams.

Symbol MeaningThis is a data source or data destination

This is a data store such as a file held on disk or batch of documents

This represents an operation performed on the data i.e. process

This represents movement between entities , processes or data stores

Data flow diagram :

Investigation of the Current System

This process of gathering information is the most vital stage which brings full understanding of the system and the knowledge of the requirements needed for the system development process.If the areas that require development are identified it would be easier for the systems analyst to design the new system. The investigation will be done in stages and the following techniques are going to be used:

I nterview Questionnaires Record Inspection Observation

Interview

This process allows face to face communication with the employees and the employers to find out which area really needs development. These are done to collect information that is relevant and that may help the analyst. The responses that were obtained were noted down

Chief Executive OfficerThe CEO pointed out that he is losing customers due to the corruption or the loss of data.He also pointed out that the manual system is draining their profit due to errors in calculating or even entering the data.

Clerk 1He also pointed out that the work is tiresome. He also said that the work load increases everyday and he often misses breaks because of a huge workload.

Clerk 2This one complained about how a lot of paper in the office causes congestion in the bookings. He also stated thatinformation is often lost and also a lot of miscalculations have been made leading to very serious errors.

CustomerThe customer complained about how it would take about 30 minutes to book a single room. He also said that it was tiresome spending a lot of time in queues.\

Advantages of interviews

The analyst can ask for clarification on some points that may not be clear.Encourages good report between the researcher and respondent.

Nonverbal gestures like facial expressions can help the researcher to determine if the respondent is telling the truth

Information can be collected even from the illiterate since the respondent’s language could be used

First-hand information is collected The researcher can probe to get more information

Disadvantages of interviews

It is expensive since the researcher has to travel to the interview venue It is time consuming as more time is spent travelling and carrying out the interview Good interview techniques are required as failure may lead to disappointments

Biased information can be given since the respondent may not tell the truth

Questionnaires

These are documents with carefully crafted questions to be answered by the respondent by filling on the spaces provided. These are to be passed to the CEO, the clerks and to some of the customers. A questionnaire contains gap filling questions where the respondent is required to express his/her own feelings and guided questions where the respondent just chooses Yes or No, True or False or just by putting a tick on given options.

Advantages

They provide quick responses as they are answered quickly Questionnaires are relatively cheap means of gathering data from a large number of

people. Responses can be tabulated and analyzed and were also used so as to ascertain that any

problems with the system are identified and addressed in follow up interviews. Useful when the same information is required from all respondents Suitable when number of respondents is large

Disadvantages

Good questionnaires are difficult and time consuming to design They are restricted to Yes/No therefore one cannot probe to ask further Not all questions are answered The person can misinterpret questions leading to wrong answers very difficult to find

skilled

Observation

At this stage the analyst was able to view the actual sytem in operation. The researcher can even take part in operating the system. It is used when the researcher wants to see for herself how the system operates. The following observations were made:

It is a long process to book a room for a single person It is also a long process to calculate the total money needed People were crowding in the hotel making very long queues Customers were getting impatient and a lot gave up

Advantages of observation

First hand information is collected

Accurate information can be obtained Areas of interest can be observed The researcher can take part in operating the system thereby getting the insight on how

the system operates

Disadvantages of observation

People work differently if they feel that they are being observed, therefore inaccurate information can be collected

The researcher may not understand some of the activities being observed It is time consuming to collect the required information The researcher may interrupt some of the activities being done

Record Inspection

In this method the analyst will be scrutinizing system documents in order to solicit information. The following information was gathered during and after the process:

It was figured out that there were many records to be filled by each person It was also figured out that there were many fields to fill at each record Also a lot of records were duplicated

Advantages of record inspection

Accurate information is collected from system records Shows how data is collected within the system Shows the exact data that is collected Shows information that must be produced by the system First hand information is obtained Gives a good idea of the ways things are actually done rather than how they are supposed

to be done

Disadvantages of record inspection

It is time consuming to go through all system records Manual files can be tiresome to go through and some of the data may be illegible Confidential files are not given to the researcher Documentation may be difficult for an outsider to understand Some records may be relevant Problems with the current system

Through the investigation the systems analyst was able to identify the main problems:

Time ConsumingIt is very time consuming to book a single room for the customers. It is also time consuming to search for a single record to update it or maintain it

InsecuritySince the files are stored in cupboards they are prone to being attacked by rats or little insects hence information is easily damaged hence lost. Also a clerk might spill juice on a record hence biasing it

ErrorsMiscalculations are a major problem to the hotel since a lot of calculations have to be made on the cash received. Also there are errors in entering data and this can cause serious problems

No backupsData is often lost due to the flooding of files in the office. It is quite impossible to acquire the same data again since no back up data has been acquired.

Aims and objectives of the new system

The aims and objectives of this project are as follows

Improved Performance It provides an automated registration of customers thus storing information on the system

rather than using bulk files It obtains greater speed and accuracy in handling data and generating reports It automatically calculates all the bills and delivers all the issues and notifications for the

customers who are against some rules This system also attach to the system of the accounts clerk and other departments so that

they can access the information of a particular customer

Reduced costs The costs used in buying the necessary equipment from time to time will be low

compared to when stationary like papers and pens were used

Security Information stored will be secure and safe since the computer will make use of log in

forms. This will ensure that the information has limited access hence less prone to viruses or miscellaneous damages

Less time consuming Since the system will be computerized it is expected to be fast in entering, processing and

making out reservations

Data integrity Data will be correct and accurate since validation processes are held. The correctness and

accuracy of data is important since calculations have to be exact and correct also.

Provision of backup facilities The system will provide backups in case of disaster occurrence. Information in the

computer might get lost due to fires or drive failure so the proposed system is supposed to make periodic copies of the information for safety reasons

FEASIBILITY STUDYThis is a preliminary investigation the analyst conducted to find out if there is a need for a new system. It involves evaluation of systems requests from users and to determine if it is feasible to construct a new one. Feasibility study can be divided into two main categories :

a) Technical Feasibilityb) Economic Feasibility

Technical feasibility

This determines if the organization can obtain equipment and personnel to develop, install and operate the system. It also focuses on the software and hardware required to start the new system. The organization proved to have the necessary equipment to hire and start the new system

Hardware and software requirements

The organization currently has no computer at all. The system is going to be upgraded from start point. The items required are illustrated below

Hardware Items RequiredDesktop Computers 2Printers 2

Software Items RequiredOperating System 1Antivirus 1Programming Language 1Microsoft Office Package 1

Personnel Required

Programmers 2Operators 2

Specific hardware and software requirements

Hardware Requirements

Storage memory 200GB Local hard DiskThis will be used to store large number of records for future use and an external hard drive would be needed to back up the information

Laser Jet PrinterThis will be required for printing receipts to customers after booking a room. This is reliable as it saves stationary costs and also prints as many pages as possible per unit time

Installed memory (Random access Memory), 4GB This is required to temporarily store the records that the receptionist is currently working on

ProcessorSuch a high processor will be required to perform processors such as updating records from a file of say 1600 records and also searching a record of a particular customer

3 Cable Connectors RJ45,8pot hub,6 network cablesThese will be used to set up a network such that there will be communication between the reception and other hotel branches

Software requirements

Microsoft Office 2010 Professional PackageThis will be used for the documentation of the system using Microsoft word and also storing database of records using Microsoft Access

Windows 7 Ultimate Operating systemThis is the most reliable operating system that will fit to the available hardware and development software and also has got some facilities that will make the system understandable and user friendly. The operating system would be 128-bit which allows RAM with large storage capacity(4GB)

Microsoft Visual Basic 6.0This is the programming language that will be used to code program

Smadav 2015 Anti-Virus SoftwareThis is used for scanning as well as cleaning viruses found in attachments

Economic Feasibility

This is a cost-benefit analysis carried out to determine whether the benefits of the new system will outweigh the estimated cost in developing, purchasing, installing and maintenance of the new system.

A table can be designed to compare an estimate of the costs of the old system and the new system over the years and determine whether the benefits of the new system will outweigh the old system :

From the table above it is clear that the new system is better and more profiting than the old system as years go by. The new system might have used a lot of money in the first year but as years go by the costs are decreasing hence increasing profit to the company.

Alternative solutions

I. Off-the-shelf- This is software that is bought from a software vendor and is written with no

specifications

Advantages- It is generally a less expensive solution as the cost of developing the software is

shared across a wider customer base- It is possible to speak to other users of the package for their evaluation before

spending money- The software can be bought and installed right away- The software is tried and tested and likely to contain fewer bugs than the newly

written software

Disadvantages

- The software can be highly complex and will usually include large sections that you will never use

- It tends to be a compromise. By it's nature it is designed for many different types of users, each of whom will have different requirements

- As the software tends to be large and complicated it may take a long time to learn properly (some of the most asked for additions to later versions of Word were ones that already existed in the previous version!)

- You may have to alter the way that you work in order to fit in with the way that the software has been designed

- There will probably be operations that you require that you simply cannot do with the software

- If you have problems you are usually at the mercy of a large and faceless organization who may not be quite as concerned as you are if you have a major problem that absolutely must be fixed before tomorrow morning!

II. Tailor made software(Bespoke) This is software that is written to the specification of a particular organization or

customer

Advantages- It is designed to do exactly what the user wants- It has no unwanted features - It can be written to run on specified hardware- It can be integrated with existing software- There may not be a suitable software package of the market

Disadvantages- If you do not have the source code you are dangerously exposed and are

wholly dependent upon the developer's continuing existence and good will. - If you pick the wrong developer you could end up with an application that is

unstable, unreliable and full of bugs.- The investment required will usually be much higher than with packaged

software. This is usually the biggest reason for not going down the custom route - you need to undertake a business justification exercise and compare the costs against the expected benefits and commercial advantages.

- A large investment in time is required during the development process and a bespoke application will take longer to implement.

- It can be difficult to get support for bespoke software, unless the developers themselves offer support services.

III. Increasing workforce

More workforce can be employed so that the workload of the employees will be reduced. Receptionists should be increased since they are the ones who do most of the data capturing. Accountants should also be increased as they are also the ones who do most of the operations and also to calculate separate bills

Advantages

- Workload is reduced - Becomes more efficiency- Moral can be improved- Reduces the time used by the student standing in long congested queues

Disadvantages

- more labor expenses are incurred- Confusion can arise due to many workers doing the same job.

After considering all the methods mentioned above the analyst chooses Tailor made ( Bespoke Software) because it is reliable and the organization has the required equipment to use it

Log In

User Name

Password

LOG IN EXIT

DesignOverall PlanInput Design

Login Form

A log in form allows users to enter their usernames and password to get the data stored in the computer. It increases the security of the information since as few people are granted access to the information

Main Menu

Register a room

Customers Registered

Register acustomer

Book a room Add a new user

Booked Rooms

Update a room

Main menu Form

The main menu form allows easy access to other forms like Room Registration Form, Customer Registration Form and Booking Form. It is designed specifically to make it easy to access other forms making it fast to capture data on customers, register a room or book a room.

Room Registration

Room Number

Room Price

Room Type

ENTER

Room Registration Form

This is a form designed to make it easy to register a room and capture data such as the room number, room type and the price. It also helps to check if the room is booked or not

Address

PhoneNumber

CustomerName

CustomerID

Customer Registration

Register

Customer Registration Form

This is designed specifically to capture customer details and enter them into the system. It is also designed to get information about a customer from the system.

Booking Form

The booking form is designed to display information about a single customer. When a name in the list is clicked data about that person (i.e. CustomerId, Room Number, Date Booked, Date Left, number of days that customer stayed) is displayed in the respective textboxes

File DesignThis is a design carried out to describe the type of data stored or entered in the database. The following tables can be drawn to illustrate the latter further

Log In FormThis table contains users’ names and passwords, they restrict access to unauthorized users

Field Name Data Type Length Example DataUserName Text 15 Melissa MPassword Text 8 tasha@mimie

Customer FormThis captures the customers details as soon as one wants to book a room.Field Name Data Type Length Example DataCustomerID Text 3 chars 01ACustomerName Text 15 chars MimiePhoneNumber Text 10 chars 077958185Address Text 25 chars 112 Elm street

Rooms FormThis form contains the rooms with their respective room numbers, type , price and also the status of the room

Booking FormThis form enables customers to book a room by entering the required detailsField Name Data Type Length Example DataRoomNumber Text 3 chars 301NumberOfDays Text 2 chars 15DateBooked Date/Time 10 chars 02/05/2015DateLeft Date/Time 10 chars 17/15/2015CustomerId Text 3 chars 01A

Output Design

Field Name Data Type Length Example DataRoomNumber Text 3 chars 301RoomType Text 12 chars BungalowRoomPrice Text 10 chars $300Status Yes/No 2 chars No

Spurwings Hotel

List of rooms that have been booked

Room PriceRoom Number Room Type

This is the design of output forms.

Booked Rooms

This is a design of a summary of rooms that have been booked over a certain period of time. The design is as follows:

Available Rooms

Spurwings Hotel

List of available rooms

Room Number Room PriceRoom Type

This is a report designed to give a summary on rooms that are available for booking, those that have not been occupied yet. What we wish the form to be is a s follows:

Spurwings Hotel

List of registered customers

CustomerId AddressPhone NumberCustomer Name

Registered Customers

This is a summary of customers who are registered in our system. These are customers who once booked a room on our hotel. The design will be as follows :

TESTINGWhen a new system is developed, it has to undergo rigorous testing before it is released. Typically it may undergo several phases of testing including:

Dry run testing: the programmer follows through the code manually using test data to check that an algorithm is correct. The technique is useful for locating run time errors, it would normally be carried out on a part of a program rather than the whole program

Unit testing: this refers to the testing of each individual subroutine or module in a suite of programs

Integration testing: this involves testing a complete suite of programs to ensure that they all function correctly when they are put together, for example being called from a menu

Tables will be designed to show how the computer reacts to entered test data i.e. normal, abnormal and extreme data.

Test for normal dataThis is testing for data that should be accepted by the system. The system must accept the data and continue running. Failure to do so means the system has an error.Form being Tested Field Tested Entered Values Expected outcomesLog In UserName 8 – 10 characters Accepts and logs in the userCustomerRegistration CustomerId 15 Characters Accepts and adds the customerRoomRegistration RoomNumber 3 characters Accepts and adds the room

Test for abnormal dataThis is testing for data that should not be accepted by the system. The system must display a message to show that the data is not acceptedForm being tested Field tested Entered values Expected outcomesBookingForm NumberOfDays Alphabetic characters Data rejected, enter

numeric charactersCustomerRegistration CustomerName Numeric characters Data rejected, enter

alphabetic charactersRoomRegistration RoomType Alphanumeric

charactersData rejected, enter alphabetic characters

Test for extreme data.This is testing for data that is either maximum or minimum to see how the system reacts to the input data

Form being tested Field being tested Entered data Expected outcomesLog in Password 0 characters Data rejectedUserRegistration UserName 50 characters Data rejectedCustomerRegistration Address 0 characters Data rejected

User ManualThis user manual contains all essential information for the user to make full use of the information system. This manual includes installation procedures, description of the system functions capabilities and step-by-step procedures for system access and use.

Installation

The system will be stored in a disk, to install one has to open the disk first and then install.

The following procedure is used to install the system:

Click Start Click My Computer Open Disk Drive D Click on Visual Basic and then follow the procedures that follow

After doing this the program is ready to run.

How to run the system

The system contains forms and modules. When one opens Visual Basic a log in form will appear. One has to enter correct user name and password to gain access. The form will be as below:

If no username or password is entered then a message box such as below will appear

If one enters a wrong username or password the following message box will appear:

One will not gain access to the system unless the correct username and password is entered. If a correct username and password is entered a message box will appear and the user will be logged on to the system.

Once one has successfully logged on to the system a main menu form will appear.

Main Menu

This is a form designed to give users an easy navigation through many forms on the system. One just has to click on the category of choice to access a certain form for example is one wants to register a room one has to point the mouse on category rooms and the form register rooms will appear. The main menu form will be as below:

To quit the Main Menu form one just has to click . To access the reports stored one has to click on the “Reports” on the top left corner of the form.

Book a Room

This is a form that is designed to make reservations. It will be as below:

For one to successfully book a room the user has to double click to select a room from a list of rooms available. The room number will be automatically on the space provided. After selecting the rooms the user has to enter the number of days the customer would want to stay and also has to enter the CustomerId on the space provided and press the button “Enter” on the keyboard so that the customer name will be shown. The user also has to select the current date. After all this the user will be ready to book a room. Pressing “Book Room” will first show two message boxes. The first one will be for confirmation as shown below:

If one clicks Yes the room will be booked and the following message box will be shown

If however a no customer Id is entered then the following message box will be shown:

The form will not run unless a customer is entered. If a wrong customer Id is entered the following message box is shown:

To quit the form one has to click Return to Main Menu.

Register a room

There are times when a new room has to be registered in the system. When one wants to register a room, the following form will be used:

The user has to enter the room number, room type and room price of the room. Once entered one has to click enter. Click enter will show two message boxes. The first one will be for confirmation:

Clicking Yes will register the room and also show the following message box:

If however no details are entered then the following message box will be shown:

To quit the system one has to click Return to Main Menu.

Update Rooms

There are also times when the authorities to change certain things about the room. When a user wants to update a room the following form is used:

To update a room one has to type in the room number and press the keyboard button enter. When pressed the room type and room price will be automatically shown. The user then changes what he/she wants to change for example when maybe a user wants to change the room price, the user just has to erase the current room price, enter the new one and click update. Once this is done two message boxes will be hsown. One will be for confirmation as shown below:

If the user clicks “Yes” then the room will be updated and the user is notified that the room is updated by the following message box

If however a wrong room number is entered and the user clicks Update then the following message box will be shown:

If no details are entered at all and one clicks Update then the following message box is shown:

.

Clicking Next Room will clear the details of the current room and allow the user to enter a new room. To return to main menu one has to click the Return To Main Menu button on the screen.

Delete a room

This is a form used when a room is no longer in use or has to be deleted. This may occur when a room is no longer able to accommodate people due to understandable circumstances. When this occurs the following form is to be used:

For the user to delete a room the user has to double click the room of choice. Once the room has been selected the room number will appear on the textbox. Clicking Delete Rooms will show a message box first:

If the user clicks “Yes” then the room will be deleted and a message box to announce this will be shown as below:

If no room is selected and the user clicks Delete Room then the following message box will be shown:

To return to main menu the user has to click the button “Return To Main Menu”

Register a customer

When a customer wants to book a room his/her details has to be captured first i.e. the customer has to be registered first. To do this the following form is used:

For the user to register the customer the user has to enter the details of the customers stated on the form and click register. If all details are entered and the user clicks register then the following message box will be shown:

If the user clicks Yes the customer will be registered and the following message box will be shown:

If no or only some of the details are entered then the following message box will be shown:

Update a customer

A customer may change his/her telephone number while still on a reservation and this means that the stored number is old and the customer details need to be updated. For the user to do this the user has to use the following form:

To update a customer the user has to enter the customer id and keyboard press enter. Once pressed all the details of the customer will be shown. The user is then able to change the phone number or address of the customer and has to click update for the changes to be effective. Clicking update customer will show two message boxes. The first onw will be for confirmation :

If the user clicks “Yes” then the customer would have been updated and a message box to notify this will be shown:

If a wrong customer id is entered and the user presses “enter” the program will not run rather it will show a message box such as below:

To clear the values of the current customer and update the next customer the user has to click “Next Customer”

Delete a customer.

When a customer is no longer needed in the system for example when the reservation period has ended and the user needs to delete that customer from the system then a form like this has to be used:

The user has to double click on the customer of choice and the customer id will automatically appear on the textbox. The user then has to click delete. Clicking delete will show the following message box:

If the user clicks “Yes” then the customer will be deleted and the following message box will appear:

To quit the form the user has to click the Return to main menu button.

Add a new user

When a new user is recruited the user has to be added to the system. The following form is used to add a new user:

The user has to enter the user name and password of the new user and click add user.once clicked the following message box will be shown:

If the user clicks “Yes” then the user will be added and the following message box will be shown:

.

Booking Report

There are times when profits need to be calculated or the manager needs the summary of bookings that have happened say during the whole month. The manager can have this information by form of a report. To access it the user has to click Bookings and then click Booking report. Once this has been done a report such as below will be shown:

The manager can then do what he wants with the information.

Users Registered.

A report is also compiled for the users that have been registered in the system. To access this the user has to click on Reports on the menu bar and then click Users Registered. Once clicked a report such as below will be shown:

The list of the registered users and their passwords will be clear as shown on the form above.

Booked Rooms

This is a report compiled to give a summary of the rooms that have been reserved/booked. To access it the user has to click on Reports and then Booked rooms. Once clicked a report such as the following will be shown:

To exit the user shas to click the exit button

Available rooms

This is a report compiled to give a summary of available rooms i.e. rooms that have not yet been booked. It shows the room number, type and price. To access it the user has to click Reports on the menu bar and then click available rooms. Once clicked a report such as the following will be shown :

To exit the user has to click on the exit button.

Customers registered.

This is a report designed to give a summary on the customers that have been registered in our system. It shows the details that were obtained on registration. To access it one has to click on reports on the menu bar and then click customers registered. Once clicked the following report will be shown:

Technical DocumentationThis is a manual for programmers which aid them in modifying the system and in correcting errors. The following are found in technical documentation:

Hardware and Software requirements Algorithms of the program System flowcharts Program code and listings

Hardware Requirements Desktop Computers Printers Speakers

Software Requirements Operating System Programming Language (Visual basic 6.0) Anti-virus Microsoft Office Package

System and Program FlowchartsSystem flowcharts are a way of displaying how data flows in a system and how decisions aremade to control events. To illustrate this, symbols are used. They are connected together to showwhat happens to data and where it goes. The following symbols are used in designing a

flowchart:

Symbol MeaningQuestions with decisions (Yes or No)

Process (something that happens)

Input or output

Data Flow (Direction of data flow)

System FlowchartThis is a flowchart designed to show how data runs in the whole system.

Log In flowchart

PseudocodeStartEnter Username and passwordIf username and password valid ThenLog in user ElsePrint “enter correct username and password”Stop code from running furtherEnd if End Program

Room Registration Flowchart and Pseudocode

Flowchart PseudocodeStartEnter Room number, type and priceIf room is already registered ThenPrint: Room already registeredStop code from running furtherElseRegister room End if

Customer Update

Flowchart:

Pseudocode:

Start

Enter Customer Id

Check Validity

If Customer id is invalid Then

Stop code from running further

Else continue running

Display details of customer Id

Accept changes

End

Program code and listings

This is the compilation of cods which are explained for the programmer to understand.

Log in Form

Private Sub cmdlogin_Click ()The below code is for checking for input to the system. If there is no input then a message box will be shownIf txtusername = "" Or txtpassword = "" Then MsgBox "Enter Username and Password", vbCritical Exit SubEnd IfThe below lines are for declaring the connection and record setDim cn As New ADODB.ConnectionDim rs As New ADODB.RecordsetThe below code is for connecting the form to database being usedcn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Spurwings Hotel\Room Bookings Spurwings.mdb;Persist Security Info=False"The below lines of code are for searching for the record since we are trying to log in someone stored in the systems databasers.Open "select * from Users where UserName = '" & txtusername.Text & "' and Password = '" & txtpassword.Text & "' ", cn, adOpenKeyset, adLockOptimisticThe below final lines are for checking to see if we find anything and for notifying the user that the user has been successfully logged on to the systemIf rs.EOF Then MsgBox "Invalid Login", vbCriticalElseMsgBox "Login Successful"Unload MeMainMenu.ShowEnd IfEnd Sub

Customer registrationPrivate Sub Command1_Click()The below code is for checking for input to the system. If there is no input then a message box will be shownIf txtcustomerid.Text = "" Or txtcustomername.Text = "" Or txtphonenumber.Text = "" Or txtaddress.Text = "" ThenMsgBox "Enter all details", vbCriticalExit SubEnd IfThe following lines of code are for asking for confirmation aIf MsgBox("Are you sure you want to add this customer", vbYesNo + vbQuestion) = vbYes ThenThe following lines of code are for connecting to database and adding the values contained in the textboxes into a table in database con rs.Open "INSERT INTO Customers(CustomerID,CustomerName,PhoneNumber,Address) VALUES ('" & txtcustomerid.Text & "','" & txtcustomername.Text & "','" & txtphonenumber.Text & "','" & txtaddress.Text & "')", cn MsgBox "The customer has been added" clear End IfEnd SubPublic Sub clear()The following code is for clearing the text boxestxtcustomerid.Text = ""txtcustomername.Text = ""txtphonenumber.Text = ""txtaddress.Text = ""End Sub

Booking FormBelow is part of the booking form code. It is going to be explained in detailThe below lines of code are for dispaying a confirmation message boxIf MsgBox("Are you sure you want to book this room?", vbYesNo + vbQuestion) = vbYes ThenThe following code is for connecting to the database and incrementing the date by the number of days entered into the text box condateleft = DTPicker1.Value + CInt(txtnumberofdays.Text) txtdateleft = dateleftThe following is a statement which inserts the values entered into the textboxes into the database mentioned.

rs.Open "INSERT INTO Bookings(RoomNumber,NumberOfDays,DateBooked,DateLeft,CustomerID) values('" & txtroomnumber.Text & "','" & CInt(txtnumberofdays.Text) & "','" & DTPicker1.Value & "','" & txtdateleft.Text & "','" & txtcustomerid.Text & "')", cnThe following is for setting the status true for rooms that have been booked rs.Open "UPDATE Rooms SET status =true WHERE RoomNumber='" & txtroomnumber.Text & "'", cnThe following is for displaying a message box which notifies the user that the room has been booked MsgBox "Room booked succesfully" & vbCrLf & "You should leave the room on" & Format(dateleft, "dd/mm/yy") & "", vbInformationThe following is for clearing the text boxes and other spaces for allowing new data to be added txtnumberofdays = "" txtroomnumber.Text = "" txtcustomerid.Text = "" Label6.Caption = "" txtdateleft.Text = "" populateEnd If