Você está na página 1de 13

3.1.1 Architectural Style 3.1.1.

1 Three Layered Architecture

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 users room number.

8. block Contain users block number at the college.

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 users type of number to differentiate between them. Type 1 for regular Customer, type 2 for Privilege Customer inside Customer table. Inside CarOwner table, the type for all 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.

4.2

Data Dictionary STORAGE FORMAT Any Any Any Any 9 characters Any 13 characters 10 - 11 digits 3 digits 4 characters 4 characters Any 12 14 digits 1 digit 13 characters 4 6 characters Any 2 floating point Any Any Any Any 13 characters Any 3 digits 4 characters 4 characters 10 11 digits 7 characters yyyy-mm-dd 1 digit

TABLE

ENTITY NAME username password re_password fullname matric email plate

DEFINITION CarOwners username Car Owners password Car Owners password Car Owners fullname Car Ownersmatric number Car Owners email address Car Ownerscar plate number Car Owners phone number Car Owners room number Car Owners block number Car Owners college name Car Owners bank name Car Owners bank account number Car Owners type Car Owners plate number Car Owners car type (auto/manual) Car Owners car brand Car Owners car charging rate per hour Customers username Customers fullname Customers password Customers password Customers matric number Customers email address Customers room number Customers block number Customers college name Customers phone number Customers license series number Customers license expiry date Customers type (normal/privilege)

TYPE Varchar Varchar Varchar Varchar Varchar Varchar Varchar Int Int Varchar Varchar Varchar Int Int Varchar Varchar Varchar Float Varchar Varchar Varchar Varchar Varchar Varchar Int Varchar Varchar Int Varchar Date Int

CarOwner

phone room block college bank acc type plate carType

Car

brand charge username fullname password re_password matric email room block college phone license_no license_expiry type

Customer

5.0 COMPONENT DESIGN


5.1 Use Case

uc Use Case Model

Register

extend

Register Priv ilege Member (Customer only)

Login

Customer

Car Ow ner

Logout

Admin

Session Timeout

System

This is the use case that we will cover in Version 1.0

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

sd Login Error Message Car Owner Login Form : System Home Enter (username, password) Page Login Controller CarOw ner Car Ow ner Home Page

password = md5(password)

getUserInfo(username, password)

isValid (username, password, type == 2)

Open()

inInvalid (username, password, type)

redisplay home page()

Login for Car Owner

sd Login Error Message Customer Login Form : System Home Enter (username, password) Page Login Controller Customer Customer Home Page

password = md5(password)

getUserInfo(username, password)

isValid (username, password, type == 1)

Open()

inInvalid (username, password, type)

redisplay home page()

Login for Customer

sd Register Error Message User RegistrationForm Fill in Details() Registration Controller User User Home Page

Submit() ifEmpty (post) if invalid input format() if password != re_password()

Display Error Message()

reDisplay Registration Form()

Register()

Create New Account() Display Success Message()

Login()

Registration for both Car Owner and Customer

sd Logout

User Logout Button : User Home Page Select Logout() Logout Session System Home Page

Terminate Session()

Open()

Logout for all users (Admin, Car Owner and Customer)

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 Login(char, char): void setPassword(char): void setUsername(char): void

LoginController

class Registration

Manage Customer Registration + + + + + + + + + + + + + setBlock (char): void setCollege( char): void setEmail (char): void setFullname (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

Manage Car Ow ner Registration + + + + + + + + + + + + + + + + + setAcc (int): void setBank (char): void setBlock (char): void setBrand (char): void setCarType (char): void setCharge (float): void setCollege (char): void setEmail (char): void setFullname (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

Manage Car Registration + + + + setBrand (char): void setCarType (char): void setCharge (float): void setPlate (char): void

ManageCarRegistrationController

ManageCustomerRegistrationController ManageCarOw nerRegistrationController

5.3.2 Business Logic Layer

5.3.2.1 Class Diagram for Business Logic Layer


class Login

Account Verification Window :: Login Window + + + + + + getPassword(): char getType(): int getUsername(): char Login(char, char): void setPassword(char): void setUsername(char): void -

PHPMyAdmin password: char type: int username: char

Account Verification Window ::LoginController

class Register

Registration Window ::Manage Customer Registration + + + + + + + + + + + + + setBlock (char): void setCollege( char): void setEmail (char): void setFullname (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

PHPMyAdmin (Customer DB) block: char college: char email: char fullName: char license_Expiry: char license_no: char matric: char password: char phone: int re_password: char room: int type: int username: char

Registration Window ::Manage Car Ow ner Registration + + + + + + + + + + + + + + + + + setAcc (int): void setBank (char): void setBlock (char): void setBrand (char): void setCarType (char): void setCharge (float): void setCollege (char): void setEmail (char): void setFullname (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

PHPMyAdmin (Car Ow ner 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 (Car DB) Registration Window :: ManageCustomerRegistrationController brand: char carType: char charge: float plate: char

Registration Window :: ManageCarOw nerRegistrationController

5.3.3 Database Layer

5.3.3.1 Class Diagram for Database Layer


class Database Connection

Register:: PHPMyAdmin (Car Ow ner 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

Register::PHPMyAdmin (Car DB) brand: char carType: char charge: float plate: char

MySQL Client Library -

Login::PHPMyAdmin password: char type: int username: char