Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

CL/BSCSD/18/32

Student Details ( Student should fill the content)

Name Mahanamage Nimesh Gayanga


Student ID CL/BSCSD/18/32 - (st20164126)

Scheduled unit details

Unit code CIS6003


Unit title Advanced Programming

Unit enrolment details Year 3

Study period 2019

Lecturer

Mode of delivery Full Time

Assignment Details

Nature of the Assessment Course work


Topic of the Case Study An Online Student Accomodation System
Learning Outcomes covered 1,2,3

Word count 6000


Due date / Time 17th August 2019

Extension granted? Yes No Extension Date


Is this a resubmission? Yes No Resubmission Date

Declaration
I certify that the attached material is my original work. No other person’s work or ideas have been
used without acknowledgement. Except where I have clearly stated that I have used some of this
material elsewhere, I have not presented it for examination / assessment in any other course or
unit at this or any other institution
Name/Signature Date

Submission

Return to:

Result

Marks by 1st Signature of the 1st Assessor Agreed


Assessor Mark

i
CL/BSCSD/18/32

Marks by2nd Signature of the 2nd Assessor


Assessor
Comments on the Agreed Mark.

For Office use only (hard copy assignments)

Receipt date Received by

STUDENT NAME: STUDENT NUMBER:

Module Number & Title: Semester:

Assignment Type & Title:

For student use: Critical feedback on the individual progression towards achieving
the assignment outcomes

For the Assessors’ feedback


Indicate the Task number strength and Weaknesses and the marks for each task
Task Strengths (1st Assessor) Strengths (2nd Assessor)
No/Ques
t ion No

Task Weaknesses (1st Assessor) Weaknesses (2nd Assessor)


No /
Questio
n
No

Areas for future improvement


Comments by 1st Assessor Comments by 2nd Assessor

Marks
Marks by
Task Marks by Marks by IV (if IV comments (If Any)
1st
/Question Assessor 2nd any)
No Assessor

ii
CL/BSCSD/18/32

Total
Marks

Name and the Signature Date:


of the 1st Assessor

Name & Signature of the


Date :
2ndAssessor :

Name & Signature of the


Date :
IV: (If any)

Upon successful completion of this module, you will have demonstrated:

• Demonstrate fluency in contemporary programming languages, development tools and


environments.

• Evaluate and demonstrate the theory and concepts of contemporary/industry standard


programming and design in the software development life cycle.

• Demonstrate awareness of industry standards of professional and ethical software


development, software carpentry and codemanship.

Milestone 1: Coursework –An Online Student Accomodation System – 100 Marks

Scenario

The students of XYZ University are always seeking for properties for accommodation closer to their campus
area. To support the student needs the university is planning to host an online Student accommodation
system (SAS) to provide details of property-owners, their properties and of students seeking accommodation.

Some of the required functionalities of the system would be.

• The Student ID, First Name, Last name, address email and telephone number of propertyowners are
kept in SAS. Each property is allocated a unique identifier as well as details such as the address, type

iii
CL/BSCSD/18/32

of property [ex: Flat, terraced house, detached house...etc.], the maximum number of tenants it is
suitable for and the amount of the rent. A fee is charged for each property that is added to the
system.

• Students can register with the service providing their Student ID, First Name, Last name, address
email and telephone number. The registered students will be provided with a list of available
properties. Further the student can request for viewing the properly and system will notify this to the
property-owners.

• The property-owners can update the system if their property is available or not available for rent.

• Also the system must have the facility to provide reports such as available properties, registered
students and current occupation details etc.

Use web based Java technologies to automate the above service.

Students are free to make necessary assumption on system design & granting access permissions according
to the scenario, but all suggestions must be well explained with the valid reasons.

Provide a well-designed, user friendly system addressing the following features: 


System should have differential access rights to the system users.
• Interactive user friendly interfaces
• Clear implementation of the business flow via the system.
• Design & implement suitable sets of reports, which you think will add more value to the
entire business

• Use test driven development and include test classes to test your application

Students are free to make necessary assumption on system design & granting access permissions
other than mentioned within the scenario, but all suggestions must be well explained with the valid
reasons.

Students can add any functionality which will enhance the system and make the proposed solution
more comprehensive.

Use Harvard referencing to properly acknowledge all the external sources you use.
Your tasks
Tasks

a) Provide a requirement specification for the proposed system.(6 marks)


b) Provide the UML diagrams for the given problem with clear explanations on the design
decisions. Derive detailed Use Case diagram, Class diagram & a sequence diagram.
Whenever necessary document the relevant assumptions you made. (9 Marks)

iv
CL/BSCSD/18/32

c) There are many system design patterns available in system development. Critically evaluate
singleton, factory and abstract factory design patterns and apply the most suitable design
pattern for your system development.(15 Marks)

d) Develop an interactive set of interfaces to get the necessary user inputs. Make sure to
implement proper validation mechanisms in order to restrict invalid entries to the system.
Come up with suitable set of reports, which you will think add more value to your system
i. Your program must have a clear, three-tiered organization. That is the program should
have distinct and separate data access, business logic, and user interface layers.
ii. Your program should make use of a proper database to store information
(30 Marks) e)
Document the test plan and explain how you used test driven development in this scenario. This
includes test rationale, test plan, test data and proper application of the test plan (LO II) (10
Marks.)

f) Create user and technical documentation for the developed solution.(10 Marks)

g) Critically evaluate your ethical considerations in developing the solution as well as justify the
tools and function you have used to achieve software carpentry and codemanship. (20
marks.)

Guidelines for the report format


Paper A4
Margins 1.5” left, 1” right, top and bottom
Page numbers – bottom, right
Line spacing 1.5
Font
Headings 14pt, Bold

v
CL/BSCSD/18/32

Normal 12pt
Font face- Times New Roman
Referencing and in-text citation should be done strictly using Harvard Referencing System.

Marking Scheme

Part (a) contains 6 marks

Criteria Marks
Out of 6
 Functional requirement specification

3
 Nonfunctional requirement specification

Part (b) each contain 9 marks

Diagrams should be evaluated according to the following criteria.

Marks
Criteria Out of 9

Proper use of Object Oriented Design Methodology

Use case Diagram


• Identification of correct use cases
• Identification of correct Actors and associations Sequence
Diagram
• Implementing identified set of use cases (about 3) as
sequence diagrams. 1-3

Class Diagram
• Identification of associated methods, with correct
signatures and attributes in each class
• Correct identification of relationships

vi
CL/BSCSD/18/32

Average Design
• Clear identification of private, public access modifiers & it
is visible in the class diagram
• Accurate use of <<include> <<extend>> stereo types in
use case diagram
• Appropriate use of lifelines, messages and objects in
proposed sequence diagrams
4-6
• Correct use of UML notations with minor mistakes
Evaluation
• Student has given basic description about the design and
given a reasonable justification
• Effective judgements have been made about the content
and levels of information to be included

Excellent Design
• Highly detailed diagram
• Use of OO concepts clearly visible
• Backed by relevant assumptions
• Multiplicity, navigability aggregation & compositions
visible in class diagrams
• Excellent use of UML notation
7-9
Evaluation
• Good justification of the design
• Judge validity of results
• Use critical reflection to evaluate the work and justify with
valid explanations
Fluency (Of design)
• Evidence of critical analysis on different perspectives
covering how, use case, class & sequence diagrams
support in designing.

Part (c) contains 15 marks

Criteria Marks
Out of 15
Identify the different types of design 1-5
patterns and there advantages
Apply the suitable design patterns for 5-10

vii
CL/BSCSD/18/32

system development
Critically evaluate the impact of design 11-15
patterns

Part (d) contains 30 marks

Criteria Marks
Out of 30
Excellent 21-30
• More sophisticated UI,
• Complex functionality (Email alerts/SMS/Innovative
aspects)
• 3- tier architecture should exit

• Appropriate use of more sophisticated database features (e.g.


use of stored procedures / functions / triggers to implement
business rules)
• Reports being proposed to facilitate decision making.
• Effective use of sessions / cookies
Good 9-20
• Make a good attempt to follow the three tier architecture.
• More sophisticated database design and queries
• More sophisticated data representation (e.g. several classes at
business logic level)
• Separate UI windows for entering results and viewing overall
scores.
Pass 0-8
• Basic data management system features .
• Use a database (simple design)
• Have simple Web user interface

Part (e) contains 10 marks

viii
CL/BSCSD/18/32

Test Rationale (3 marks)


• Provide a concise rationale for the approach adopted. Discuss how you are going to use test
driven development.

Devise your test data (2 marks)


• Derive test data for the system.

Produce and apply a test plan (5 marks)


• Create test classes for your system

• You are to carry out relevant tests and provide documentation detailing the tests used to
verify your system.

• Demonstrate that the code passes all the tests (use screen-grabbing software and insert
images into your submission).

• Evaluation of overall success or failure and lessons learned.

• Traceability showing how each requirement is met by the design.

Part (f) contains 10 marks

Criteria Marks
Out of 10
Professional standard of documentation 7-10
with screen shots & good explanation
High standard of documentation with 5-7
screen shots & average explanations
Acceptable standard of documentation 3-5
with poor explanations
Errors in the documentation 0-3

Part (g) contains 20 marks

Criteria Marks
Out of 20
 Identify ethical issues relevant to the case study.
 Analyze the ethical considerations  Justify the
chosen considerations. 6

ix
CL/BSCSD/18/32

 Justify the tools and functions used to achieve software


carpentry in your development.
7
 Justify the tools and functions used to achieve software
codemanship in your development.
7

Final Grading criteria for the coursework


Marks Final Grade
>=70 1
69-60 2:1
59-50 2:2
49-40 3
<40 fail

Acknowledgement

I should express my sincere gratitude to Mr. Tharik Kanaka who always guide me and encourage me
to complte a such kind of marvelous task.

As well I should thankful to my parents who is behind me in my every success and failures. Without
them I could not stand like now I’m in.

I am also thankful to my programme manager who are supported me in every situation.

x
CL/BSCSD/18/32

xi
CL/BSCSD/18/32

Contents
Acknowledgement...............................................................................................................................................i
Table of Figures..................................................................................................................................................3
System Requirement Specification.....................................................................................................................4
Introduction....................................................................................................................................................4
Scope..........................................................................................................................................................4
Overall Explanation.........................................................................................................................................5
System Outline...........................................................................................................................................5
Functional Requirement.................................................................................................................................6
Use Case Diagram.......................................................................................................................................7
Non Functional Requirements........................................................................................................................7
Expectations...................................................................................................................................................8
Hardware....................................................................................................................................................8
Software Interface......................................................................................................................................8
Data Model.....................................................................................................................................................9
Entity relationship diagram.........................................................................................................................9
Database Structure...................................................................................................................................10
User interfaces..............................................................................................................................................13
Planning Phase.............................................................................................................................................17
Process model..........................................................................................................................................17
Technical documentation.................................................................................................................................18
Frameworks & Technologies.....................................................................................................................18
System Architecture..................................................................................................................................18
Controllers................................................................................................................................................19
Interceptors..............................................................................................................................................20
RestRequestService class..........................................................................................................................21
Model classes...........................................................................................................................................22
Data access layer......................................................................................................................................22
Business logic layer...................................................................................................................................23
Presentation layer.........................................................................................................................................25
Deployment..............................................................................................................................................27
UML diagrams..................................................................................................................................................28
Class diagram................................................................................................................................................28

1
CL/BSCSD/18/32

Sequence diagram........................................................................................................................................29
Evaluate the design patterns............................................................................................................................30
Singleton design pattern...............................................................................................................................30
Factory design pattern..................................................................................................................................31
Abstract Factory design pattern....................................................................................................................32
Testing..............................................................................................................................................................33
Test driven development..............................................................................................................................33
Evaluate ethical & social consideration in developing the system....................................................................36
User Documentation........................................................................................................................................37
How to Login................................................................................................................................................37
Admin...........................................................................................................................................................37
Display and Manage User List...................................................................................................................37
Property list..............................................................................................................................................38
Student registration by Admin..................................................................................................................38
Landlord registration by Admin................................................................................................................39
Landlord.......................................................................................................................................................39
My Property list........................................................................................................................................39
Add property............................................................................................................................................40
Students.......................................................................................................................................................41
Property search........................................................................................................................................41
Conclusion........................................................................................................................................................42
References........................................................................................................................................................43

2
CL/BSCSD/18/32

Table of Figures
FIGURE 1................................................................................................................................................................................ 6
FIGURE 2................................................................................................................................................................................ 7
FIGURE 3................................................................................................................................................................................ 9
FIGURE 4.............................................................................................................................................................................. 13
FIGURE 5.............................................................................................................................................................................. 14
FIGURE 6.............................................................................................................................................................................. 14
FIGURE 7.............................................................................................................................................................................. 15
FIGURE 8.............................................................................................................................................................................. 15
FIGURE 9.............................................................................................................................................................................. 16
FIGURE 10............................................................................................................................................................................16
FIGURE 11............................................................................................................................................................................17
FIGURE 12............................................................................................................................................................................18
FIGURE 13............................................................................................................................................................................19
FIGURE 14............................................................................................................................................................................19
FIGURE 15............................................................................................................................................................................20
FIGURE 16............................................................................................................................................................................20
FIGURE 17............................................................................................................................................................................21
FIGURE 18............................................................................................................................................................................22
FIGURE 19............................................................................................................................................................................23
FIGURE 20............................................................................................................................................................................24
FIGURE 21............................................................................................................................................................................25
FIGURE 22............................................................................................................................................................................26
FIGURE 23............................................................................................................................................................................26
FIGURE 24............................................................................................................................................................................27
FIGURE 25............................................................................................................................................................................28
FIGURE 26............................................................................................................................................................................29
FIGURE 27............................................................................................................................................................................30
FIGURE 28............................................................................................................................................................................31
FIGURE 29............................................................................................................................................................................31
FIGURE 30............................................................................................................................................................................32
FIGURE 31............................................................................................................................................................................33
FIGURE 32............................................................................................................................................................................34
FIGURE 33............................................................................................................................................................................34
FIGURE 34............................................................................................................................................................................35
FIGURE 35............................................................................................................................................................................35
FIGURE 36............................................................................................................................................................................37
FIGURE 37............................................................................................................................................................................38
FIGURE 38............................................................................................................................................................................38
FIGURE 39............................................................................................................................................................................39
FIGURE 40............................................................................................................................................................................39
FIGURE 41............................................................................................................................................................................40
FIGURE 42............................................................................................................................................................................41
FIGURE 43............................................................................................................................................................................41

3
CL/BSCSD/18/32

System Requirement Specification

Introduction

During long time ago to now XYZ university students seeking for an accommodation area to
stay mainly when developing this web based accommodation system will directly helpful to
identify the places which they can stay. Basically this document shows how to implement
this system in interactive manner.

Scope

This is an online web based system. This will help to find proper accommodation which are
very closer to the university premises. This system will mainly show the details of land
owners and their properties.

Basically this system will help to login the specific user accounts. Such as, students have
capability to login to their accounts, basic requirements are fully filled like can view the
properties, search the properties, able to pass the request to the landowner and etc. Then
landowner will get the information through the email with student contact details. Above
mention scope is relevant only for the student side.

Then move to the landowner side, they can login to the system same as previously describe.
And they have capability to add any kind of properties in to the website. Properties may have
their own entities like property type, address, amount of property rent as well landowner can
edit and remove the property details.

Then move into the system admin side, they can view all the landowners and student’s
information. The admin has privileges to remove any kind of details in the system. As well
admin can do any activates though the system such as view/edit/remove properties and
accept it. Otherwise students cannot see it through the system. And as well after admin
accept the property then can ability to handle the payments. Admin has privilege to register
users. Ex: students as well as landowners. Once they have registered to the system they will
get unique username and password as system credentials.

4
CL/BSCSD/18/32

System give us so many benefits to both parties of students and landowners. The students
can get accurate details to find out suitable accommodations. Because they have to submit
relevant details to university. Landowners have ability to send their property details to
specific students which can get largest demand to their system.

This online system is developed using the JAVA platform and used HTML & CSS & java
scripts for the frontend developments.

Overall Explanation

System Outline

As above mentioned this is a web built development. This development supports for the
students who needs accommodation so close to the university premises. Basically it
highlights major types of users. Such as, system admin, students and landowners. Landowner
has privilege to add any kind of property. System admin can able to distribute it.

Then student can able to see the specific properties and can contact relevant landowner. The
students also can send request to landowner and then landowners send email to specific
student who is willing to take land property. As well land owner can edit current status of the
property whether it is already rent or not. And also able to delete the property if unnecessary.
As well as system admin can remove or blocked the system users.

When preparing the web based application, there are having three schema planning.

This system has a database and store data to the database. In order to do that I use MYSQL
database as the DBMS.

In Business logical layer mainly highlighted the system validations and all the functionalities
those are implemented in the system need to work properly. The output of this layer will in
the JSON format.

The all user interfaces are handled the Presentation layer. This layer controls the links
between user interfaces. And as per the user type the interfaces are changed by the
Presentation layer. And also manage the user access from this layer.

5
CL/BSCSD/18/32

Figure 1

Functional Requirement

 Register Students & Landowners: University students are registered by the admin.
Landowners also registered by the system admin. Landowner can give relevant
information to users.
 User login & Logout: Once system admin create account then will send the
username and password (system credentials) to user. If users want to logout the
system, simply they can press the logout tab and exit the system.
 Properties Request and View: Once student log to the system student can view
properties as well can search properties with specific names though the list of them.
Also they can request the searched properties by pressing request button in property
request page.

 Landlord add, update and delete property: Landowners has privilege to add new
properties to the system with relevant details such as images. Then landowners can
update property when there is any modification going on property by pressing on
update button. If there any unwanted property, then landowners can simply remove
them by pressing on the delete button.

 Delete users: Admin has the privilege to delete the system users. After deleting the
users, they will not appear in the users list.
 Admin accept & delete property: System admin has privilege to accept the
properties. After landowners adding the properties, admin must accept or reject the

6
CL/BSCSD/18/32

properties. If property getting approved, then it will visible on the system. Otherwise
it not appears in the system.

Use Case Diagram

Figure 2

Non Functional Requirements

 This web based system should be responsive to each and every technical device like
mobile phones, laptops and desktops.
 Interfaces should be simple and easy to understand to anyone who is using the
system.
 System security must be high. Every user has unique system credentials. Therefore,
we need to implement well security mechanisms to the system.
 The system speed should be high. System must response at the accurate time and all
the activities must process quickly with minimum loading time.

7
CL/BSCSD/18/32

Expectations
I assumed below mentioned facts when developing this web based system.

 Admin has privilege to register students as well landowners when student done the
relevant payment as rent. Then landowner will send the email requesting to create a
relevant account to the admin.
 When payment is done, specific property is added to the system.
 All emails will send though the SMTP server. Therefore, we have to configure the
SMTP server in order to send the emails from the system.
 Data access and logical layers perform as RESTFUL web services and output will be
in JSON format.
 JWT (Jason Web Token) is used to perform web authentication part.

Hardware

As web based development there is no need of having any hardware component


relevant. As above mentioned it should have privilege to run on web server.
Therefore, users have capability to access this web based system any technical device.

Software Interface

MYSQ used to create the database. As a web based system, JAVA platform is used to
develop the system. All the interfaces are mobile responsive. Therefore, the system must
compatible for all devices.

8
CL/BSCSD/18/32

Data Model

Entity relationship diagram

Figure 3

9
CL/BSCSD/18/32

Database Structure

Table of User

Column
Id - INT Auto increment field. Primary key of the table. Every user has
identify with this id though the system.
Type - VARCHAR(15) This filed is store the user type of each user. Such as admin,
student or landowner
Email - VARCHAR(75) User email address will store in this column. This is unique and
not null column.
Password - VARCHAR(20) User has choose the password.
first_name – VARCHAR (80) User has to choose the value and it is required field.
last_name – VARCHAR (80) User has to choose the value and it is required field.
reg_date - DATETIME This value generated by Data access layer and value is
mandatory.
Status - VARCHAR(45) This is a is required field.
Contact - VARCHAR(20) This is a is not required field. User can ignore this value.
Address - VARCHAR(200) User has to choose the value and it is required field.

Table of Landowner

Column Name
Lid - INT Auto increment field. Primary key of the table. Every user has
identify with this id though the system.
userid - INT This is a foreign key from user table.

Table of Student

Column
lid - INT Auto increment field. Primary key of the table. Every user has

10
CL/BSCSD/18/32

identify with this id though the system.


uid - INT This is a foreign key.
studentid - INT This is the university student number. This value is required.

Table of Property

Column
pid - INT Auto increment field. Primary key of the table. Every user has
identify with this id though the system.
ll_id - INT This is a foreign key
type_id - VARCHAR(45) This is a foreign key
title –VARCHAR (50) This field is chose by landowner.
Description - Property description is chose by landowner.
VARCHAR(550)
Address - VARCHAR(150) Property address is chose by landowner.
Rent - DOUBLE Cost of property chose by land owner.
tenants - INT User has to choose the value and it is required field.
Availability - VARCHAR(10) System function feed the value. This is used to check property
availability.
Status - VARCHAR(60) This value is generate by system function.

Table of Request

Column Name
rid - INT Auto increment field. Primary key of the table. Every user has
identify with this id though the system.
property_id - INT foreign key from property table.
student_id - INT foreign key from student table.
status – VARCHAR (50) This field is feeded by system function.

11
CL/BSCSD/18/32

Table of Properties image

Column
Imgid - INT Auto increment field. Primary key of the table. Every user has
identify with this id though the system.
property_id - INT This is a foreign key from user property table and it is required
field.
url - VARCHAR(100) Property image url store here.
status -VARCHAR(10) This value is generate by system function.

Table of Property types

Column Name Description


typeid INT Auto increment field. Primary key of the table. Every
property has identify with this id though the system.
typename - VARCHAR(60) This used to indicate property type name and it is required
field.
status - VARCHAR(60) This value is generate by system function.

User interfaces

Student Registration Form

12
CL/BSCSD/18/32

Figure 4

Landowner Registration Form

Figure 5

13
CL/BSCSD/18/32

View System Users

Figure 6

Property List

14
CL/BSCSD/18/32

Figure 7

Landowner Add Property

Figure 8

Student View Properties

15
CL/BSCSD/18/32

Figure 9

Students Property Search & View

Figure 10

Planning Phase

16
CL/BSCSD/18/32

Process model

The Waterfall Model was the first Process Model to be introduced. It is very simple to
understand and use. In a Waterfall model, each phase must be completed before the next
phase can begin and there is no overlapping in the phases.

[ CITATION too19 \l 1033 ]

I used Waterfall model in order to develop this web based system. I have listed below the
steps:

Figure 11

17
CL/BSCSD/18/32

Technical documentation

Frameworks & Technologies

I used spring framework for develop the system and used Maven as the construction tool.

Spring makes it easy to create Java enterprise applications. It provides everything you need to
embrace the Java language in an enterprise environment, with support for Groovy and Kotlin
as alternative languages on the JVM, and with the flexibility to create many kinds of
architectures depending on an application’s needs. [ CITATION spr19 \l 1033 ]

System Architecture

The system is developed using the three tires architecture. Basically we can list the three tires
as:

Figure 12

18
CL/BSCSD/18/32

Figure 13

Controllers

In spring boot controllers, uses the RestController or the Controller annotations. It tells that this
controller category is prepared to be used by spring MVC to handle the incoming internet requests.

Figure 14

19
CL/BSCSD/18/32

Interceptors

Interceptors are used to implement cross-cutting concerns, such as logging, auditing, and security,
from the business logic. I implemented the interpreters as follow to the system,

Figure 15

Interceptor can add to multiple URLs and URL patterns as below example. This interceptors
is located in the Configuration Class.

Figure 16

20
CL/BSCSD/18/32

RestRequestService class

This service has used to sending the requests to one tier to another tire in both presentation
layer and business logic layer. HTTP GET and POST requests are handling in the
RestTemplate class.

Figure 17

21
CL/BSCSD/18/32

This class is used GET and POST methods. Finally, this class return an object if the request is
successfully executed.

Model classes

The Java model is the set of classes that model the objects associated with creating, editing,
and building a Java program.

[ CITATION ecl19 \l 1033 ]

Data access layer

A data access layer (DAL) in computer software, is a layer of a computer program which provides simplified
access to data stored in persistent storage of some kind, such as an entity-relational database.[ CITATION
wik19 \l 1033 ]

All the database transactions are doing in this layer.

Figure 18

22
CL/BSCSD/18/32

In the Properties Class, all the configurations are available as follow,

Figure 19

And also ports need to be changed according to web server configurations when deploying
the system in web server.

Business logic layer

The business logic provides data required by the presentation layer. The business logic layer is used
the JWT authentication method to communicate with the other layers.

23
CL/BSCSD/18/32

Figure 20

24
CL/BSCSD/18/32

Presentation layer

This layer mainly deals with the end users. All the system interfaces are handling in this layer.

Figure 21

In this layer objects are saved as session. Then the sessions are handled by SessionService class.
AdminMiddleware used for validate users. With this validation the admin user only has the privilege
to access this page.

25
CL/BSCSD/18/32

Figure 22

Figure 23

26
CL/BSCSD/18/32

Deployment

In order to deploy the system, we have to configured web ports in application for all three
tires with correct server port values. This configuration can be find in the properties file.
After configuring the ports, we can build the project.

We can build the project by clicking on [ Maven Projects  Lifecycle  package] . Then the
project and .jar file will build. (jar file can find in the root) And make sure to import the
database on to the webserver before do the deployment.

Figure 24

27
CL/BSCSD/18/32

UML diagrams

Class diagram

Figure 25

28
CL/BSCSD/18/32

Sequence diagram

This diagram displays the landowner registration process,

Figure 26

29
CL/BSCSD/18/32

Evaluate the design patterns

Singleton design pattern

The singleton pattern is a design pattern that restricts the instantiation of a class to one object.
Singleton pattern is one of the simplest design patterns in Java. I have used this design pattern
in my project in the data access layer. Following code snap shows the
DateTimeFormatService.java class and its functions.

Figure 27

30
CL/BSCSD/18/32

Factory design pattern

Factory pattern is one of the most used design patterns in Java. This type of design pattern
comes under creational pattern as this pattern provides one of the best ways to create an
object.

[ CITATION tut19 \l 1033 ]

The factory pattern layer I have used in the EmailServiceInterface.java interface in order to
send emails once the users have registered to the system.

Figure 28

Figure 29

31
CL/BSCSD/18/32

Figure 30

Abstract Factory design pattern

Abstract Factory design pattern is one of the Creational pattern. Abstract Factory pattern is
almost similar to Factory Pattern is considered as another layer of abstraction over factory
pattern. I didn’t use this design pattern in the project.

32
CL/BSCSD/18/32

Testing
Test driven development

In the data access layer, I have used some test classes for testing the project. I used
CrudRepository to test insert, update and delete functions. Test classes is developed to
check these basic functions are working properly or not. If any of test class produce an
runtime error, it means there is a database failure or entity class issue. These test cases run
in every time when users run the project. And also we can run test cases separately to check
function by function separately.

Figure 31

33
CL/BSCSD/18/32

Figure 32

Figure 33

34
CL/BSCSD/18/32

Successful Test Results:

Figure 34

Unsuccessful Test Results:

Figure 35

35
CL/BSCSD/18/32

Evaluate ethical & social consideration in developing the system

I used Intelij IDE to develop my project. It’s not a open source software. They have provided
the free trial period . I used it and completed my development using this IDE. I found lot of
cracking versions of this software, but as a practice I don’t use crack versions since it is not
ethical behavior.

MYSQL Workbench used to create databases and connections. Since workbench is open
source software I used it under the GPL license.

ALL the diagrams are designed using online free diagram designing tools. And specially lot
of cases I use Gliffy tool and I must say it is great tool for draw diagrams in a comprehensive
manner.

And all the web browsers can access the system and also mobile devices can access the web
system without any issue since all the interfaces are responsive.

In 1.2.5 Constraints I have mention about terms of use and privacy policy statements. This
system handles user personal information. Because of that we need to have these privacy
policy statements terms of use conditions.

I have used separate user accounts for every user for security functions. while not AN user
account you can't enter to the system. I even have offer enough security for the system as a
result of if not provided enough security for user personal data it may well be a legal issue per
data protection act 1998 in United Kingdom and it might bring discredit to the profession.
That’s why I implement enough security for this on-line student accommodation data system.

36
CL/BSCSD/18/32

User Documentation

How to Login
After enter the domain, all the users will display a screen as below. Then users should provide
system credentials into the form. If credentials is correct, users can sign in to the system.

Figure 36

Admin

Display and Manage User List

After login to the system the admin will see a screen as below. In here admin can delete or view the
already registered system users.

Figure 37

37
CL/BSCSD/18/32

Property list
And also the admin can accept or delete property list in this page.

Figure 38

Student registration by Admin

The system admin can register the students using this page. Admin have to fully fill all
required field then admin complete the registration process.

Figure 39

38
CL/BSCSD/18/32

Landlord registration by Admin

The system admin can register the landowners using this page. Admin have to fully fill all
required field then admin complete the registration process.

Figure 40

Landlord

My Property list

After login to the system as landowner, will see a screen as below. In this view shows the all
properties that have already added to the system by landlord. Landlord can manage status of
properties or delete it by pressing on relevant buttons.

39
CL/BSCSD/18/32

Figure 41

Add property

The landowners can add their properties using this page. They have to fill all the required
field before adding the properties to the system.

Figure 42

40
CL/BSCSD/18/32

Students

Property search

After login to the system as student, will see a screen as below. In this view Student can
search properties and send request to view properties.

Figure 43

41
CL/BSCSD/18/32

Conclusion

This web based system for university accommodation is implemented as a website for the purpose of
university students who are seeking accommodation. The users can be categorized as the student,
Landowner and System Admin users. Relevant tasks are allocated for specific users.

Under the three level schema architecture like database level, logical level and interface level
(Presentation/view level). Mainly Singleton design pattern used within Java Platform. This pattern is
manage the database operations of this web development.

For the front end development mainly used HTML,CSS, Bootstrap and JAVASCRIPT parallel with
the AngularJS like designing tools are used. Basically when consider abut interfaces in this web site
there can be categorized into two sections as dashboard and user area. CSS is styling tool along with
the Bootstrap used to make interactive web page to the users as well it should be responsive for the
each and every technical device such as, mobile phones, laptops and PCs. It should be more user
friendly if anyone can easily access.

Most important one is best security options are featured to this system because several users are
access this site and it need to be more security for the user’s usernames and passwords otherwise
unauthorized access can be attacked to the site and grab the personal details. Therefore, in the
implementation it should be add to the system for validate those login details to maintain proper
security purpose. Not only that email confirmation function and online payments procedures should
have proper security methods to secure information.

Finally, this accommodation web based system is implemented within relevant objective and time
frame as the purpose of acclamation process with fully safety, fast and success.

42
CL/BSCSD/18/32

References

eclipse. (2019, 08 22). Java model. Retrieved from http://help.eclipse.org:


http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Fguide
%2Fjdt_int_model.htm

https://www.gov.uk. (2016). Data protection. Retrieved January 2017, from https://www.gov.uk/data-


protection/the-data-protection-act

spring.io. (2019, 08 20). Spring Framework Overview. Retrieved from docs.spring.io:


https://docs.spring.io/spring/docs/current/spring-framework-reference/overview.html

toolsqa.com. (2019, 08 28). What is WaterFall Model? Retrieved from www.toolsqa.com:


https://www.toolsqa.com/software-testing/waterfall-model/

tutorialspoint. (2019, 08 22). Design Pattern - Factory Pattern. Retrieved from tutorialspoint.com/:
https://www.tutorialspoint.com/design_pattern/factory_pattern.htm

wikipedia. (2019, 8 12). Data access layer. Retrieved from /en.wikipedia.org:


https://en.wikipedia.org/wiki/Data_access_layer

43
CL/BSCSD/18/32

Advanced Programming
final.docx
by Nimesh Gayanga Mahanamage

Submission date: 31-Aug-2019 05:18PM (UTC+0100)


Submission ID: 110386873
File name:
65858_Nimesh_Gayanga_Mahanamage_Advanced_Programming_final_517230_652836280.docx
(1.78M)
Word count: 3817
Character count: 19741

Advanced Programming final.docx


ORIGINALITY REPORT

44
CL/BSCSD/18/32

20 %
SIMILARITY INDEX
13%
INTERNET SOURCES
5%
PUBLICATIONS
19%
STUDENT PAPERS

PRIMARY SOURCES

Submitted to University of Wales Institute,


1 6%
Cardiff
Student Paper

Submitted to Asia Pacific Instutute of


2 3%
Information Technology
Student Paper

docs.spring.io
3
Internet Source 1%
www.kodikara.net
4
Internet Source 1%
www.toolsqa.com
5
Internet Source 1%
digthiscrazytestpattern.com
6
Internet Source 1%
Submitted to Gusto International College
7
Student Paper 1%

45
CL/BSCSD/18/32

www.geeksforgeeks.org
8
Internet Source 1%
Submitted to International Academy of New

9 1%
Zealand
Student Paper

blog.mgechev.com
10
Internet Source 1%
www.cs.utep.edu
11
Internet Source 1%
fr.slideshare.net
12
Internet Source 1%
Submitted to The Manchester College
13
Student Paper <1%
Submitted to Sunway Education Group
14
Student Paper <1%
Submitted to Colorado Technical University
15 <1%
Online
Student Paper

46
CL/BSCSD/18/32

pergamos.lib.uoa.gr
16
Internet Source <1%
Submitted to University of Hull
17
Student Paper <1%
Submitted to MCAST
18
Student Paper <1%
216.27.39.103
19
Internet Source <1%
www.tutorialspoint.com

20 Internet Source <1%


gelsana.com
21
Internet Source <1%
Submitted to Chester College of Higher
22 <1%
Education
Student Paper

Exclude quotes Off Exclude matches Off

Exclude bibliography Off

47
CL/BSCSD/18/32

48

You might also like