8/13/2019 3- Layer, 4.0 & 5.0 (2)
1/13
3.1.1 Architectural Style
3.1.1.1 Three Layered Architecture
8/13/2019 3- Layer, 4.0 & 5.0 (2)
2/13
4.0 DATA DESIGN
4.1 Data Description
This section explains the data function and describe how it interacts. Notes: All users are
students of University Technology Malaysia.
1. username- Contain the user unique id to be logged in to the system.
2. password- Contain users secret word or string of characters that is used for authentication to be
logged in to system.
3. fullname- Contain the users fullname. It will be used to confirm users matric card and license card.
4. matric- Contains users matric number.
5. phone- Contain users telephone number which will make the booking session easier.
6. email- Contain users own email so admin can send any notifications through it.
7. room- Contain the usersroom number.
8. block- Contain usersblock number at the college.
8/13/2019 3- Layer, 4.0 & 5.0 (2)
3/13
9. college- Contain users college name.
10.bank- Identifies which bank user (Car Owner) prefers to do transaction with.
11.acc- Contains user (Car Owner)s bank account number.
12.type- Contains userstype of number to differentiate between them. Type 1 for regular Customer,
type 2 for Privilege Customer inside Customer table. Inside CarOwner table, the type forall car owners is type 2. Type 1 is given to admin.
13.license_no- Contain the user (Customer) driving license series number.
14.license_expiry- Contain user (Customer) license expiry date to ensure it is still a valid license.
15.plate- Identifies user (Car Owner) plate number for their cars. This will be used as function key
and primary key for other tables which involves booking cars.
16.carTpe- Identifies user (Car Owner) car type whether it is automatic or manual.
17.brand- Identifies user (Car Owner) car brand.
18.charge- Contains number of charge rate per hour that user (Car Owner) prefers for their cars.
8/13/2019 3- Layer, 4.0 & 5.0 (2)
4/13
4.2 Data Dictionary
TABLE ENTITY NAME DEFINITION TYPESTORAGE
FORMAT
CarOwner
username CarOwners username Varchar Anypassword Car Owners password Varchar Any
re_password Car Ownerspassword Varchar Any
fullname Car Owners fullname Varchar Any
matric Car Ownersmatric number Varchar 9 characters
email Car Owners email address Varchar Any
plateCar Ownerscar plate
numberVarchar 13 characters
phone Car Owners phone number Int 10 - 11 digits
room Car Owners room number Int 3 digits
block Car Owners block number Varchar 4 characters
college Car Owners college name Varchar 4 characters
bank Car Owners bank name Varchar Any
accCar Owners bank account
numberInt 1214 digits
type Car Owners type Int 1 digit
Car
plate Car Owners plate number Varchar 13 characters
carTypeCar Owners car type
(auto/manual)Varchar
4 6
characters
brand Car Owners car brand Varchar Any
chargeCar Owners car charging
rate per hourFloat
2 floating
point
Customer
username Customers username Varchar Any
fullname Customers fullname Varchar Any
password Customers password Varchar Any
re_password Customers password Varchar Any
matric Customers matric number Varchar 13 characters
email Customersemail address Varchar Any
room Customers room number Int 3 digits
block Customers block number Varchar 4 characters
college Customers college name Varchar 4 characters
phone Customers phone number Int 1011 digits
license_no Customers license seriesnumber
Varchar 7 characters
license_expiryCustomers license expiry
dateDate yyyy-mm-dd
typeCustomers type
(normal/privilege)Int 1 digit
8/13/2019 3- Layer, 4.0 & 5.0 (2)
5/13
5.0 COMPONENT DESIGN
5.1 Use Case
This is the use case that we will cover in Version 1.0
uc Use Case Model
Admin
Customer Car Owner
Register
Login
Register Privilege
Member (Customer
only)
Logout
Session Timeout
System
extend
8/13/2019 3- Layer, 4.0 & 5.0 (2)
6/13
5.2 Sequence Diagram
Sequence diagram shows interaction between the boundary, controller and entity classes
in sequence and describes what kind of message that is trying to be passed during the interaction
in the system.
5.2.1 Login Use Case Sequence Diagram
Login for Car Owner
sd Login
Car Owner
Login Form :
System Home
Page
Login Controller CarOwner Car Owner Home
Page
Error Me ssage
Enter (username, password)
password = md5(pa ssword)
getUserInfo(username, password)
isValid (username, password, type == 2)
Open()
inInvalid (username, password, type)
redisplay home page()
8/13/2019 3- Layer, 4.0 & 5.0 (2)
7/13
Login for Customer
sd Login
Customer
Login Form :
System Home
Page
Login Controller Customer Customer Home
Page
Error Me ssage
Enter (username, password)
password = md5(pa ssword)
getUserInfo(username, password)
isValid (username, password, type == 1)
Open()
inInvalid (username, password, type)
redisplay home page()
8/13/2019 3- Layer, 4.0 & 5.0 (2)
8/13
Registration for both Car Owner and Customer
Logout for all users (Admin, Car Owner and Customer)
sd Register
User
RegistrationForm User User Home PageRegistration
Controller
Error Message
Fill in Details()
Submit()
ifEmp ty (post)
if invalid input format()
if password != re_password()
Display Error Message()
reDisplay Registration Form()
Register()
Create New Account()
Display Success Message()
Login()
sd Logout
User
Logout Button :
User Home Page
Logout Session System Home
Page
Select Logout()
Terminate Session()
Open()
8/13/2019 3- Layer, 4.0 & 5.0 (2)
9/13
5.3 Class Diagram
5.3.1 Presentation Layer
5.3.1.1 Class Diagram for Presentation Layer
class Account Verification
Login Window
+ getPassword(): char+ getType(): int
+ getUsername(): char
+ Logi n(char, char): void
+ setPassword(char): void
+ setUsername(char): void
LoginController
8/13/2019 3- Layer, 4.0 & 5.0 (2)
10/13
class Registration
Manage Customer Registration
+ setBlock (char): void
+ setColl ege( char): void
+ setEmail (char): void
+ setFull name (char): void
+ setLicense_Expiry (date): void+ setLicense_no (char): void
+ setMatric (char): void
+ setPassword (char): void
+ setPhone (int): void
+ setRe_Password (char): void
+ setRoom (int): void
+ setType (int): void
+ setUsername (char): void
ManageCustomerRegistrationController
Manage Car Ow ner Registration
+ setAcc (int): void
+ setBank (char): void
+ setBlock (char): void
+ setBrand (char): void
+ setCarType (char): void
+ setCharge (float): void
+ setColle ge (char): void
+ setEmai l (char): void
+ setFull name (char): void
+ setMatric (char): void
+ setPassword (char): void
+ setPhone (int): int
+ setPlate (char): void
+ setRe_password (char): void
+ setRoom (int): void
+ setType (int): void
+ setUsername (char): void
ManageCarOwnerRegistrationController
Manage Car Registration
+ setBrand (char): void
+ setCarType (char): void
+ setCharge (float): void
+ setPlate (char): void
ManageCarRegistrationController
8/13/2019 3- Layer, 4.0 & 5.0 (2)
11/13
5.3.2 Business Logic Layer
5.3.2.1 Class Diagram for Business Logic Layer
class Login
PHPMyAdmin
- password: char
- type: int
- username: char
Account Verification Window::
Login Window
+ getPassword(): char
+ getType(): int
+ getUsername(): char+ Logi n(char, char): void
+ setPassword(char): void
+ setUsername(char): void
Account Verification
Window::LoginController
8/13/2019 3- Layer, 4.0 & 5.0 (2)
12/13
class Register
Registration Window::Manage
Customer Registration
+ setBlock (char): void
+ setCollege ( char): void
+ setEmai l (char): void
+ setFullna me (char): void
+ setLicense_Expiry (date): void+ setLicense_no (char): void
+ setMatric (char): void
+ setPassword (char): void
+ setPhone (int): void
+ setRe_Password (char): void
+ setRoom (int): void
+ setType (int): void
+ setUsernam e (char): void
PHPMyAdmin (Car DB)
- brand: char
- carType: char
- charge: float
- plate: char
Registration Window::
ManageCustomerRegistrationController
Registration Window::Manage Car
Owner Registration
+ setAcc (int): void
+ setBank (char): void
+ setBlock (char): void
+ setBrand (char): void+ setCarType (char): void
+ setCharge (float): void
+ setCollege (char): void
+ setEmai l (char): void
+ setFullna me (char): void
+ setMatric (char): void
+ setPassword (char): void
+ setPhone (int): int
+ setPlate (char): void
+ setRe_password (char): void
+ setRoom (int): void
+ setType (int): void
+ setUsernam e (char): void
Registration Window::
ManageCarOwnerRegistrationController
PHPMyAdmin (Car
Owner DB)
- acc: int
- bank: char
- block: char
- college : char
- email: char
- fullName : char
- matric: char
- password: char
- plate: char- re_password: char
- room: int
- type: int
- username: char
PHPMyAdmin (Customer
DB)
- block: char
- colleg e: char
- email: char
- fullNam e: char
- license_Expiry: char
- license_no: char
- matric: char
- password: char
- phone: int
- re_password: char
- room: int
- type: int
- username: char
8/13/2019 3- Layer, 4.0 & 5.0 (2)
13/13
5.3.3 Database Layer
5.3.3.1 Class Diagram for Database Layer
class Database Connection
MySQL Client Library Login::PHPMyAdmin
- password: char
- type: int
- username: char
Register::PHPMyAdmin (Car
DB)
- brand: char
- carType: char
- charge: float
- plate: char
Register::PHPMyAdmin (Car
Owner DB)
- acc: int
- bank: char
- block: char
- college: char
- email : char
- fullName: char
- matri c: char
- password: char
- plate: char
- re_password: char
- room: int
- type: int
- username: char
Top Related