You are on page 1of 23

0

Sample VSS

Dog Shelter
IT PAT- Phase 1

1
Table of Contents
Scenario and Scope....................................................................................................................2
Problem/Task Description......................................................................................................2
Possible Solution and scope...................................................................................................2
User requirements.....................................................................................................................3
Navigation/Flow Diagram..........................................................................................................4
Data Structures..........................................................................................................................5
Database design.....................................................................................................................5
Database - Table relationship.................................................................................................6
Class Description and class diagram.......................................................................................7
Text files and arrays................................................................................................................8
Gui Design..................................................................................................................................9
IPO............................................................................................................................................14
Data Input.............................................................................................................................14
Data Processing....................................................................................................................16
What processing will be done.........................................................................................16
Data Output..........................................................................................................................19

2
Scenario and Scope
Problem/Task Description

One of the biggest issues in today’s world is stray animals, especially dogs. In almost every
neighbourhood or township, there is a handful of stray and neglected dogs. Many dog
shelters arise but face many difficulties. The main problem is managing administrative work
with limited employees or helpers. Because most dog shelters are non-profit and do not
generate much money so they cannot employ a lot of workers. The task of this program is to
assist a new non-profit dog shelter, Nishkar’s Dog Shelter, in administrative work. This
involves keeping electronic records of dogs and adoptions that take place. This will help the
shelter be organised and prevent the need of employing many workers to do administration
work.

Possible Solution and scope

This software will be focused on storing and managing records for the shelter. The database
will store dog details, guardian details and the adoption details. Dog details will consist of a
dogID (generated), name, breed, size, age, weight, gender, date arrived, whether the dog is
neutered, vaccination date, short description ,picture ,location and finally whether the dog
is adopted or not. Guardian details will consist of guardianID(generated), first name,
surname, contact details and address. Adoption details will consist of
adoptionID(generated), dogID, guardianID, date of adoption, sponsored amount and
whether it was in cash, rating and whether the dog was returned or not.
The program will only have two users: an admin and visitor. The admin will be able to make
changes to existing records and initiate new ones, which includes dog, guardian and
adoption details. The admin staff will be able to view dogs available for adoption and
statistics about the dog shelter. Visitors will be able to log on or create an account with the
dog shelter. The purpose of creating an account is to initiate adoption proceedings. This will
then be authorised by admin staff. Visitors also have the option of not signing up, but they
can view dogs at the shelter

3
User requirements

Login as an Administrator

View/add/edit/remove
Dog Details

View/add/edit/remove
Guardians Details

View adoptions
Conduct adoptions
Edit adoptions
Admin Undo Adoptions

View Dogs available for adoption Visitor

Create account or log in

View Admin Statistics


Money received
Number of breeds
Number of dogs
Number of adoptions
Number of dogs available for
adoption
Number of male guardians
Number of female guardians
Age groups of guardians
Average rating

View dogs available for adoption


And Information about dog
shelter

4
Navigation/Flow Diagram

Welcome page

Log in as admin or continue as a


visitor

admin visitor

Log in or create
Dog/guardian/adoption details account
Make changes to records
Delete records
Create new records
View statistics and trends
Successful adoptions
Number of current dogs
Statistics about dogs View statistics and View dogs available
information about for adoption
Statistics of guardians
dog shelter
Average rating

5
Data Structures
Database design
tblDogs

Field Data type Field size


DogID Short Text 6
DogName Short Text 20
Breed Short Text 25
Size Short Text 6
Age(in years) Number Double
Adopted Yes/No -
Weight(kg) Number Double
Gender Short Text 1
DateArrived Date/Time Short Date (YYYY/MM/DD)
Neutered Yes/No -
VaccinationDate Date/Time Short Date (YYYY/MM/DD)
Description Short Text 100
Picture Short Text 20
Location Short Text 3

tblGuardians

Field Data type Field Size


GuardianID Short Text 13
FirstName Short Text 25
Surname Short Text 25
Email Short Text 25
ContactNo Short Text 10
PhysicalAddress Short Text 25
Area Short Text 20
Password Short Text 12

tblAdoptions

Field Data type Field Size


AdoptionID Short Text 9
DogID Short Text 15
DateOfAdoption Date/Time Short Date (YYYY/MM/DD)
SponsoredAmt Currency -
Cash Yes/No -
Rating Number Double
GuardianID Short Text 13
Returned Yes/No -

6
Database - Table relationship

7
Class Description and class diagram

Guardian Details

-fFirstName : string
-fSurname : string
-fEmail : string
-fContactNumber : string
-fMonthlyIncome : integer

+Constructor create(fname,sSurname,sEmail,sContact:string,iMonthlyIncome:integer)
+GetFirstName(): string
+GetSurname():string
+GetEmail(): string
+GetNumber():string
+GetMonthlyIncome():integer
+SetMonthlyIncome(iWages:integer)
+ValidEmail(sEmail:string)
+ValidContact(sNumber:string)
+ValidString(sString:string)
+Qualify():Boolean

Class description

The class is used to validate the visitor’s information and determine whether they
qualify for adoption. The class has functions to check for digits in strings such as first
name and surname. There is also a method to check if the number and ID number is
valid. It checks if the number consists only of 10 digits and that the ID number is 13
digits.
To check if the visitor qualifies for adoption the class receives the visitor’s monthly
income. If the monthly income is R10 000 or more, the visitor qualifies otherwise
they do not.

8
9
Text files and arrays

Text files
Text file to store time and date visitors browse through available dogs. Text file will be used
to calculate number of visitors per day/ in a month.
Use of text file to store admin username and password.

Arrays
One dimensional array to store months of the year. Another one dimensional array to store
number of visits per month.
The arrays will be used to display the visits per month and can be used to determine the
busy months to allow for planning to accommodate visitors and possible adoptions.
Information will allow for advertising / promoting adoptions in the quieter period.

10
Gui Design

11
12
13
14
15
IPO
Data Input
Adding a Dog

Input Source DataType/ GUI Validation Error message


Format Component
Dog Name Keyboard String TEdit Check if not empty Ensure Dog Name
And only letters is entered.
Size Of Dog Keyboard String TComboBox Check if size was Please enter a size
selected of the dog from the
combo box
Breed Keyboard String TEdit Check if not empty Please enter a valid
breed is entered.
Age Keyboard Integer TSpinEdit Check if not left on Please enter a valid
zero age for the Dog

Weight in KG Keyboard real TEdit Check if not empty Enter valid weight
Check if only for Dog
numbers have
been entered
Gender Keyboard String TRadioGroup Check If one was Please select
selected gender of dog
Date Arrived Keyboard DateTime- TDateTimePicker Check if date Please select a
shortdate entered is valid and valid date for date
(YYYY/MM/DD) current of adoption
Vaccination Keyboard DateTime- TDateTimePicker Check if date Please select a
Date shortdate entered is valid valid date for date
(YYYY/MM/DD) of vaccination
Colour Keyboard String TComboBox Check if colour was Please select colour
selected

16
Picture file Computer String TButton Check if a picture Please insert a
name files- was inserted picture for dog
browse
Adopted Keyboard Yes/No TCheckBox - -
Neutered Keyboard Yes/no TCheckBox - -

Guardian sign up

Input Source DataType/ GUI Validation Error message


Format Component
ID Number keyboard String – 13 TEdit Check if 13 digits Enter Valid ID
digits Check if Unique ID exists in database
First Name Keyboard String TEdit Check if not empty and Enter Valid first
only letters entered name

Surname Keyboard String TEdit Check if not empty and Enter Valid surname
only letters entered

email Keyboard String TEdit Check if not empty Please enter a valid
email
Contact Keyboard String-10 TEdit Check if not empty and Please enter a valid
Number digits only 10 digits contact number

Address Keyboard String TEdit Check if not empty Enter Address

Physical Area Keyboard String TEdit Check if not empty Please enter an area
Password Keyboard String TEdit Check if not empty Enter Password

17
Data Processing
What processing will be done

 show dogs that are available for adoption


 search for specific breed of dog
 search for dogs in different age groups
calculate total sponsored amount and average
Update tblDogs
 Update tblGuardians
 Update tblAdoptions
Delete a dog from database
Delete a guardian from database
add a new dog to database
add a new guardian to database
determine number of breeds
determine number of adoptions
determine number of dogs available for adoptions
determine the age group of guardians

How will processing be done

Generate DogID
Input name, breed, gender, age
Part 1first 2 letters of name
Part 2first 2 letters of breed
Part 3gender
Part 4– generate 2 random values
DogIDpart 1+part 2+part 3+part 4

18
Adding a new dog
Input breed
input size
input age
input no
input weight
input gender
input date arrived
input neutered
input date of vaccination
input description
load picture
input location
Open tblDogs
Go to last record
Set tblDogs into insert mode
tblDogs[‘DogID’]generate dogID
tblDogs[‘Breed’]breed
tblDogs[‘size’] size
tblDogs[‘Age(in years)’] age
tblDogs[‘Adopted’] no
tblDogs[‘weight(kg)’] weight
tblDogs[‘Gender’] gender
tblDogs[‘DateArrived’] date arrived
tblDogs[‘Neutered’]neutered
tblDogs[‘VaccinationDate’] date of vaccination
tblDogs[‘Description’] description
tblDogs[‘Picture’] dogID + ‘.jpg’
tblDogs[‘Location’] location
post record to tblDogs
close tblDogs

19
Calculating total sponsors and average
Total0
Num0
Open tblAdoptions
Go to first record
While not eof tblAdoptions
begin
Total  total + tblAdoptions[‘SponsoredAmt’]
Num  inc(num)
Go to next record in tblAdoptions
end
Averagetotal/num
Output total, average

Searching by breed of dog


Input breed
Open tblDogs
Go to first record
While not eof tblDogs
Beginning of loop
If breed=tblDogs[‘Breed’] then
Output Dog name
Dog age
Dog size
Picture of Dog
Else Go to next record
End of loop

20
Data Output
Dog Details

Output Data Type- Format Component


Dog Name String TEdit/ DBgrid
Size String TComboBox/DBgrid
Breed string TEdit/ DBgrid
Age integer DBgrid/TSpinedt
Adopted Boolean - Yes/No DBgrid/ TCheckbox
Weight Real - fixed DBgrid/TEdit
Gender String – male/female TRadioGroup/DBgrid
Date arrived DateTime(Short date) (YYYY/MM/DD) TDateTimePicker/ DBgrid
Neutered Boolean - Yes/No TCheckbox/DBgrid
Vaccination Date DateTime(Short date) (YYYY/MM/DD) TDateTimePicker/DBgrid
colour String TComboBox/DBgrid
Picture Timage TImage
Description String richEdit

21
Adoption Details

Output Data Type- Format Component


DogID String TEdit/ DBgrid
GuardianID String TEdit/DBgrid
Sponsored Amount Real - Currency TEdit/ DBgrid
cash Yes/No DBgrid/TCheckBox
Rating integer DBgrid/ TSpinEdit
Date of Adoption DateTime(Short Date) DBgrid/TDateTimePicker
(YYYY/MM/DD)
Returned Yes/No TCheckBox/DBgrid

22

You might also like