Ayate Revised Sds

You might also like

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

June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Addis Ababa Institute of Technology


Center of Information Technology and Scientific
Computing
Department of Software Engineering
Ayate Ethiopian Home Remedies
Software Design Specification
Team Members
Arisema Mezgebe
Eman Shemsu
Hawi Tesfaye
Hayat Delil
Iman Abdulselam
Mahder Haileslasse
Meba Feyissa

Advisors: Lisanu Tebikew


Fitsum Alemu May, 2016
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Table of Contents
List of Tables ................................................................................................................................................. i
List of figures ................................................................................................................................................ ii
Definitions, Acronyms, Abbreviations ........................................................................................................ iii
1. Introduction ........................................................................................................................................... 1
1.1 Purpose................................................................................................................................................ 1
1.2 General Overview ......................................................................................................................... 1
1.3Development Methods & Contingencies ............................................................................................. 2
2. System Architecture .............................................................................................................................. 2
2.1 Subsystem decomposition ................................................................................................................... 2
2.2 Hardware/software mapping ......................................................................................................... 4
3. Object Model ............................................................................................................................................ 5
3.1 Class Diagram ..................................................................................................................................... 5
3.2 Sequence Diagram .............................................................................................................................. 6
3.3 State chart Diagram ............................................................................................................................ 9
4. Detailed Design ......................................................................................................................................... 9
Reference .................................................................................................................................................... 19
Bibliography ............................................................................................................................................ 19
Web Resource ......................................................................................................................................... 19

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

List of Tables
Table 1: Definitions, Acronyms and Abbreviations ...................................................................................... iii
Table 2: General description of Professional class ..................................................................................... 10
Table 3: Attributes description for Professional class ................................................................................ 10
Table 4: Operation description for Professional class ................................................................................ 11
Table 5: General Description for VerifiedRemedy Class ............................................................................. 11
Table 6: Attribute descriptions for VerifiedRemedy class .......................................................................... 12
Table 7: Operation descriptions for VerifiedRemedy class ......................................................................... 12
Table 8: General Description for Submission Class..................................................................................... 12
Table 9: Attribute descriptions for Submission class .................................................................................. 13
Table 10: Operation descriptions for Submission class .............................................................................. 14
Table 11: General description of Registration Class ................................................................................... 14
Table 12: Attribute descriptions for Registration class ............................................................................... 14
Table 13: Operation descriptions for Registeration class ........................................................................... 15
Table 14: General description of CommentedRemedy Class ..................................................................... 15
Table 15: Attribute descriptions for CommenteRemedy class ................................................................... 16
Table 16: Operation descriptions for CommentedRemedy class ............................................................... 16
Table 17 : General Description of Database_Enquiry Class ........................................................................ 16
Table 18: Attribute descriptions for Database_Enquiry class ..................................................................... 16
Table 19: Operation descriptions for Database_Enquiry class ................................................................... 17
Table 20: : General descriptions for UserController class .......................................................................... 17
Table 21: Operation description forr UserController Class ........................................................................ 17
Table 22: Attribute descriptions for LoginController class ......................................................................... 18
Table 23: Operation descriptions for LoginController class........................................................................ 18

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian i


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

List of figures

Figure 1: Context diagram of Ayate ............................................................................................................. 1


Figure 2: Component Diagram Layer 1 ......................................................................................................... 2
Figure 3: Component Diagram Layer 2 ......................................................................................................... 3
Figure 4: Component Diagram Layer 3 ......................................................................................................... 3
Figure 5: Deployment diagram of Ayate ....................................................................................................... 4
Figure 6: Class Diagram of Ayate ................................................................................................................. 5
Figure 7: Sequence Diagram – Registering as a profeesional ....................................................................... 6
Figure 8: Sequence Diagram - Verify/Debunk............................................................................................... 7
Figure 9: State chart diagram - Verify/Debunk ............................................................................................. 9

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian ii


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Definitions, Acronyms, Abbreviations


Terms Definitions, Acronyms and Abbreviations

Ordinary User a user of Ayate that doesn't hold a 'Professionals' account

Professional Users users of the system who are certified herbalists and nutritionists
that will be provided with an account by the system

PHP5.3 Hypertext Preprocessor. An extensible scripting language,


suited for web-based development, typically embedded in
HTML.

HTML5 the fifth major revision of the Hypertext Markup Language


(HTML).

HTTP an application protocol that is the foundation of data


communication for the World Wide Web.
CSS3 the latest version of Cascading Style Sheet

MySQL a software used to manipulate database queries and commands

PHPStorm an Integrated Development Environment(IDE) that provides a


rich code editor for PHP, HTML and for many other computer
languages.
Model-View-Controller an approach to graphical user interface design that
system allowed for multiple presentations of an object and
separate styles of interaction with each of these
presentations.
SDS a description of a software design for a system to be developed
(Software Design
Specification)
Submitted (or submission) the page that views the list of remedies up for verification or
page debunking

Remedy page the page that displays the list of already added remedies

Debunk/Verify page the page that lists out remedies that have been commented on by
the professional users
Profile page i.e. Professional‟s profile page - the page that holds personal
information provided by professionals
Professionals’ login page the page that allows the professional user to login into his/her
account.
Table 1: Definitions, Acronyms and Abbreviations

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian iii


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

1. Introduction
1.1 Purpose
The purpose of System Design document is to translate the business requirements and business
processes into a technical design that will be used to develop the application.

1.2 General Overview


The implementation of Ayate will take a Model-View-Controller system architecture. MVC is
popular as it isolates the application logic from the user interface layer and supports separation of
concerns. Here the Controller receives all requests for the application and then works with the Model
to prepare any data needed by the View. The View then uses the data prepared by the Controller to
generate a final presentable response.

Within these discrete tiers are separate, self-contained components that will have clear boundaries.
This clear segregation of the system into sub-layers will help guarantee the maintainability of the
system. By applying a3-tier architecture, the application is expected to allow a fairly good
performance in the aspect of manipulating and dynamically accessing the immense amount of
data without affecting representation layers thus enhancing the maintainability of Ayate.

The choice of the MVC architectural model was with the aim of fulfilling another key element of
the system‟s requirements, which is security, to a greater margin.MVC provides a good foundation
for implementing security components at the interfaces of each level. The context diagram of the
systems application with the specified model is as follows:

Figure 1: Context diagram of Ayate

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 1


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

1.3Development Methods & Contingencies


The development of “Ayate Ethiopian Home Remedies” system will include the following:

 It will be written in HTML5 and PHP5.3. HTML5 – the latest version of HTML- allows
writing clear and descriptive codes. PHP is known for object oriented coding which
makes it preferable to use. It suites the Ayate system development because it allows to
create dynamic web pages easily and quickly. Additionally, the latest version of web
styling, CSS3, will be used for beautifying the website.
 Since the system will be database driven, MySQL Community Server will be used as it is
intuitive and has decent documentation.
 The tool that will be used is PHPStorm. This IDE provides a rich code editor for PHP and
HTML with syntax highlighting and code completion. It is preferable because it is very
fast considering its size, supports many frameworks, and allows comparing other codes
and compiling these different codes.
 This system will be running on Apache Web server. Apache is closely available as it is
cheap

2. System Architecture
2.1 Subsystem decomposition

Figure 2: Component Diagram Layer 1

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 2


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Figure 3: Component Diagram Layer 2

Figure 4: Component Diagram Layer 3

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 3


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

2.2 Hardware/software mapping

Figure 5: Deployment diagram of Ayate

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 4


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

3. Object Model
3.1 Class Diagram

Figure 6: Class Diagram of Ayate

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 5


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

3.2 Sequence Diagram

Figure 7: Sequence Diagram – Registering as a profeesional

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 6


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Figure 8: Sequence Diagram - Verify/Debunk

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 7


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 8


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

3.3 State chart Diagram

Figure 9: State chart diagram - Verify/Debunk

4. Detailed Design
This section shows the detailed implementation of the classes from the class diagram, sequence
diagram and state diagram.

Professional Class

Professional
-name: String
- phone: String
-work Address:String
- email:String
- experience: String
- occupation: String
- qualification: String
- gender: String
- userName: String
- Password: String

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 9


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

- changePassword(password, String newPassword): void


+ changeWorkInformation(): void
+changePersonalInformation(): void
+ verifyAccount(userName, password ): Boolean
Table 2: General description of Professional class

Attributes description for Professional class

Attribute Type Visibility Invariant


name String Private Name <> NULL and must contain first, middle and last
name and shouldn‟t contain special characters and integers.
phone String Private Phone <> NULL must not be less than10 digits and must
start by +251/09
workAddress String Private Address <>NULL

email String Private Email <> NULL


 Must contain @
 Must contain. (dot)
 Position of @ >1
 Position of (dot)>position of @ + 2
 Position of (dot)+3<= total length of email address and
the total character of the Email is at least 5 characters

experience String Private experience <> NULL

occupation String Private Occupation <> NULL

qualification String Private Qualification <> NULL

gender String Private Gender should be either “Female” or “male”

Username String Private userName <> NULL and shouldn‟t contain special characters
and integers.
Password String Private Password <>NULL, it must be greater than 4 digits and it
can contain special characters, integers and characters.
Table 3: Attributes description for Professional class

Operation description for Professional class

Operation Visibility Return Argument Pre-Condition Post Condition


type
changePassword() Private void -Password The user should be The user‟s
-String logged in as a password should be
newPassword professional user. reset.
CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 10
Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

chageWorkInformation Public void . The user‟s work The user‟s work


information information should
should exist . be change.
changePersonalInformation Public void - The user‟s The user‟s personal
Personal information should
information be changed.
should exist.
verifyAccount Public Boolean -username The user should The user should be
-password have a professional logged in as a
account. professional user.

Table 4: Operation description for Professional class

VerifiedRemedy Class

VerifiedRemedy
- submittedRemedy:String
- submittedDisease:String
-submission_id:Integer
- numberOfRate: Integer
- category: String
- description: String
- date: Date

+ verify(submission_id): Boolean
+ changeNumberOfRate(submission_id): Integer

Table 5: General Description for VerifiedRemedy Class

Attribute descriptions for VerifiedRemedy class

Attribute Type Visibility Invariant


submittedRemedy String Public submittedRemedy <> NULL

submittedDisease String Public submittedDisease <> NULL

Submission_id Integer Public Submission_id <> NULL

numberOfRate Integer Public numberOfRate <> NULL

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 11


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

category String Public -

description String Public Description <> NULL

Date Date Public Yyyy-dd-mm

Table 6: Attribute descriptions for VerifiedRemedy class

Operation descriptions for VerifiedRemedy class

Operation Visibility Return Argument Pre-Condition Post-Condition


Type
Verify Public Boolean Submission_id Remedies to be The Remedies
verified(debunked) should be
should exit verified(debunked)
changeNumberOfRate Public Integer Submission_id The Remedy The number of
should have initial verification the
number of remedy has should
verification. change.
Table 7: Operation descriptions for VerifiedRemedy class

Submission Class

Submission
-remedyName:String
-DiseaseName:String
- category: String
- description: String
-Submission_id: integer
- noOfVotes: Integer
- submissionDate: Date
- submitterEmail: String

+ addSubmitted(List<<submissionInfo>>): Boolean
+ getSubmisson(List<<submissionInfo>> ): String[][]
+getVoteNumber(submission_id): integer
+changeVoteNumber(submission_id): integer

Table 8: General Description for Submission Class

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 12


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Attribute descriptions for Submission class

Attribute Type Visibility Invariant


remedyName String Private remedyName <> NULL

DiseaseName String Private DiseaseName<> NULL

Category String Private -

Description String Private Description <> NULL

NoOfVotes Integer Private -

Submission_id Integer Private Submission_id <> NULL

submissionDate Date Private Yyyy-dd-mm

submitterEmail String Private Email <> NULL


 Must contain @
 Must contain. (dot)
 Position of @ >1
 Position of (dot)>position of @ + 2
 Position of (dot)+3<= total length of email
address and the total character of the Email is
at least 5 characters
Table 9: Attribute descriptions for Submission class

Operation descriptions for Submission class

Operations Visibilit Return Argument Pre- Post-Condition


y Type Condition
addSubmissions Public Boolean List<<submission - The new
Info>> submitted
remedies should
be added
getSubmissions Public String[][] List<<submission The Submitted The chosen
Info>> Remedies remedies detail
should exist should be
returned
getVoteNumber public integer Submission_id The submitted The submitted
Remedy remedy‟s
should have number of votes
an existing should be
CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 13
Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

vote number. returned


ChangeVoteNumber publlic integer Submission_id The Submitted The submitted
Remedy remedies vote
should have number should
an existing be changed.
vote number
Table 10: Operation descriptions for Submission class

Registration Class

Registration
- fName:String
- mName: String
- lName:String
- qualification: String
- occupation: String
- gender: String

- matchInformation(List<<information>>): Boolean
+ addProfessional(List<<information>>): String
Table 11: General description of Registration Class

Attribute descriptions for Registration class

Attribute Type Visibility Invariant


fName String Private fName<> NULL and it shouldn‟t contain special
characters and integers.

MName String Private it shouldn‟t contain special characters and integers.

lName String Private lName<> NULL and it shouldn‟t contain special


characters and integers.
Qualification String Private -

Gender String Private Gender should be either “female” or “male”

Table 12: Attribute descriptions for Registration class

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 14


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Operation descriptions for Registration class

Operations Visibility Return Argument Pre-Condition


Post-
Type Condition
matchInformation private Boolean List<<information>> - The
submitted
remedy‟s
number of
votes should
be returned
addProfessional Public String List<<information>> matchInformation The user
method should should
return a „true‟ successfully
value. be added as a
professional
user.
Table 13: Operation descriptions for Registeration class

CommentedRemedy Class

CommentedRemedy
-commentedDate: Date
- commentContent: String
- commentOnType: String
- remedyName: String
- diseaseName: String

+commentOn(List<<commentInfo>>): String
Table 14: General description of CommentedRemedy Class

Attribute descriptions for CommentedRemedy class

Attribute Type Visibility Invariant


commentedDate Date private Yyyy-dd-mm

commentContent String private commentContent<> NULL

commentOnType String private -

remedyName String private remedyName <> NULL

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 15


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

diseaseName String private diseaseName<> NULL

Table 15: Attribute descriptions for CommenteRemedy class

Operation descriptions for CommentedRemedy class

Operations Visibility Return Argument Pre- Post-Condition


Type Condition
commentOn Public String List <<commentInfo>> The remedy The user should
to be comment on the
commented remedy.
on should
exist.
Table 16: Operation descriptions for CommentedRemedy class

Database_Enquiry Class

Database_Enquiry
+conn: database Connection

+connect(String query): String


+searchRemedy():String[][]
+searchComment():String[][]
+searchSubmittedRemedy(): String[][]
Table 17 : General Description of Database_Enquiry Class

Attribute descriptions for Database_Enquiry class

Attribute Type Visibility Invariant


conn Database Public -
Connection
Table 18: Attribute descriptions for Database_Enquiry class

Operation descriptions for Database_Enquiry class

Operations Visibility Return Type Argument Pre- Post-


Condition Condition
connect Public String String query The database The connection
should exist with the
database
should be

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 16


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

established
searchRemedy public String[][] - The remedy There should
should exist in be a search
the database result for
remedy
searchComment Public String[][] - The There should
comments be a search
should exist in result for
the database comment
searchSubmittedRemedy Public String[][] - Submitted There should
remedies be a search
should exist in result for
the database submitted
remedy
Table 19: Operation descriptions for Database_Enquiry class

UserController class

UserController

+isSignedIn(): Boolean
Table 20: : General descriptions for UserController class

Operation descriptions for UserController class

Operations Visibility Return Type Argument Pre- Post-


Condition Condition
isSignedIn Public Boolean - - The users sign
in status should
be returned.
Table 21: Operation description forr UserController Class

LoginController class

LoginController
- userName: String
- password: String

+isVerified(username, password): Boolean


Table 21: General descriptions for LoginController class

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 17


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Attribute descriptions for LoginController class

Attribute Type Visibility Invariant


userName String Private userName <> NULL and shouldn‟t contain special
characters and integers.
Password String private Password <>NULL, it must be greater than 4
digits and it can contain special characters,
integers and characters.
Table 22: Attribute descriptions for LoginController class

Operation descriptions for LoginController class

Operations Visibility Return Type Argument Pre- Post-


Condition Condition
isVerified Public Boolean -username - The users
-password should be
verified as a
professional
and the status
should be
returned.
Table 23: Operation descriptions for LoginController class

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 18


Home Remedies
June 6, 2016 [SOFTWARE DESIGN SPECIFICATION]

Reference

Bibliography
 Kidus Makonnen, Tibebe Solomon, Fraol Chala, Eyob Solomon, Dereje Mengistu

(Deccember 2015), Software Design Specification:Identification System

 Videk(May 2004), Software Design Specification: Inserter Vision Report System

 Ian Sommerville (2011). Software Engineering 9.Boston: Pearson Education, Inc.

Web Resource
 Tutorials Point

http://www.tutorialspoint.com/struts_2/basic_mvc_architecture.htm at May 20, 2016

CENTER OF INFORMATION TECHNOLOGY AND SCIENTIFIC COMPUTING | Ayate Ethiopian 19


Home Remedies

You might also like