Driving license registration 1-3
Driving license registration 1-3
INTRODUCTION
1
highway safety until the development of the new system of driving license registration was a
reflective sheeting which is more visible to read even in the dark. This new system of a motor
vehicle and plate number registration, which is the main focus of this project, came into
existence on the 19th of March 1997 and was handled by the motor licensing officer. It was
introduced to enforce strict compliance with traffic rules and regulations as well as to provide
proper data as to the behavior of road users. Thus the role this study is going to play is to
computerize the motor vehicle and plate number registration thereby bringing about more
efficiency, effectiveness, and improved competence.The proposed system is to develop an online
drivin licensees registration wia th theft and recovery system. The objective oa f vehicle theft
detection system is to provide prevention of theft activity for any vehicle. Electronic gadgets
being a great advancement in the field of technology, these can be used to solve many-to-day
problems. If we talk about theft activity then this mainly happens with vehiclesTechnologygy has
also given resolutions on for these activities. The purpose of this project is to prevent vehicle
theft detection. The issue of vehicle theft has increased tremendously.
2
1.3 OBJECTIVES
As we have seen from the statement of the problems, the things that stand as a puzzle in the
manual system of motor driving license registration aim at introducing a better system which is
the computerized system that will contribute to providing solutions to the problems.
i. To review the existing system
ii. To detect stolen vehicles using the adequate requirement eg. Engine number, license plate
information, vehicle identification number (VIN)
iii. recover lost vehicles
3
The scope of the project is to make sure a stolen vehicle is detected after been report by the
rightful owner with the details that was previously provided for proper tracking. This also
intends to provide a common database of registered vehicles from which enquires can be made at
any time in case of identification if there is a loss. Also, if one breaks traffic rules and regulations
and tries to escape, the registration number driver’s license will aid in tracing him/her out. There
is a need to elaborate on the system to be computerized and maintained.
Since it is an academic exercise, the project is designed to handle only some of the activities of
the department namely. The
This research work has five distinct chapters. Chapter one contains an introduction n, the
background of the study, a statement of the problem, the objectives of the study, the significance
of the study, and the scope of the study. Chapter two is the review of related literature, while
chapter three is the system analysis and design. Chapter four presents the system implementation
with the choice of programming language and the system requirements. Chapter five contains a
summary, recommendations, and a conclusion. There are also references and an appendix.
The following are some of the terminologies used in the project work.
i. Vehicle Plate Number: This is a metallic or plastic plate attached to a motor vehicle for
official identification purposes. The number is made up of alphanumeric characters or
numbers. Vehicle Registration: is the process where we add a vehicle’s details to the
motor vehicle register and issue its registration plates. You have to license your vehicle
regularly at least annually and you must display a current license label on your vehicle
windscreen.
ii. Vehicle Licensing: A regular fee paid to permit the use of one’s vehicle on the public
roads. The fee helps to pay for road projects and road safety programs. Your vehicle must
be both registered and licensed for you to legally drive it on the road.
iii. Vehicle owner: is a person who has met up with the entire necessary requirement for
owning a vehicle and has the right to drive it on public roads.
4
iv. Vehicle Registration and Enquiry Software (VehRES) System: This is application
software that is a customizable data collection system, which can be used by law
enforcement and motor vehicle agencies (i.e. Liaison Offices) nationwide. The VehRES
are compatible with both laptop and desktop personal computers (PC) can be used to
collect registered vehicle information for registration, renewal, updating, correction and
tracking.
v. Licensing office: A place where vehicle registration, licenses and other vehicle related
documents are performed. Licensing officers: Is a person who registers vehicles in the
licensing office.
vi. Vehicle: A mechanically propelled and wheeled object used for conveyance.
vii. Computerization: Introduction of the use of computer in an application area by writing a
program that will suit the work.
viii. ICT: This is an acronym for Information and Communication Technology.
ix. Federal Road Safety Commission (FRSC): They serve as law enforcement agency
charged with responsibilities for, among others, policymaking, organization and
administration of road safety in Nigeria. E-Government: There is no one common
definition of E – Government, although the term is widely used. (Norris, 2005) view E –
Government as a technology exercise, integrating individual database and websites of
government, while (Batschneider, 1990) view it as a means of bringing the government
closer to the common citizen through provision of public services online.
x. Driver's license or driving license: is an official document, which states that a person
may operate a motorized vehicle, such as a motorcycle, car, truck or a bus, on a public
roadway. The laws relating to the licensing of drivers vary between jurisdictions. In some
jurisdictions, a license is issued after the recipient has passed a driving test, while in
others; a person acquires a license before beginning to drive.
xi. AutoReg Vehicle license: Is the automated vehicle license registration and renewal
system, which is for all vehicle owners to register or renew their vehicle license with the
state government. It is renewed annually; it shows the details of the vehicle owner and
Vehicle details.
5
CHAPTER TWO
LITERATURE REVIEW
Vehicle tracking systems are commonly used by fleet operators for fleet management functions
such as fleet tracking, routing, dispatching, driving behavior, on-board information and security.
Some vehicle tracking systems are bundled with or interface with fleet management software.
Along with commercial fleet operators, urban transit agencies use the technology for a number of
purposes, including monitoring schedule adherence of buses in service, triggering automatic
changes of buses' destination sign displays once the vehicle approaches the bus terminus (or
other set location along a bus route such as a particular bus stop along the route), and triggering
pre-recorded (or even synthetic speech) bus stop, route (and its destination) or service
announcements for passengers.
The American Public Transportation Association estimated that, at the beginning of 2009,
around half of all transit buses in the United States were already using a GPS-based vehicle
tracking system to trigger automated stop announcements. This can refer to external
announcements (triggered by the opening of the bus's door) at a bus stop, announcing the
vehicle's route number and destination, primarily for the benefit of visually impaired customers,
or to internal announcements (to passengers already on board) identifying the next stop, as the
bus (or tram) approaches a stop, or both; the latter are often also displayed on an internal LED
display or LCD monitor connected to the system while the loudspeakers play them. Data
collected as a transit vehicle follows its route is often continuously fed into a computer program
which compares the vehicle's actual location and time with its schedule, and in turn produces a
frequently updating display for the driver, telling him/her how early or late he/she is at any given
time, potentially making it easier to adhere more closely to the published schedule.
6
Such programs are also used to provide customers with real-time information as to the waiting
time until arrival of the next bus or tram/streetcar at a given stop, based on the nearest vehicles'
actual progress at the time, rather than merely giving information as to the scheduled time of the
next arrival. Transit systems providing this kind of information assign a unique number to each
stop, and waiting passengers can obtain information by entering the stop number into an
automated telephone system or an application on the transit system's website.
Some transit agencies provide a virtual map on their website, with icons depicting the current
locations of buses in service on each route, for customers' information, while others provide such
information only to dispatchers or other employees.
Vehicle tracking systems are also popular in consumer vehicles as a theft prevention, monitoring
and retrieval device. Police can simply follow the signal emitted by the tracking system and
locate the stolen vehicle. When used as a security system, a Vehicle Tracking System may serve
as either an addition to or replacement for a traditional car alarm. Some vehicle tracking systems
make it possible to control the vehicle remotely, including block doors or engine in case of
emergency. The existence of vehicle tracking device then can be used to reduce the insurance
cost, because the loss-risk of the vehicle drops significantly.
Vehicle tracking systems are an integrated part of the "layered approach" to vehicle protection,
recommended by the National Insurance Crime Bureau (NICB) to prevent motor vehicle theft.
This approach recommends four layers of security based on the risk factors pertaining to a
specific vehicle. Vehicle Tracking Systems are one such layer and are described by the NICB as
"very effective" in helping police recover stolen vehicles.
Some vehicle tracking systems integrate several security systems, for example by sending an
automatic alert to a phone or email if an alarm is triggered or the vehicle is moved without
authorization, or when it leaves or enters a geofence.
Stolen vehicle recovery: Both consumer and commercial vehicles can be outfitted with
RF or GPS units to allow police to do tracking and recovery. In the case of LoJack, the
7
police can activate the truck or car tracking unit in the vehicle directly and follow
tracking signals.
Asset tracking: Companies needing to track valuable assets for insurance or other
monitoring purposes can now plot the real-time asset location on a map and closely
monitor movement and operating status.
Field service management: Companies with a field service workforce for services such
as repair or maintenance, must be able to plan field workers’ time, schedule subsequent
customer visits and be able to operate these departments efficiently. Vehicle tracking
allows companies to quickly locate a field engineer and dispatch the closest one to meet a
new customer request or provide site arrival information.
Field sales: Mobile sales professionals can access real-time locations. For example, in
unfamiliar areas, they can locate themselves as well as customers and prospects, get
driving directions and add nearby last-minute appointments to itineraries. Benefits
include increased productivity, reduced driving time and increased time spent with
customers and prospects.
Trailer tracking: Haulage and Logistics companies often operate lorries with detachable
load carrying units. The part of the vehicle that drives the load is known as the cab and
the load carrying unit is known as the trailer. There are different types of trailer used for
different applications, e.g., flat bed, refrigerated, curtain sider, box container.
Surveillance: A tracker may be placed on a vehicle to follow the vehicle's movements.[7]
Transit tracking: temporary tracking of assets or cargoes from one point to another.
Users will ensure that the assets do not stop on route or do a U-Turn in order to ensure
the security of the assets.
Fuel Monitoring: monitor the fuel through tracking device (with help of fuel sensor
connected to the device).
Distance Calculation: calculate the distance travelled by the fleet.
OBD II – Plug and play interface which provides most engine diagnostics information.
Vehicle tracking systems are widely used worldwide. Components come in various shapes and
forms but most use GPS technology and GSM services. Newer Vehicle tracking systems also use
the latest NB-IoT technology that can provide low power consumption and optimized data
8
transmission rates. Additionally, these systems may also feature short range data communication
systems such as WiFi. While most will offer real-time tracking, others record real time data and
store it to be read, in a fashion similar to data loggers. Systems like these track and record and
allow reports after certain points have been solved
Vehicle OBD tracking systems make use of OBD GPS trackers that plug into the onboard
diagnostic (OBD) port of light, medium, or heavy-duty vehicle. A cellular OBD GPS tracker
directly communicates with the cell tower for sending the location and other vehicle performance
data to the server over the cellular wireless network. Usually, the tracker device draws power
from the OBD port itself and contains a built-in antenna along with a GPS module for receiving
the GPS signal. In addition, OBD trackers communicate with the different vehicle subsystems
for receiving vehicle diagnostic and fuel consumption related data. Users can view the
information using standalone software or web browser from a desktop/laptop computer or using
smartphone apps.
9
2.3 DIFFERENT NIGERIAN PLATE NUMBERS
10
Fig. 1: Different Nigerian Plate Numbers
Quality is a major factor for the Vehicle Registration data collected. In Nigeria, Vehicle
Registration data such as vehicle license, car insurance, driver’s license and other vehicle –
related documents are usually collected by officials of both the Federal Road Safety Commission
(FRSC) and the State Liaison Office for both the Federal and State Governments respectively.
Sometimes the data forms are collected away from the scene. These data collected often have
problems including errors, incomplete information, illegibility due to poor handwriting, and
errors due to multiple data entries at various levels. The data obtained might not be of acceptable
quality.
(O’Day, 1993) defines data quality as accuracy, precision, timeliness, and completeness of the
data. The various components of quality listed by O’Day are ascertainment (completeness of data
coverage), consistency of coverage, missing data, consistency of interpretation, and the right
data, appropriate level of detail, correct entry procedures, and freedom from response error.
(Pfefer et al 2007). defined data quality as a set of dimensions which includes accuracy,
precision, completeness, coverage, timeliness, and consistency. The most commonly observed
attributes of data quality are data accuracy, data completeness, data consistency, and timeliness
of the data.
11
The floodgate to shoot down the FRSC’s new number plates was opened when the Chairman of
the Rules and Business Committee of the House of Representatives claimed that its investigation
had revealed that a syndicate, whose identity it did not disclose, has flooded the country with
fake vehicle number plates. However, the row over the introduction of the new number plate and
drivers’ license continued as government road safety managers had to face the drilling of law
makers. The gradual phase-out of the old plates number and driver license by Federal Roads
Safety Commission (FRSC) was initially opposed by Nigerians and National Assembly who
raised concern over the recommended cost of obtaining new ones.
But stakeholders in the road sub-sector including Road Transport Employers Association of
Nigeria (RTEAN), Nigeria Bar Association (NBA) and Department of Road Inspection,
popularly called VIO, expressed support for the introduction of the new vehicle plate number
and driver license considering its security strengthening. Price details for the new number plate
as approved by the Joint Tax Board (JTB) including all the state tax boards reveal the following
N3,000 (new price) as against N750 old price for motorcycle; N15,000 ( new price)as against
N2,500 old price; N20,000 (new price) as against N3,000 old price for articulated vehicle.
Furthermore, the new price for Out of Series is put at N40,000 as against N6,000 being the old
price. The price for Fancy is put at N80, 000 as against N18, 000 (old price). Aside this, the new
price for dealers is placed at N30,000 as against N7,500 as well as N15,000 against N5,000 old
price for Government and N40,000 against N10,000 old price for Government Fancy.
12
of government tracking citizens' movements, misidentification, high error rates, and increased
government spending.
13
Gathering information to locate owners of recovered vehicles.
But, one problem, which seems to plague all of the automation systems, was the length of time it
took to get data into the computer. Northrop (1995) in a study conducted discussing the
effectiveness of police computer use and the problems that exist with this use. It was found in
that study that the respondents in forty-four cities across the United States view computers as a
major force in the fight against crime. This too could be applied in Nigeria if properly
established and managed.
2.6.3 CATERGORY OF VEHICLES AND THEIR COLOR STRIPES
Private vehicles
Commercial vehicles
Government vehicles
Dealers vehicles
Special or Customize vehicles
However, it still has its limitation, as they have not met up with the demands to the masses that
spend endless time anxiously waiting for their demands to be met at the Licensing/Commission
offices. Hence, the full computerization has not been effected as expected while technology and
software programming has advanced in other countries. Shall we continue to wait for the
14
criminals to get away with our stolen vehicles? Shall we keep spending endless time waiting on
queues in which have been divulged are corrupt practices of officials based on personalities?
Shall we spend endless time searching for owners of whose vehicles have been recovered when
software can be developed to tackle such problem like these? The merit of automation is far
reacting more than just saving time and holding down persons cost, automating gives motor
vehicle licensing the means to truly streamline the vehicle registration processes. Automating
manual processing tasks let registration officers eliminate duplicate data entry, move towards a
completely paperless environment and process multi-day function. Emphasizing the use of
technology in vehicle registration. Peter Jacobs K., and Moses Abiola B. (2019), opinion was
that “in developing computerized system which can help motor licensing officers and offices to
automatically register with ease, so that the process becomes an automatic day-to-day operation.
The solution can help motor licensing officers and offices to:
Improve registration: By automating the manual based process, error caused by manual
interventions can be reduced and electronic process support enables faster processing
time.
Meet regulatory demands: Archive, email and documentation so that it is easily
accessible, usable and quickly retrievable for legal demands.
Reduce costs: By reducing the administrative burden of paper management and error
prone and repetitive data entry.
For a computerized system to work efficiently and effectively, a strong and reliable database is
needed. According to Microsoft encyclopedia, database is;
i. A structured format for organizing and maintaining information that can be easily
retrieved. A simple example of a database or a spreadsheet.
ii. Data stored in a computer in such a way that the computer can easily retrieve and
manipulate the data.
iii. A collecting of records describing information resources usually computerized.
According to Ahmed Suleiman T. (1991), “there are many reason for vehicle registration, take
for instance, if you just bought a vehicle and completed all the registration requirement and you
are given your vehicle license, then on your way back from the village, you were attacked at gun
point and the vehicle snatched from you, you reported to the nearest police station and if you are
15
lucky, your vehicle will be found”. It would be difficult for you to get your vehicle within a short
period because of the existing manual system.
According to Balogun, Segun A. (2006), sates in his Road Safety Practice in Nigeria that “the
method of vehicle and plate number registration and identification has caused a lot of people
pains, a pregnant woman die on the queue in her quest for vehicle registration.”
According to Dr. Ikechukwu David N. (1995), states that “our vehicle registration offices today
are faced with potential rise and inefficiencies associated with manual i.e. paper based processes
which are costly, prone to error and require mental and manual labor. Heightened regulation in
the country is also placing these vehicle owners under pressure to meet litigation needs”.
According to Oyeyemi, Biodun O. (2003), states in his stand in his Stand in Road Traffic
Administration states “the level of tediousness the manual system of vehicle registration is so
alarming that requires a new modified method that will be easy and simple.”
According to (Bishop, A., 2003), vehicle crime accounts for a quarter of all recorded crime; it
costs over £3 billion a year and causes immense distress and inconvenience to its victims to track
their records. That is why there is need to setup a national target of reducing vehicle crime by
30% over the next five years in Nigeria.
According to Dr. Marcellina Hembadoon A. (2006), “the vehicle plate number is very important
because it is an identification mark that distinguishes vehicle from each other. It shows the
country a vehicle belongs”.
16
CHAPTER THREE
DESIGN METHODOLOGY
3.1 INTRODUCTION
In the present-day scenario, there is a rise in the number of vehicle thefts exponentially.
Criminals are becoming smarter day by day and have reached the stage of applications present
against the existing vehicle safety system. Vehicle theft has become a major issue that should be
traced and prevented. The proposed system overcomes most of the limitations and cost-
effectiveness. There is a need for one to design a system by showing what the system entails, and
identifying and defining the various components of the system before the actual implementation.
The whole aim is to determine how the information can be built. This gives the designer the
chance of making a choice of the way the problem can best be solved.
Robinson et al, 1970 define system analysis as the methodological study of a system, its current
and the future required objectives and procedures in order to inform a basis for the system and
the design. Jerry, 1989 also define system analysis as the process of analyzing system with the
potential goals of improving and modifying it. In other words, system analysis is the detailed
look at the current system and what a new system will be required to do; system analysis always
leads to system design which is the development of new system that will meet the future
requirements. The basic tool of system analysis is the ability is to prove, enquire, observe more
and reconciles all what happens in any situation. With this alone, the information gathered is
analyzed to identify the components of the system, creating a structure from which the essential
requirements can most efficiently be met.
17
The data used in the study were collected from two sources of data collection, the primary and
secondary source.
Primary Source: This involves oral interviews conducted with various personnel in the
licensing office Enugu state, the licensing office and the Board of Internal Revenue in
reviewing and sharing their experience about the difficulties they undergo in using the
manual system in vehicle and plate number registration issuance and allocation.
Secondary Source: These include the use of textbooks, dictionary, journals newspaper
and Internet downloads to collect data in order to understand what the vehicle and plate
number registration and identification is all about.
XAMP server, VSO, MySQL, Java Programming Language and JavaFX will be utilized to
implement the project.
Xampp: it is an open source web server with all the tools and language support built-in to it. It is
ready to use and makes it easier for developers to take their code and host it locally and test the
same.
18
3.5 USE CASE DIAGRAM
19
Fig. 2: System flow chart
20
3.7 SYSTEM ARCHIITECTURE
21
CHAPTER FOUR
This chapter covers the processes involved in the design and implementation of the new system.
Also, it contains the system flowchart, choice and reason for choosing the preferred
programming language and steps of efficient maintenance to ensure adequate functionality of the
system.
A requirement states what a product or service is intended to perform. It takes into consideration
the attributes and characteristics that a system is expected to possess so as to meet the need of a
user. The web based car theft system is developed to digitize all manual activities carried out
during car registration and monitor theft activities during registeration . These activities may be
independent or inter-related for the user groups.
22
4.2.2 SOFTWARE REQUIREMENT
There are various languages used for the implementation of the website, these languages includes
the following;
PHP: PHP stands for Hypertext Pre-processor. Taken directly from PHP's home, PHP.net, "PHP
is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl
with a couple of unique PHP-specific features thrown in. The goal of the language is to allow
web developers to write dynamically generated pages quickly" this is generally a good definition
of PHP. When someone visits your PHP webpage, your web server processes the PHP code. It
then sees which parts it needs to show to visitors (content and pictures) and hides the other stuff
(file operations, math calculations, etc.) then translates your PHP into HTML. After the
translation into HTML, it sends the webpage to your visitor's web browser.
CSS: This means Cascading Style Sheet. The layout of the document is taken care of by the CSS
with the use of formatting tags, without the use of style sheets, the designing of a page
would became more and more difficult to create as HTML documents was clearly separated
from the document's presentation layout. Styles were created by the World Wide Web
Consortium (W3C) a non-profit, standard setting consortium responsible for standardizing
HTML in addition to HTML4.0. Cascading Style Sheet is supported on Netscape, Internet
Explorer, Firefox and other web browsers.
Java Script: JavaScript is used in millions of Web pages to improve the design, validate forms,
and much more. JavaScript was developed by Netscape and is the most popular scripting
language on the internet. JavaScript works in all major browsers that are version 3.0 or higher.
23
4.4 TESTING
After implementation and sometimes during design, the application must be subjected to testing
verities which are:
4.4.1 Alpha Test: I test the designed application for any syntax bugs or exceptions. This test is
done by the programmers during the design completion.
4.4.2 Beta Test: I released to the knowledge workers used as a case study for testing to see the
suitability of system usage.
This interface shows the user personal information and car details during registration
24
Fig. 5: User Registration Interface
25
Fig. 6: Email Notification
26
Fig. 7: Registered car interface
27
This interface shows the car details which includes engine number, plate number, tracking id and
model number
28
This interface shows when the user has to report the car if it was stolen or missing
29
This interface shows the information about a stolen or missing car that was reported by the
previous user
30
Fig. 11: Admin Login Page
CHAPTER FIVE
31
SUMMARY, CONCLUSION AND RECOMMENDATION
5.1 SUMMARY
Stolen vehicle has been one of the issues in Nigeria till date and user has find it difficults
recovering there vehicle. Vehicle registration and theft detection used to involve manual
recording of vehicles information, which ranges from cars to buses and later to truck and heavy
duty equipment. Vehicle registration in Nigeria began over 100 years ago and the records have
been essentially manual which in turn is not helped to raise the efficiency of general automotive
services in recent years. The design system will help user to recover there stolen vehicle. The
vehicle registration system is a must for any user in the country that wants to be information and
communication technology inclined and ready to reduce the vehicle crime rate and corruption in
her system.
5.2 CONCLUSION
The understanding of the problems that very peculiar to stolen vehicle and registration system
was opened up also in the chapter one and three of this project these problems includes
ineffective, time consuming, tedious, in accurate, inconsistent etc. which vary from operating
system compatibility to machine dependencies. However big a software project is, these
problems and more are what they face and the bigger the software are project the more probable
it is that they face these problems. When the first computer was designed, the development of all
that came after the first computer is founded on the concept of the very first and now it has gone
from development of just computers to the development of software as this project is done so far.
Vehicle Registration in Nigeria began over 100 years ago and the records have been essentially
manual which in turn has not help to raise the efficiency of general automotive services in recent
years. This is only focused on vehicle registration and inspection, and vehicle tracking, learner’s
and crime report.
32
5.3 RECOMMENDATION
If one thing must be researched in the Computerization of vehicle registration and theft detecting
system with the mind of perfecting it and making it more useful in the real sense of things, it is
the security of information handling software. The security of vehicle registration system is very
crucial considering the prevention of vehicle crime and similar vices so it is worth further
researching. Therefore, I Recommend that motor licensing office Abuja should set up a computer
based system.
33
REFERENCES
Agbola. T. and Agbola. E.O. (1997), “The Development of Urban and Regional
Planning Legislations and their impact on the Morphology of
Nigerian Cities”. The Nigerian Journal of Economic
and Social Studies, Vol. 39, No. 1, p. 123-144.
Agbola, T. (1989), “Perspective planning: the urban and regional planning dimensions”
The Nigerian Journal of Economic and Social Studies Vol. 31.
Ahmed, S.T. (1991), “Essentials of Vehicle Registration in Nigeria”. Ibadan: University Press
Plc.
Ikechukwu, D.N. (1995). Nigeria and Traffic Regulations. Ibadan: Africana FEB publishers Ltd.
Jerry, N.A (2000). Benefits and Barriers: People with Disabilities and the National
information infrastructure. Boston: Little, Brown and Company.
Punitha K, S Arun Kumar and n Vijay Ganesh, “ Control Area neyworkfor Reliable
Car Communication”, I Proc. International Journal ofComputer
Application(ICVCI),34-38,2011.
“Real Time Web based Vehicle Tracking using GPS”, World Academyof Science,
Engineering and Technology 2010 Ph.D. Associate ProfessorCollege of
Computer and Information Sciences Prince Sultan University.
34
Montaser N. Ramadan, Mohammad A. Al-Khedher, Sharaf A. Al-Kheder, (2012)“Intelligent
Anti-
Theft and Tracking System for Automobiles”.
Karan Siyal and G. Gugapriya,” (2016) Anti-Theft Vehicle Locking System using CAN”.
Nagaraja B.G., Ravi Rayappa, M. Mahesh, (2017) Chandrasekhar M. Patil, Dr. T.C. Manjunath,
“Design & Development of a GSM Based Vehicle Theft Control System”.
Liu Anqi Zhang, Shaojun Li, (2013) “Vehicle anti-theft tracking system based on Internet of
things,” Vehicular Electronics and Safety.
Le-Tien and Thuong, (2010) “Routing and tracking system for mobile vehicles in large area”,
Electronic Design, Test and Application.
35
APPENDIX I
PROGRAM SOURCE CODE
Database connection to the application
package rps;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Vector;
import javax.swing.JOptionPane;
try{
Connection c = getconnection();
stmt = c.createStatement();
rs=stmt.executeQuery(query);
while (rs.next())
{
Vector<String> rowData = new Vector<String>();
for(int i=0;i<nCols;i++)
rowData.add(rs.getString(i+1));
36
data.add(rowData);
}
}
catch(Exception ex){ System.out.println("error in procedure getTableData --> "+ex.toString()); }
return data;
}
public boolean executeCommand(String task,String s)
{ boolean flag = false;
try{
Conn conn = new Conn();
Connection c = conn.getconnection();
stmt = c.createStatement();
if(task.equals("select"))
{
rs=stmt.executeQuery(s);
if (rs.next())
flag = true;
}
else
{
stmt.executeUpdate(s);
flag = true;
}
}
catch(Exception excp)
{ JOptionPane.showMessageDialog(null,"Not Stored Successfully! --
>"+excp,"Error",JOptionPane.ERROR_MESSAGE); }
return flag;
}
try{
Conn conn = new Conn();
Connection c = conn.getconnection();
stmt = c.createStatement();
rs=stmt.executeQuery(query);
if (rs.next())
result = rs.getString(column_name);
}
catch(Exception ex){ System.out.println("error in procedure getData --> "+ex.toString()); }
37
return result;
}
return res;
}
try{
Conn conn = new Conn();
Connection c = conn.getconnection();
stmt = c.createStatement();
rs = stmt.executeQuery(instr);
while(rs.next())
{
arl.add(rs.getString(column_name));
}
stmt.close();
c.close();
}
catch(Exception excp)
{ JOptionPane.showMessageDialog(null, ""+excp.toString()); }
return arl;
}
try{
Conn conn = new Conn();
Connection c = conn.getconnection();
stmt = c.createStatement();
38
for(int i=0; i<column_names.length;i++)
{ArrayList<String> arl = new ArrayList<String>();
rs = stmt.executeQuery(instr);
while(rs.next())
{
arl.add(rs.getString(column_names[i]).trim());
}
aarl.add(arl);
}
stmt.close();
c.close();
}
catch(Exception excp)
{ }
return aarl;
}
import java.util.ArrayList;
import javax.swing.ButtonGroup;
import javax.swing.JOptionPane;
/
public class CourseF extends javax.swing.JInternalFrame {
try{
for(int i=0;i<depts.size();i++)
{
dresC.addItem(depts.get(i));
}
}catch(Exception Ex)
39
{JOptionPane.showMessageDialog(this, "could not get department residents", "Error",
JOptionPane.ERROR_MESSAGE);}
return depts;
}
int n = ut.emptyFields(arl);
if (n>0)
{
String f = n==1?"field":"fields";
JOptionPane.showMessageDialog(this,n+" required "+f+" empty!","Error",
JOptionPane.ERROR_MESSAGE);
}
else
40
{
code = code.toUpperCase();
if(stored)
{
clearAll();
JOptionPane.showMessageDialog(this,"Course Registered!", "Success",
JOptionPane.INFORMATION_MESSAGE);
}
else
JOptionPane.showMessageDialog(this,"Could not register Course!", "Error",
JOptionPane.ERROR_MESSAGE);
}
}
else
{
JOptionPane.showMessageDialog(this,"A Course with that code already exits", "Error",
JOptionPane.ERROR_MESSAGE);
}
clearAll();
}
if(exists)
{
int resp= JOptionPane.showConfirmDialog(this, "Are you sure you want to delete "+code2+" ?",
"Confirm Delete",JOptionPane.YES_NO_OPTION);
if(resp==0)
{
String query = "delete from courses where code='"+code2+"'";
boolean deleted = cn.executeCommand("delete", query);
if(deleted)
41
{
JOptionPane.showMessageDialog(this, "Course Deleted!", "Success",
JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(this, "Was unable to delete Course!", "Error",
JOptionPane.ERROR_MESSAGE);
}
}
}
else
{
JOptionPane.showMessageDialog(this, "Course with the specified Code does not exist!", "Error",
JOptionPane.ERROR_MESSAGE);
}
import java.io.File;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.JFileChooser;
import org.apache.commons.io.FileUtils;
42
// TODO add your handling code here:
String college = collegeC.getSelectedItem()==null?"":collegeC.getSelectedItem().toString();
if(!college.equals(""))
{
try {
if(departmentC.getItemCount()>0)
departmentC.removeAllItems();
if(programmeC.getItemCount()>0)
programmeC.removeAllItems();
if(!department.equals(""))
{
try {
if(programmeC.getItemCount()>0)
programmeC.removeAllItems();
43
String matno2 = matnoF2.getText();
if(exists)
{
int resp= JOptionPane.showConfirmDialog(this, "Are you sure you want to delete "+matno2+" ?",
"Confirm Delete",JOptionPane.YES_NO_OPTION);
if(resp==0)
{
String query= "select pix from student_biodata where matric_no = '"+matno2+"'";
String address = cn.getData(query,"pix");
System.out.println("Add = "+address);
File f = new File(address);
boolean deleted2 = false;
try
{ f.delete(); deleted2= true; }
catch(Exception ex){ deleted2= false;}
44
String out_camp_add = out_camp_addF.getText();
String sponsor = sponsorF.getText();
String sponsor_add = sponsor_addF.getText();
String college = collegeC.getSelectedItem()==null?"": collegeC.getSelectedItem().toString();
String department = departmentC.getSelectedItem()==null?"":
departmentC.getSelectedItem().toString();;
String programme = programmeC.getSelectedItem()==null?"":
programmeC.getSelectedItem().toString();;
String matno = matnoF.getText();
String ses_ad = ses_adF.getText();
String sem_ad = sem_adC.getSelectedItem()==null?"": sem_adC.getSelectedItem().toString();
String mode_of_entry = mode_of_entryC.getSelectedItem()==null?"":
mode_of_entryC.getSelectedItem().toString();
String level = entryC.getSelectedItem().toString();
String gender = genderC.getSelectedItem().toString();
int n = ut.emptyFields(fields);
if(n>0)
{
JOptionPane.showMessageDialog(this, n+" required field(s) not answered!", "Error",
JOptionPane.ERROR_MESSAGE);
}
else
{
if(cn.exists("select sname from student_biodata where matric_no = '"+matno+"'", "sname"))
{
JOptionPane.showMessageDialog(this, "Student with the specified matric number already
exists!", "Error", JOptionPane.ERROR_MESSAGE);
}
else
{boolean img_stored = false;
directory = directory==null?"":directory;
dest ="images/"+f.getName();
45
if(f2.exists())
{ JOptionPane.showMessageDialog(this,"Picture with the file name already exists!","Image Upload
Error",JOptionPane.ERROR_MESSAGE);
}
else
img_stored = storeImage(f,f2,dest);
}
System.out.println("Image stored = "+img_stored);
if(img_stored)
{
directory = dest;
matno = matno.toUpperCase();
boolean inserted = false;
String query =
"insert into
student_biodata(pix,title,sname,oname,in_camp_address,out_camp_address,"
+ "name_of_sponsor,address_of_sponsor,college,department,programme,matric_no,"
+ "ses_of_ad,sem_of_ad,mode_of_entry,level,gender) "
+ "values('"+directory+"','"+title+"','"+sname+"','"+oname+"','"+in_camp_add+
"','"+out_camp_add+"','"+sponsor+"','"+sponsor_add+"','"+college+
"','"+department+"','"+programme+"','"+matno+"','"+ses_ad+"','"+sem_ad+"',"
+ "'"+mode_of_entry+"','"+level+"','"+gender+"')";
try
{
inserted = cn.executeCommand("insert", query);
}
catch(Exception ex)
{ JOptionPane.showMessageDialog(this,"Could not register Student!", "Error",
JOptionPane.ERROR_MESSAGE);}
if(inserted)
{
JOptionPane.showMessageDialog(this, "Student Registered!", "Success",
JOptionPane.INFORMATION_MESSAGE);
clear();
}
}
else
{ directory = directory==null?"":directory;
if(directory.equals(""))
{
JOptionPane.showMessageDialog(this, "Picture not Uploaded", "Error",
JOptionPane.ERROR_MESSAGE);
}
}
}
}
46
}
directory = flch.getSelectedFile().getPath();
if(directory.toLowerCase().contains("gif")||directory.toLowerCase().contains("jpg"))
{
pixL.setIcon(thumbnail.Sized(new ImageIcon(directory).getImage(), 152, 152));
JOptionPane.showMessageDialog(this, directory, "info",
JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(this, "Document format not recognised", "Error",
JOptionPane.ERROR_MESSAGE);
}
}
else
directory=null;
}
47
private boolean storeImage(File f,File f2,String dest)
{boolean stored = false, error=false;
try
{
System.out.println("No error");
FileUtils.copyFile(f, f2);
stored = true;
if(stored)
directory = dest;
}
catch(Exception ex)
{ /*JOptionPane.showMessageDialog(this, ex.toString(), "Error", JOptionPane.ERROR_MESSAGE);
ex.printStackTrace(); */}
return stored;
}
Score input
import java.awt.Color;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Vector;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
l = (DefaultListModel) studentsLI.getModel();
try{
ArrayList<String> colleges= cn.getAllSingleColumnData("select code from courses order by code",
"code");
48
for(int i=0; i<colleges.size();i++)
{
codeC.addItem((Object) colleges.get(i));
}
if(n>100 || n<0)
return false;
return true;
}
if(score>=70)
grade = "A";
49