This page shows the development of the Initial Class Diagram and the Final Class Diagram.
Data
Storage/Retrieval Section
From the original object diagram a number of additional classes were added to add functionality to the current design and to facilitate the implementation process.
It was decided that a central repository was required to store all data that had o be saved and retrieved.
Thus a class ConfigurationFile was created to handle the interface to the data file.
An analysis on the data items required to be stored and retrieved was done and the following list of items were decided.
List of Data
Fields needed |
|||
No. |
Data Field |
Function |
Modifiable by
User |
1. |
Password |
Stores the user entry pin number |
Yes |
2. |
MaxAttempts |
Contains the number of attempts the user will be given opportunity to re-enter his password in the case he entered the password wrongly several times |
Yes |
3. |
Thumbprint |
Stores the an image of the user’s thumbprint |
Yes |
4. |
PoliceClientAddress |
Stores connection information for the Security System to contact the police |
No |
5. |
VehicleDataRecord |
Stores information on the Vehicle Owner and his vehicle The following sub-fields were required to be stored :- 1. Vehicle License Plate 2. Owner License Number 3. Owner’s Name 4. Vehicle Model Number |
No |
Due to time constraints we decided to simulate a few of the modules in the system and a few of the data fields were simulated using simple data types. These include the thumbprint and PoliceClientAddress.
A few data structures were created to support the simulation of these fields as well as the implementation of the VehicleDataRecord.
The following is a list of data types and data structures used.
List of Data
Types/Structures Used |
|||
No. |
Data Field |
Data Type |
Data Sructure |
1. |
Password |
String |
- |
2. |
MaxAttempts |
Integer/int |
- |
3. |
Thumbprint |
- |
Thumbprint (Uses string data type to simulate the actual presence of a thumbprint) |
4. |
PoliceClientAddress |
- |
Address (Uses string data type to simulate the information needed to contact the police) |
5. |
VehicleDataRecord |
- |
VehicleDataRec (Contains the following attributes :- 5. Vehicle License Plate 6. Owner License Number 7. Owner’s Name 8. Vehicle Model Number ) |
Since only ONE record of the following field was needed, simple file i/o was chosen to implement the storage and retrieval of the records.
The Configurationfile module consists of the LoadFile/SaveFile methods to store and retrieve the data items; get methods to return data record items to the various modules in the system; set methods for the various modules in the program to store/change data record items.
Keypad section
The Keypad module was expanded to include the implementation of the PasswordSystem. The PasswordSystem was created to include all the functions to validate and change the user pin number while the Keypad module was designed to trap the user input and invoke the corresponding methods in the PasswordSystem to carry out intended functions.
The PasswordValidateException module was created to throw exceptions when the user enters wrong passwords.
PasswordValidateException
The module is designed to allow two kinds of exceptions namely the Mismatch password exception and the Invalid password exception.
PasswordSystem
The ValidatePassword method checks the entered user password with the actual password for a match. If there’s no match a mismatch exception is thrown.
The ChangePassword methods checks the two newly entered passwords to check for a valid new password before storing it . If there’s no match an invalid exception is thrown.
Keypad
The Keypad module triggers the alarm if the user has not entered the wrong password more than the maximum number of attempts. Otherwise it allows the user to change his password.
ThumprintRecognition section
The ThumbprintRecognition module was expanded to include the implementation of the ThumbprintSystem. The ThumbprintSystem was created to include all the functions to validate and change the user’s thumbprint image while the Thumbprint module was designed to trap the user input and invoke the corresponding methods in the ThumbprintSystem to carry out intended functions.
The ThumbprintValidateException module was created to throw exceptions when the user enters wrong passwords.
ThumbprintSystem
The MatchThumbprint method checks the entered user thumbprint with the actual thumbprint for a match. If there’s no match a thumbprint mismatch exception is thrown.
The ChangeThumbprint methods checks the two newly entered thumbprints to check for a valid new thumbprint before storing it . If there’s no match an invalid exception is thrown.
Keypad
The Keypad module triggers the alarm if the user has not entered the wrong password more than the maximum number of attempts. Otherwise it allows the user to change his password.
Alarm section
The PoliceConnection module was replaced by the GPSSystem module as we decided that assumed that the police will be alerted by the GPS system.
The GPSSystem module and Door Controller module were created to simulate the existence of these two external systems.
BlackBoxSystem
Section
The black box section was expanded to include the VideoFeedStreamingSystem and the SecurityCam module.
SecurityCam
Module
The SecurityCam module was designed to contain control functions to activate the webcam that was to be used to simulate the presence of an actual security camera.
VideoFeedStreamingSystem
Module
The VideoFeedStreamingSystem module was designed to contain control functions to activate the webcam and to feed the live video footage to the police if necessary.
BlackBoxSystem
Module
The BlackBoxSystem module was designed to contain control functions to activate the webcam and to record live video footage to storage media.
Hence, based on the above, we now present the Initial Class Diagram:
(To view it in a new window click here)
Initial Class Diagram
AdvancedVehicleSecuritySystem
Module
This module is vital for the operation of the system.
It contains a Boolean attribute alarmDeactivated which contains the status of the alarm. If it was true then the user would have been authorized. If it is false the user is yet to be authorized by the system.
No. |
Method |
Function |
1. |
TriggerAlarm() |
Calls ActivateAlarmProcedure() in Alarm class to activate the alarm system |
2. |
DeactivateAlarm() |
Sets alarmDeactivated to true and enables the User Option menu. Changes the state and mode of operation of the program. After the user has been validated the alarm is deactivated and the user menu functions are enabled. |
3. |
ActivateBlackBox() |
Calls writeToBlackBox() in BlackBox module to activate the BlackBox System |
4. |
Activate() |
Shows the SecuritySystem User Interface |
5. |
SystemError() |
Method to print all errors and exceptions encountered. |
6. |
initialiseChangeThumbprint() |
Shows the Thumbpanel in change thumbprint mode |
7. |
initialiseValidateThumbprint() |
Shows the Thumbpanel in validate thumbprint mode |
8. |
initialiseValidatePin() |
Shows the Keypad in change password mode |
9. |
initialiseChangePin() |
Shows the Keypad in validate password mode |
10. |
initialiseChangeMax() |
Shows the MaxAttemptsPanel |
11. |
initialiseOptions() |
Displays the Options User Interface |
TimeOut Module
The TimeOut Module was added to restrict the user from taking too long to enter a valid pin or thumbprint. If he does take too long the TimeOut module will call Triggeralarm() to activate the alarm system.
Keypad
Module
The Keypad module was designed to capture user input for a password and call methods in PasswordSystem to perform functions on these user inputs. The methods ValidatePassword() and ChangePassword() in PasswordSystem are called to process the user inputs depending on the mode of operation as explained in the implementation section.
The TriggerAlarm()/DeactivateAlem() methods are called depending on whether the user has entered a valid user password
PasswordSystem
Module
The PasswordSystem was created to include all the functions to validate and change the user pin number. It needs to cal getPassword() from ConfigurationFile to load the current password.
It uses PasswordValidateException to throw exceptions when the user enters wrong passwords.
The ValidatePassword method checks the entered user password with the actual password for a match. If there’s no match a mismatch exception is thrown.
The ChangePassword methods checks the two newly entered passwords to check for a valid new password before storing it . If there’s no match an invalid exception is thrown.
PasswordValidateException
The module is designed to allow two kinds of exceptions namely the Mismatch password exception and the Invalid password exception.
ThumbPanel Module
The ThumbPanel module was designed to capture user input for a thumbprint and call methods in ThumbprintSystem to perform functions on these user inputs. The methods ValidateThumbprint() and ChangeThumbprint() in ThumbprintSystem are called to process the user inputs depending on the mode of operation as explained in the implementation section.
The TriggerAlarm()/DeactivateAlem() methods are called depending on whether the user has entered a valid user password
ThumbprintSystem Module
The ThumbprintSystem was created to include all the functions to validate and change the user pin number. It needs to cal getThumbprint() from ConfigurationFile to load the current thumbprint image.
It uses ThumbprintValidateException to throw exceptions when the user enters wrong thumbprints
The MatchThumbprint() method checks the entered user thumbprint with the actual thumbprint for a match. If there’s no match a thumbprint mismatch exception is thrown.
The ChangeThumbprint() methods checks the two newly entered thumbprints to check for a valid new thumbprint before storing it . If there’s no match an invalid exception is thrown.
ThumbprintValidateException
The module is designed to allow two kinds of exceptions namely the Mismatch thumbprint exception and the Invalid thumbprint exception.
MaxAttemptsPanel Module
The MaxAttemptsPanel module was designed to capture user input for a new maxAttempts value and call methods in Alarm to perform functions on these user inputs. The methods ValidateMaxAttempts() and setMaxAttempts() in Alarm are called to process the user inputs.
Alarm Module
No. |
Method |
Function |
1. |
ValidateMaxAttempts() |
Checks if the new maxAttempts value specified is within range |
2. |
setMaxAttempts() |
Saves the new maxAttempts value |
3. |
ActivateAlarmProcedure() |
Calls methods 4-7 to activate the Alarm system |
4. |
AutoShutDoors() |
Calls LockDoors() in DoorController module |
5. |
AlertPolice() |
Calls AlertPolice() in PoliceAlerter module |
6. |
ActivateSecurityCamStream() |
Calls ActivateVideoFeed() in SecurityCam module |
7. |
ActivateGPS() |
Calls ActivateGPS() in GPSSystem module |
Blackbox
Module
writeToBlackBox() activates the recording system of the BlackBox.
SecurityCam
Module
ActivateVideoFeed() prints a message to screen to simulate the streaming system.
GPSSystem Module
ActivateGPS() prints a message to screen to simulate the activation of the legacy GPS system.
PoliceAlerter Module
AlertPolice() prints a message to screen to simulate that the police has been alerted.
DoorController Module
LockDoors() prints a message to screen to simulate the locking of all doors.
OpenDoor
Module
The module awaits the user to press the Open Door button.
Once its clicked Activate() is called in AVSS to show the AVSS screen
Car Module
The module serves to load the AVSS and OpenDoor module.
ConfigurationFile Module
Explained in the Implementation section.
Hence, based on the above, we now present the Final Class Diagram:
(To view it in a new window click here)
Final Class Diagram