+ All Categories
Home > Documents > Pat Phase 2.docx

Pat Phase 2.docx

Date post: 25-Oct-2015
Category:
Upload: onfire0owch
View: 15 times
Download: 0 times
Share this document with a friend
Description:
IT P.A.T phase 2 for grade 11
Popular Tags:
27
1 PAT Phase 2 By Gorden-Dean Staats.
Transcript
Page 1: Pat Phase 2.docx

1

PAT Phase 2By Gorden-Dean Staats.

Page 2: Pat Phase 2.docx

2

Content/Index:Glossary…3

TOE Chart…3

Components & Data Structures…6

Data Structures…6

Variables…6

Arrays...8

Text File…8

Components…8

Data Base…8

Text File…9

Delphi 7…9

Input, Processing, Output…14

Error catching…17

Data Validation…17

Test Data…17

GUI…18

Data Base…19

ERD …21

Page 3: Pat Phase 2.docx

3

Glossary:P.N= possible name.

TOE= Task, Object and Task (acronym).

DB= Data Base.

IPO= Input, Process, Output.

GUI= Graphics user interface (Pronounced gooey).

ERD= Entity Relationship Diagram.

TOE Chart:Form1 (login, welcome and link to sign-up and password reset form (form2)).

T ASK O BJECT E VENT Containing the following objects.

Form1.frmWelcom(P.N)

OnActivation. ( as the program starts)

Welcoming Users. Show message procedure

OnFormActivate. (as the form is created)

Background of form. Image. imgBackground1(P.N)

OnFormActivate.

Allow user to sign-up. Button. btnSignup(P.N) clickAllow user to log-in Button. btnLoggon(P.N) clickExit program BitButton.

bitbtnExit(P.N)click

Provide user with a useful guide.

Button. btnHelp click

Form2 (sign-up, reset password).

T ASK O BJECT E VENT Contain the following objects.

Form2. frmSignup(P.N) OnActivation.

Page 4: Pat Phase 2.docx

4

Inform users of current location.

Show message procedure

OnFormActivate.

Allow users to input data regarding required fields.

Edit1. edtName(P.N) OnFormActivate.

Allow users to input data regarding required fields.

Edit2. edtSurName(P.N) OnFormActivate.

Allow users to input data regarding required fields.

Edit3. edtUserName(P.N) OnFormActivate.

Allow users to input data regarding required fields.

Edit4 + 5. edtPassword(P.N)2x edits to confirm password

OnFormActivate.

Allow users to input data regarding required fields.

Edit6. edtSQAnswer(P.N)(security question answer)

OnFormActivate.

Allow users to input data regarding required fields.

Edit7. edtAnswerSQ(P.N) OnFormActivate.

Allow users to input data regarding required fields.

Edit8. edtNewPass(P.N) OnFormActivate.

To create account Button. btnCreate(P.N) clickTo reset password Button. btnRecover(P.N) clickBackground for form Image.

imgBackground2(P.N)OnFormActivate.

Form 3 continues on next page please continue downwards!!! XD ↓

Form 3 (Main form, where users can take part in predictions and mange (by manage meaning view.)).

T ASK O BJECT E VENT Contains the following objects.

Form3. frmMain. OnActivation.

To allow users to change users or log out

Button. btnLogout(P.N) click

To allow users to make predictions

Button. btnPredict(P.N) click

Page 5: Pat Phase 2.docx

5

To allow users to manage predictions

Button. btnManage(P.N) click

Stores all predictions made.

Rich edit1. redPredictions(P.N)

OnFormActivation. Vertical and Horizontal scrolling (enabled).

Stores all the predictions user can take part in.

Rich edit2. redNews(P.N) OnFormActivation. Vertical and Horizontal scrolling (enabled).

Stores the entire user’s statistics.

Rich edit3. redStats(P.N) OnFormActivation.Vertical and horizontal scrolling

(enabled).

** Important to note**

The objects mentioned and tasks mentioned may change or vary from the program itself due to

Inexperienced programmer Restrictions due to program used New ideas by programmer More efficient ways to handle tasks More tasks required to increase user friendliness

That is all.

Page 6: Pat Phase 2.docx

6

Components & Data Structures:The components and data structures bellow are subject to change, as I have not given my project much thought at this point. This is simply a rough idea of what will be needed based on my ideas and research done into other peoples tasks (simply asking them what they used and why).

Data Structures:

Variable/Variables:String:

sName: To store the user’s name and input it into the DB.

sSurName: To store the user’s surname and input it into the DB.

sUserName: To store user’s user name and input it into the DB, the user name will be the name that all other users will see for example: KillerDuck9981.

sDateOfBirth: To store user’s date of birth and input into the DB, as well as confirming if the mentioned user is old enough to take part in the game. As it will consist of interaction between adults anonymously (people tend to swear a lot in these occasions).

sPassword: To store user’s password and input it into DB, as well as using it to confirm if his password is correct.

sEmail; To store user’s email and input it into DB, this will be used to contact user if anything has gone wrong or a complaint has been made against the user.

Page 7: Pat Phase 2.docx

7

Integer

iPredMade: This is to store all the predictions the user has made.

iPredCorrect: This is to store all the predictions that were correct.

iPredMiss: This is to store all the predictions that were incorrect.

**Above mentions is user specific. This means that this will be stored in another DB that will save the data**

iPoints: This will store points the user has accumulated through correct predictions and taking part in predictions.

iBonus: This is bonuses points that will be calculated by factoring in user’s accuracy. Important to note that participation points will not factor into this. It is also important to note that the amount will be rounded off, example: 1.9 = 2 and 1.3= 1.

iPartPoints: These are points the user will receive with respect to their level, for example a user ranked A will receive maximum participation points where a ranked B user will receive less than a ranked A user, maxed rank users will receive no Participation points.

iXpPoints: These points will received at the end of every prediction, as well as being purchased using your points. The higher the rank of the user the less XP they will receive.

Real

rAccuracy: this will store the users accuracy by dividing the predictions that are correct by the predictions incorrect.

Symbol

Page 8: Pat Phase 2.docx

8

cRank: Will display the rank of the user with a symbol ranging from A to SS as most games follow this ranking system.

Array/Arrays:aPredictions: This array will hold the predictions the user may take part in by randomly selecting one. As there is no online connection and this seems to be the easiest way to control the predictions and events.

Text File:tPredictions: Since every ‘event’ will contain a lot of information it would be easier to create numerous text files contain information on each ‘event’. This text file will be linked to the above mentioned array.

Components:

Date Base: There will be 2 databases that will be connected to the program (if this possible).

Data Base 1 Account details.

This data base will contain data on all the users that will create accounts in the program.

The importance of this data base is to control users and act as a log in server. By controlling users I mean limiting the amount of accounts a user can create, reasons behind this is so that the user does not take advantage of the system, by making 2 or more predictions on one ‘event’.

An example of this is User A creates 2 accounts A and B he then sets account A predictions that team A will lose, he then re-logs and sets account B that team A will win. This won’t affect or better his stats but he will earn points.

What a user can do with these points is yet to be decided.

Page 9: Pat Phase 2.docx

9

Data Base 2 User details.

With this data base the user’s statistics will be recorded.

For example: User has created account, account name is KillerDuck8199.

KillerDuck8199 takes part in a few ‘events’ and his accuracy is being recorded.

This data will be stored in this data base and will be displayed in the statistics section of his/her statistics tab (I am currently uncertain as to add a 4th form and create a proper statistics page or a so called profile page where other users can see it or access, basically user A can check out user B success in his predictions and other information regarding user B).

Text File:As this also fall under data structures I won’t go into so much detail but I feel as it also fall under component/components that the program will need to successfully entertain the user (as mentioned above) and ultimately solve the problem.

Delphi 7:The main component is Delphi 7 as it will act as the program and is also the main part of the solution. It is further divided below.

**The Delphi 7 components and their P.N and numbers were mentioned above in the TOE chart, this is simply a listing and the reasons for their existence (so to speak) **

Form/Forms:

Page 10: Pat Phase 2.docx

10

Form 1 Welcome, log in.

Below I will be mentioning some of the components that will be found on this form (Components of the form which eventually form part of the whole solution).

Buttons

For the solution I will need a few buttons to do the following tasks:

Allow the user to log-in. Allow user to sign-in. Reset password. Create a help function. Exit the programme.

Procedures/Procedure:

Show message Procedure, reason to welcome users as the program starts.

Image/Images:

Image, too enhance the GUI of the programme.

Form 2 Sign-up, Password reset.

Below I will be mentioning some of the components that will be found on this form (Components of the form which eventually form part of the whole solution).

Page 11: Pat Phase 2.docx

11

Buttons:

On this form I will need 3 (the amount I think I can make it work with)

One to reset password. One to proceed after account creation. One to reset or reload page (form).

Edit boxes and accompanying labels:

Under sign-up section of this form 2 will be need a few edits that accompany the fields in the DB 1 Account details.

Let me list roughly their names (just so that ma’am can get a rough idea, at this point I am yet to create my DBs):

User’s Name. Account Name (possible primary field). User’s Surname. Email address (possible primary field). Password. Password re-type (to make sure that is the user’s desired password and

that they know it). Security question answer.

Under the password reset section of form 2 the following edits and accompanying labels will be found:

Account name. New password. New password re-types. Security question answer (proof that is truly the original user that wants

to change the following details.

Please not there will be labels accompanying all of the above mentioned edits.

Page 12: Pat Phase 2.docx

12

Images/Image:

Image, too enhance the GUI of the programme.

Form 3 Predictions and or statistics.

Buttons:

I am currently not sure how many buttons I want on this form so I am going to list a few tasks that I will need buttons for as these are the only tasks I can see that I will require being for filled:

Manage predictions (basically view predictions made and track them). Logout. Create prediction. View stats.

Labels/Panels:

On these I will display the users rank and points gathered.

Rich edit/Rich edits:

There will be 2 so far on these 2 the following will be displayed:

Stats. Predictions made.

Image/Images:

Image, too enhance the GUI of the programme.

Form 4 Stats or User profile

Please note that this form is under discussion, management is currently uncertain whether to include it or not, they are currently disputing the fact that it will make the program better and grant more features to the program

Page 13: Pat Phase 2.docx

13

and user and make up for the programing team’s lack of programing knowledge and skill however it will also mean more work and management is quiet lazy.

If however it is created the following can be expected:

Button/Buttons:

These are just a few ideas brought forward by the creation team.

Purchase or Buy, this button will allow users to buy what they have selected on the buy form (5th form just came to me or a radio group however that will look sloppy while viewing another person’s profile).

Change avatar (considering creating an avatar image list or importing function to increase personalisation of accounts).

Edit. This will allow users to edit there profiles (highly improbable, extremely lazy).

Label/Panel:

Depending on the most suitable method of displaying the following I will consider either or a label or a panel.

Rank. Details about user (name, age, predictions). Accuracy. Predictions taken part in. Experience points. Points.

Image/Images:

This will consist of the Avatar and a background (possibly) each to achieve the own goal.

Increase account personalisation. Image, too enhance the GUI of the programme.

Page 14: Pat Phase 2.docx

14

Input, Processing, Output:This is a rough description of IPO, meaning in my processing it will simply cover the solution or the processing without any pseudo coding

I- User inputs account name.

P- Account name is verified by determining whether the name is taken or not.

O- User’s account name is valid, account name = to that account name.

I- User inputs account password (2*).

P-The 2 inputted passwords must be matched or matching if they are matching that the user may proceed.

O-The user may proceed in account creation.

I-User selects a security question and answers it.

P-The answer is unique to each user and is saved on the DB.

O-Used to determine whether or not the user is authentic

The above mentioned is simply based on account creation and account altering.

Below I will go into detail on inputs that require a algorithms to get the output.

Page 15: Pat Phase 2.docx

15

IPO, Input, Process, Output

I-User’s prediction, team A will win.

P-To determine whether or not the prediction is correct or not is simple: did team A win T/F, if T then users prediction is correct, if F then user prediction incorrect.

O- Amount of predictions correct = 1 or Amount of predictions correct = 0.

I- The Output above is an input in calculating the Accuracy of the user.

P- To calculate the Accuracy the Amount of predictions made will be divided number of predictions correct.

O- The user’s accuracy rating which will be displayed in the users stats.

I- Prediction correct = true.

P- Bonus points = points gained from prediction * accuracy.

O- Bonus points which will be added to the user’s end results of their prediction.

I- Prediction correct = true

P- The amount of points will be equal to the odds if the odds are 10 to 1 that the team you choose to win will lose then your points received are multiplied by 10 if the odds are 4 to 1 then it will be multiplied by 4.

O-Points received will be displayed in stats page.

I- prediction correct = true

P- The amount of experience gained will be more than if the prediction correct was false, this will also decrease as your level increase, for example if prediction correct = true then xp gained is x10 if your rand is S then xp gained is then divided by 9.

Page 16: Pat Phase 2.docx

16

O- This is added to your existing amount of xp.

I- Xp points = max then rank up.

P- Once the user’s xp points reach a certain point it will activate the rank up process. Basically xp points gained is = 100 and the max is 100 then they will rank up to next rank and xp cap will increase.

O- Rank up.

I-Purchase item X.

P- This will be controlled by a radio group; the item will have a price and if the user has enough points collected to cover the price then he/she can purchase the item. Points collected – price >= 0.

O-Then user now owns item X.

This concludes all the IPO data I can think about at the moment and I will be sure to add more in the actual program as I am unsatisfied with what I have at the moment and the further I get into my PAT phase 2 the more ideas that flow into my head and make it hard to concentrate on one simple topic.

Error Catching:Bellow I will be explaining how data will be validated in terms of the IPO.

Page 17: Pat Phase 2.docx

17

Data Validation:How to will the inputted data be validated? Simply by using test data, by test data pre-set sure to work data that I have proven that will work.

To make sure that no mistakes are made when the user is creating his or her account or mistakes are made while inputting data error messages will be displayed. For example while the user is creating an account and a certain field has been left open then a message will be displayed indicating the error the user has made, let us say that they forgot to input there account name an error message will be displayed saying ‘You have forgot to input account name, please go back and make sure you have filled everything in’.

Test Data:This is data I will use to make sure the program is functioning properly.

User Name/Account name: KillerDuck

Password: g0rd3n123145

User’s name: gorden

User’s Surname: Staats

User’s Email address: [email protected]

Security question: What was/is your first pet’s name?

Security question answer: Rexie

When this data is inputted then the users account will look like this:

Profile name: KillerDuck (the name other user’s will see).

Password: g0rd3n123145

And that’s it.

Page 18: Pat Phase 2.docx

18

GOOEY GUI:

Page 19: Pat Phase 2.docx

19

Data Base:The role of the database is to act as a database… by this I mean it much hold all of the data and this will then be displayed as information, as well as holding data it will act as a login in server so to speak by verifying inputted data by users. For example checking whether or not the inputted password is the same as the one in the DB itself.

My choice of fields so far is as follows:

Account Name: field size 30. Type: text. (Primary Key).

User’s Name: Field size 30. Type: text.

User’s Surname: Field size 30. Type: text.

Email Address: Field size 30. Type: text.

Password: Field size 10. Type: text.

Security question: Field size 30. Type: text.

Security question answer: Field size 30. Type: text.

Page 20: Pat Phase 2.docx

20

This is what the DB looks like.

Page 21: Pat Phase 2.docx

21

ERD:


Recommended