You are on page 1of 19

Project-Report

PAT001-2 (Assignement 1)

Assignment 1: Control an Elevator - A C# Project

Object-Oriented Programming and Software Engineering

Submitted by: Anup Upadhaya

Submitted to: University of Bedfordshire

Bsc CS & SE (Level – 5)


Patan College for Professional Studies

0
Contents
ACKNOELEDGEMENT...............................................................................................................2
1. Introduction............................................................................................................................3
2. Statement of Problem.................................................................................................................3
3. Objectives...................................................................................................................................3
4. Aim.............................................................................................................................................3
5. Hardware and Software Requirement.........................................................................................4
6. System Design.............................................................................................................................4
6.1 Use Case Diagram.....................................................................................................................5
6.2 Class Diagram...........................................................................................................................6
6.3. Activity Diagram.....................................................................................................................7
7. Implementation..........................................................................................................................8
7.1) GUI...........................................................................................................................................8
7.2) Database Connection.............................................................................................................12
7.3 Delagation and TImers............................................................................................................13
7.4) Optimizing in Program...........................................................................................................15
7.5) Exception Handling................................................................................................................16
8) Marking Matrix with Self-Assessment......................................................................................17
9. Conclusion................................................................................................................................18
10. Bibliography............................................................................................................................18

1
ACKNOELEDGEMENT
I am so grateful to all those help from our teacher to complete this project. Covid time is
so much different than usual time so to get good support for this project from the tutor is so
nice and the support plays a vital role to complete this project. I would like to thank my subject
teacher Mr. RN Thakur for his great support in this crucial time. Furthermore, I would like to
acknowledge the support staff of Patan College for Professional studies for completing this
project. I would also like to thanks our friends who help me to solve various problems in various
phases.

2
1. Introduction
The main aim of this project is to make the daily life easy. This modern era is advancing so fast
so in order to making the life easy this will be one of the best way to manage the elevator system.
Population is increasing day by day and the crowd of people in tall building likes malls, shopping
center, hospital etc. are increasing so to manage all those things such system will help so much.
This will be just dummy system which work in two floor and people can go either ground or first
floor. There will be emergency button when some casualties occurs.

2. Statement of Problem
As modern era is increasing people are trying to live their life in more easy way with the help of
technology. People don’t have so much time to deal with simple problem, they required some
technology to handle such problem which can solve problem in short period of time. Many
elevators system is already designed but there are some problems which need to overcome like
fetching data in database, emergency bells etc. The OOP’s concept is also missing in those
elevators system. The main thing of such elevator system is protection, security and privacy to
maintain. Looking toward all those facts, we have to solve those problem to make the elevator
system more advance and secure. Control of elevator through own mobile, connection of sensor
in lifts will make the elevator system more advance and better in this technology era.

3. Objectives
The main objective of this system is:

 Making the elevator system of malls, hospital and tall buildings easy and secure.
 To make the elevator system easy for disabled people.
 To make the using of elevator system easy and more realistic.
 Making the elevator crowd free with time allocation system.
 Making secure environment for organization for their privacy and security
 To make elevator moving through two floors.
 To show the record and movement of elevator in database.

4. Aim
The main aim of this project is to make a elevator system which move through two floor with the
button to control it and a display panel which show the status of elevator. I had to develop a
system which also record the data of elevator in database.

3
5. Hardware and Software Requirement
Hardware:

 Processor: Intel® Core™ i7-8550U CPU @1.8GHz


 RAM: 8.00 GB
 128 GB HD
 Keyboard and Mouse
 Intel Motherboard

Software:

 Operating system: Microsoft Window 10, 8 or 7


 Languages used: C#.
 IDE: Microsoft Visual Studio.net/.net framework.
 Database: MS Access.

6. System Design
One of the most important tasks for this development is designing the requirement of the system.
If I can be able to design perfectly according to the requirements, it will be great to go in
development phase. After gathering all requirement I created my use case diagram, activity
diagram and other diagram for finalizing the system. Designing of the system is one of important
factor of development.

4
6.1 Use Case Diagram

Figure 1: Use Case Diagram for Elevator System

The above figure is the use case diagram of the elevator system where I am showing the
privileged of the users which user can do when they are using our system. User can request for
the elevator, they can request for the floor, close and open door and use emergency warning for
any problems in the lift.

5
6.2 Class Diagram

Figure 2: Class Diagram For Lift Control System

Above figure 2 shows the class diagram of the elevator system.This class diagram shows
that how many system will work during the development of this system. There are mainly
classes of doors which are associated with controller and all the data will be recorded in
the database.

6
6.3. Activity Diagram

Figure 3: Activity Diagram Of Lift Management System

Activity diagram is the another good aspect of UML which describe the aspect of the system.By
the help of activity diagram we can be clear about the work flow of the lift control system
(Ahmad, 2018). This UML diagram describe how the system and User will interrelate with each
other and how this system will work. The basic purpose of activity diagram is:

 To draw flowchart of every activity of system.


 To show the sequence from one activity to another.
 To describe parallel, branched and concurrent of the system.

In above figure, I had shown the overflow of the system which show the system working process.
This can clear what to do when the condition arise in the system.

7
7. Implementation

7.1) GUI
Task 1 Complete GUI Development

Figure 4 GUI of Lift Management System


This picture shows the GUI of elevator system. Here I had designed the lift management system
as per the requirement of the system. As we have to develop a lift having 2 floors with display
and emergency alert. I had created a log watch system in sidebar too.

8
Figure 5: GUI Of Lift in 1st Floor

In this figure we are going in 1st floor from ground floor we can see actions in database and the
time period in the table with display icon running.

Figure 6: Moving in Ground Floor

9
In this figure, we are moving from 1st floor to Ground floor and the database is recording all the
data.

Figure 7: Emergency Alert

In this figure, I have used the emergency due to which all doors are open and the lift in the
emergency mode.

10
Task 2 To create a control program that processes the events published by the GUI.

Figure 8: Code to Handle Buttons Figure 9: GUI to show buttons

Above figure 8, is the code which handle the opening and closing of the lift. There is button to go
for ground floor, first floor and some buttons for emergency there is alert button too which
opens the both door at a same time.

Both the door is upon using the button in the lift.As per the requirement , if we press 1 st floor
button we reach 1st floor and vice versa.Similarly we get open for opening specific floor with
floor open buttons too.

11
7.2) Database Connection
Here Database is created and connected
Task 3 Log information are captured in the database
When the information and button aare clicked they are captured and stored
Using connected model

Figure 10: Connection with Ms Access

In this figure the database is connected with Ms Access where I had created the database and
connected with Disconnected model and data is updated using Data Adapters.

12
Figure 11: Showing the Data when Action are Done

In this figure data is shown in the GUI which are stored in the database. There is option to see
realtime database and retrive data in the GUI and there is the option to clear the log.

7.3 Delagation and TImers

Task 4 Animate using delegation and timer

13
Figure 12: Timer to Open Door

Figure 13: Timer to Open Down Lift

In the above figure, timer and delefates are using the timer and delegation in order to open and
close the doors.Emegency alert are also using the timer and delegates.

14
7.4) Optimizing in Program
Task 5 Background worker is used to optimize the GUI of the system.

Figure 14: Optimizing Program with BackgroundWorker

BackgroundWorker is used to optimize the program and it will be very useful to increase
the efficiency of the program. Due to the use of this model program will be more
optimize and it’s performance gets better.

15
7.5) Exception Handling
Task 6 Handling exceptions with try and catch

Figure 15: Using try and Catch in VIew Data

Figure 16: Try and Catch in Update Data

16
In the above picture, try and Catch are used to handle the errors which may came during the
formation and implementation of system. Many try and Catch are used during the database
update and selecting it.

8) Marking Matrix with Self-Assessment

Task Number Sub-tasks Possible Self- Reference Mark Awarded


Marks assessment to your
(completed testing
Yes/No) report
Task 1 Complete GUI for Task 1 10 yes Task 1 10
Skeleton of event handlers in place 10 yes Task 2 10
for all buttons
Task 2 All event handlers are functional 10 yes Task 2 10
Task 3 Database (DB) is designed and can 5 yes Task 3 5
be connected
Log Information can be retrieved 5 yes Task 3 5
from DB and displayed in the GUI
When the log button is pressed, log 5 yes TASK 3 5
information is sent to and stored in
the DB
Use the disconnected model rather 5 yes TASK 3 5
than connected model (Data source
is updated via DataAdapters
Update() method instead of
ExecuteNonQuery() method)
Task 4 Events described in Task 2 animated 10 yes TASK 4 10
using delegation and timer
Task 5 Using relative path instead of 5 yes TASK 3 5
absolute path
Avoiding any duplication among the 5 yes TASK 2 5
event handlers over the database
related functions
Eliminating logical errors and 5 yes TASK 6 5
handling exceptions with try and
catch
Optimise the efficiency of GUI by 5 yes TASK 5 4
implementing multiple tasks
concurrently via BackgroundWorker
Use state patterns instead of if-else 10 yes TASK 2 8
statements to accommodate future
changes of the requirement
Task 6 Test report 10 yes 8
Total 100 95

17
9. Conclusion
The main of this project is to develop the lift management system which can run 2 floor with the
advance feature like connecting with dbms, emergency safety etc.The whole development has
been done in Visual Studio Code 19 with C# Language and it’s quite good experience to learn
new things during all these hours. The main thing about this course is that I get chance to get
more skill and experience regarding the development of such good system. All the things which I
had done are documented properly and it is quite a good experience to learn these things.Making
the system with database connection is also a new skill which Iearn during all these course.
Overall it’s quite good experience to learn all these things.

10. Bibliography
Ahmad, T., 2018. Model-based testing using UML activity diagrams:.
Available at : https://www.researchgate.net/publication/334657530_Model-
based_testing_using_UML_activity_diagrams_A_systematic_mapping_study

18

You might also like