You are on page 1of 41

2012

IT418 C# Programming Project

INFORMATICS COMPUTER SCHOOL DIT PROJECT (IT418 C# PROGRAMMING) < Philippine Charity Sweepstakes Office Lottery Digits Generator >

Name/s: Lim, Ma. Carmen N. Address: 37 Padua St. BFRV LPC, M.M. Student No.: 0000 - 7999 Lecturer: Sir Rudrian Riener Parias Center: 0535 Country: Republic of the Philippines

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project TABLE OF CONTENTS I. Description and details of game to be simulated p.3 p.4 p.5 p.6 p.7 pp.8 - 11 p.12 pp.13 - 27 p.28 pp.29 - 30 pp.31 - 37 p.38 p.39 p.39 p.40 p.41

II. Specification 2.2 Input Specification 2.3 Screen Design 2.4 Program Design 2.5 Validation and processing III. Program Listing IV. Testing 4.1 Test Plan 4.2 Test Cases 4.3 Test Log 4.4 Screen Dumps V. Implementation 5.1 User Manual VI. Conclusion 6.1 Strengths 6.2 Weaknesses 6.3 Enhancements VII. Critical Appraisal ACKNOWLEDGEMENTS

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project CHAPTER I: DESCRIPTION AND DETAILS OF GAME TO BE SIMULATED A Lottery Digit Generator Machine for Philippine Charity Sweepstakes office is the motif of this documentation. Practically, the machine is going to be used to randomly select winning lottery digit combinations in general for all categories of the said game. It is going to be digitally composed following the concepts of visual C# language. Now, C# is another variant of an Object Oriented Programming language developed by Microsoft which combines C++ principles into the rich environment of Visual basic that supports windows-application-tools. The computer language is basically kept simple yet can perform as much tasks as other programming platforms. It was actually designed to be comprehensible to developers as it still follows through C language concepts. What sets C# language apart among other programming format is that, it works with the .NET Framework which provides a comprehensive and consistent programming model for building applications that have visually stunning user experiences and at the same time enforces Simple Object Access Protocol (SOAP) which doesnt require developers to put additional codes for repeating a behavior in a program. Thus, C# language is deemed appropriate to design and craft our PCSO Lottery Digit Generator because of its convenient encryption of syntaxes that works well with streamlined visuals which make it light to operate. 0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project CHAPTER II: SPECIFICATION 3.1 Input Specification These are the data to be entered to run the lottery digit generator, where in, there is only one text input on the number of draws then most of them are buttons.
Lottery Digits Generator (frmLotto)

Input Variable

Text textBox21

Description This is used to enter a draw number that counts a session. This button should be pressed one at a time per draw attempt in a game session. This button should only be pressed after a singular attempt on drawing winning lotto numbers. This button is pressed last after drawing and sorting the winning lotto numbers as it saves those as used in DB.mdb. This button can be pressed whenever the user feels like closing the application. This button is only necessary if a user wants to view technical details about the game system and exit the program. This command is pressed if the user was curious about technical detail of the game system. Press this command to exit. This command is pressed to direct the user on how to use the controls of the PCSO ottery digits generator. About (frmAbout) Pressed whenever the user feels like leaving that message box. Help (form1) Pressed whenever the user feels like leaving the help screen.

Data Type String

Size

textBox21

pbNextDraw

NextDraw >

n/a

W,H (121 , 30)

pbSort

Sort Numbers

n/a

W,H (92 , 28)

btnStore

Store Digits

n/a

W,H (92 , 27)

pbEnd2

END

n/a

W,H (121 , 30)

toolStripMenuItem1

File

n/a

W,H (121 , 30)

miAbout

About

n/a

W,H (121, 30) W,H (121, 30) W,H (121, 30)

miExit

Exit

n/a

mibtnHelp

Help

n/a

btClose

button1

OK

n/a

W,H (121, 30)

0535 - 0000 7999 (I-DIT)

Close

n/a

W,H (121, 30)

2012
IT418 C# Programming Project 3.2 Screen Design frmLotto.cs File About Exit Help menuStrip1 PCSO Lottery Draw label2 pictureBox1 PCSO.jpg
Winning lotto numbers for: DD MM YY labelDayTime

groupBox1 Panel3

Next Draw >


pnNextDraw label3 Draw No: textBox21

Label6

6 Digit:

1
11 15 18 20

2
10 14 17 19

3\ 9
13 16

4 8
12

5 7

pbSort btnStore

Label7 5 Digit: Label8 4 Digit: Label9 3 Digit: Label10 EZ2:

pbEnd2 TextBox
SORTED!! labelSort

Panel2 Panel1
May the luckiest one win!! Label5

Form1.cs (Help)
Label1 HOW TO:

frmAbout.cs

richTextBox1

picture Box1

Label1 Label3

Button1

0535 - 0000 7999 (I-DIT)

btnClose

2012
IT418 C# Programming Project

3.3 Program Design 3.3.a Program Flow Chart


START

End Button Pressed

B
Enter a Draw No 1st

Other Buttons pressed?

Help Button

frmAbout frm = new frmAbout(); frm.ShowDialog();

What Button pressed?

Other Buttons pressed?

Store Button Pressed

File Button
Form1.cs pops up

Next Draw Button Pressed

Sort Button Pressed

MS Jet will append all lottery data items into DB.mdb

C
About or exit button?

Exit Button Pressed

Label4.Text will count the number of draw attempt. textBox1 to textBox20 shall randomly pick digits according to a type of lottery game.

Sorts all numbers drawn in textBox1.Text to textBox2.Text in ascending order.

The freshly drawn digits are written in DB.mdb as USED numbers.

About Button pressed

All drawn numbers in textbox1 to textBox20 is sorted! labelSort .text = Sorted!!

frmAbout frm = new frmAbout(); frm.ShowDialog();

frmAbout Appears

Close Button Pressed

TERMINATE

0535 - 0000 7999 (I-DIT)

Label4.text = draw attempt no. then GrandLotto, 5D, 4D, 3D, EZ2 digits displayed in textBox1 to textBox20 sporadically.

2012
IT418 C# Programming Project

3.4 Validation and processing A Validation Check will be conducted in this section of the PCSO Lottery Digits generator to keep inputs specific and ensure that these inputs are executing the correct process.
Check No. Data Name Input Type Uniqueness Length Range Process

textBox21

Draw Num

A draw number counts a session and should only accept integers 1 <= 365

The numbers are entered manually here which cannot be null and are subject to change every draw.

Only three numbers are allowed to be entered into the draw Number textbox.

Limited to three digits only as in ### upto 365 as to a year

Gets draw number data then stores it in a database when store digits button is clicked.

pbNextDraw

Next Draw

Lottery Numbers are going to be randomly generated On Click! Lottery Numbers will be sorted in ascending order once clicked. Lottery Numbers will be saved in an external database to be rendered as used. This option in the menu strip will drop down about and exit submenu. This option will show the user some technical information about the lottery machine. This option will open a short manual for the user if theyre clueless with the Lottery program. Will close the About screen On Click!! Will close the Help screen On Click!! Will Exit the entire program On Click!

This button is responsible for drawing winning lottery numbers per session. This button is pressed after drawing the lottery numbers. This button is pressed after drawing and sorting the lottery numbers.

N/A

N/A

Initiates the Random Number selector from 1 to 66. Sorts lottery digits in ascending order. Stores lottery data into an external db file via OLEDB Menu bar item that contains about and exit sub menus. Menu bar sub item that contains details about the lottery machine. Menu bar sub item that shows a manual to the user for the lottery machine. Closes about modal dialog. Closes help modal dialog. Closes the whole program.

pbSort

Sort Numbers

N/A

N/A

btnStore

Store Digits

N/A

N/A

toolStripMenuI tem1

File

Pressed whenever the user feels like it.

N/A

N/A

miAbout

About

Pressed whenever the user feels like it.

N/A

N/A

mibtnHelp

Help

Pressed whenever the user feels like it.

N/A

N/A

btClose

Close

Pressed whenever the user feels like it. Pressed whenever the user feels like it. Pressed whenever the user feels like it.

N/A

N/A

Button1

OK

N/A

N/A

10

pbEnd2

END

N/A

N/A

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project CHAPTER III: Program Listing This is a preview of Visual C# Codes used to construct the PCSO Lottery Digits Generator Machine complete with line numbers.

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

1 0

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

//lines 185 to 205 private void btnStore_Click(object sender, EventArgs e) { objConnection = new OleDbConnection(strConnection); objConnection.ConnectionString = strConnection;

objConnection.Open(); //the SQL query code stretches all the way straight to the right in the actual code view in the editor. strSQL = "INSERT INTO UsedNums (NumID, GrandLotto1 , GrandLotto2 , GrandLotto3 , GrandLotto4 , GrandLotto5 , GrandLotto6 , 5D1 , 5D2 , 5D3, 5D4, 5D5, 4D1 , 4D2, 4D3 , 4D4 , 3D1 , 3D2 , 3D3 , EZLotto1 , EZLotto2 ) " + "VALUES ( '" + label21.Text + "','" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + textBox12.Text + "','" + textBox13.Text + "','" + textBox14.Text + "','" + textBox15.Text + "','" + textBox16.Text + "','" + textBox17.Text + "','" + textBox18.Text + "','" + textBox19.Text + "','" + textBox20.Text + "')"; objCmd = new OleDbCommand(strSQL, objConnection); objCmd.ExecuteNonQuery(); MessageBox.Show("the DIGITS has been stored into a database located at the 'bin' project folder of this machine to be marked as USED!!"); }

private void pbEnd2_Click(object sender, EventArgs e) { Console.Beep(); Application.Exit(); } } }

1 1

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project CHAPTER IV: TESTING

4.1 Test Plan


The PCSO Lottery Digits Generator, of which is essential for drawing winning numbers for that sort of game, has already completed the development phase by now. To ensure the quality of this gaming system, a series of test cases should be done to see if there are any underlying defects to correct in the program. The machine will be manually tested based on its Physical and Logical Aspects. Where in, the essential statements and syntaxes will be the data to be evaluated in this phase. Basically, there are measures to be observed and they are objectives that this testing should achieve and are listed below as follows: To ensure that all the objects in the program are functional. To see if statements and syntaxes in the program are in accord and execute commands systematically. To make sure that the program runs without any errors.

Therefore, it is necessary for the PCSO Lottery Digits Generator to undergo testing so there will be guarantee that it will run flawlessly. This procedure also helps the developers to detect errors that have been over looked during the creation stage. The testing process shall now commence turning on the next page. 0535 - 0000 7999 (I-DIT)

1 2

2012
IT418 C# Programming Project

4.2 Test Cases Test Case No.


01 Checking if the about option within the file menu opens a

Objective

window that displays technical details for the PCSO lottery digits generator.

Test Data

frmAbout frm = frmAbout(); frm.ShowDialog();

new

When the about option is selected from the file menu its Expected Test Result code should execute and display a window that contains technical details about the PCSO Lottery Digits Generator.

Actual Result

Conclusion

No sign of any errors. 0535 - 0000 7999 (I-DIT)

1 3

2012
IT418 C# Programming Project

Test Case No.

02

Objective

To see if the code for opening the Help window works.

Test Data

frmHelp frm = new frmHelp(); frm.ShowDialog();

The code should enable the help command in the menu strip Expected Test Result open a help window when clicked.

Actual Result

Conclusion

No Visible Errors. 0535 - 0000 7999 (I-DIT)

1 4

2012
IT418 C# Programming Project

Test Case No.

03 To test whether the syntax for returning the current date and

Objective

time necessary to chronicle the number draws in the lottery digit generator works.

Test Data

DateTime dt = new DateTime(); dt = DateTime.Now; DateTime dt1 = DateTime.Today; this.labelDaytime.Text = dt1.ToLongDateString();

The label for the date and time of the Lottery Digits Expected Test Result Generator should update to the present day.

Actual Result

Conclusion

The data is Error-Free. 0535 - 0000 7999 (I-DIT)

1 5

2012
IT418 C# Programming Project

Test Case No.

04 Checking if the textbox for entering a draw number to count a

Objective

single lottery machine session accepts data then writes it in the UsedNums table of an MS Access Database .

Test Data

The number of draw attempts should be entered into its Expected Test Result designated textbox and count a lottery digits generator session or draw attempt and record that in a database.

Actual Result

Conclusion

No errors visible.

1 6

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

05 Seeing if the Next Draw button actually selects random

Objective

numbers in the twenty textboxes and counts the number of draws made.

Test Data

The Next Draw button should randomly load numbers in the Expected Test Result textboxes and count the number of draws at the same time.

Actual Result

Conclusion

No Existing Errors.

1 7

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

06

To see whether sort numbers button rearranges the numbers

Objective

in the twenty text boxes into ascending order.

Test Data

Once the sort numbers button is pressed it should rearrange Expected Test Result the winning numbers shown in the twenty text boxes into ascending order.

Actual Result

Conclusion

No Errors Detected. 0535 - 0000 7999 (I-DIT)

1 8

2012
IT418 C# Programming Project

Test Case No.

07

To check if the store digits button actually saves the winning

Objective

number combination data into a database once clicked.

Test Data

When the store digits button is pressed it should save winning number combination data into a database once Expected Test Result clicked. A Message box should prompt to indicate to the user that data has been written into a data base to mark as used.

Actual Result

Conclusion

No Existing Errors.

1 9

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

08

Objective

To see if the END button exits the application altogether.

Test Data

Console.Beep(); Application.Exit();

The end button should terminate the whole Lottery Digit Expected Test Result Generating system once clicked.

Actual Result

The application closed in a beep.

Conclusion

Runs successfully without errors.

2 0

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

09

Seeing if the exit command in the File Menu terminates the

Objective

lottery digit program once clicked.

Console.Beep(); Application.Exit();

Test Data

The exit command should terminate the whole Lottery Digit Expected Test Result Generating system once clicked.

Actual Result

The application closed in a beep.

Conclusion

No errors detected.

2 1

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

10

Checking if the OK button of the help window confirms and

Objective

leaves that screen.

Close();

Test Data

When the OK button is clicked it should confirm and leave Expected Test Result the help window.

Actual Result

The OK button works as expected.

2 2

0535 - 0000 7999 (I-DIT)

Conclusion

No Errors Found.

2012
IT418 C# Programming Project

Test Case No.

11

To test whether the close button of the about form leaves its

Objective

window back to the lottery digits generator interface.

Test Data

this.Close()

When the close button of the about form is clicked it leaves Expected Test Result the screen back to the lottery digits generator interface.

Actual Result

The close button works as expected.

Conclusion

No visible errors. 0535 - 0000 7999 (I-DIT)

2 3

2012
IT418 C# Programming Project

Test Case No.

12

Checking if the Ole Db connection actually communicates with an MS

Objective

Access Database through its data source.

Test Data

strConnection ="Provider=Microsoft.Jet.OleDb.4.0; data source=..\\DB.mdb;"; objConnection = new OleDbConnection(strConnection); objConnection.ConnectionString = strConnection; objConnection.Open(); strSQL = "INSERT INTO UsedNums (NumID, GrandLotto1 , GrandLotto2 , GrandLotto3 , GrandLotto4 , GrandLotto5 , GrandLotto6 , 5D1 , 5D2 , 5D3, 5D4, 5D5, 4D1 , 4D2, 4D3 , 4D4 , 3D1 , 3D2 , 3D3 , EZLotto1 , EZLotto2 ) " + "VALUES ( '" + label4.Text + "','" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + textBox12.Text + "','" + textBox13.Text + "','" + textBox14.Text + "','" + textBox15.Text + "','" + textBox16.Text + "','" + textBox17.Text + "','" + textBox18.Text + "','" + textBox19.Text + "','" + textBox20.Text + "')"; objCmd = new OleDbCommand(strSQL, objConnection); objCmd.ExecuteNonQuery();

The connection is tested through database explorer and should inform Expected Test Result the user that the test connection succeeds.

Actual Data

Conclusion

No errors detected.

2 4

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

13

To test if SQL statement in the Lottery Digits Generator actually

Objective

updates a table in an MS Access Database and is recorded as used.

Test Data

strSQL = "INSERT INTO UsedNums (NumID, GrandLotto1 , GrandLotto2 , GrandLotto3 , GrandLotto4 , GrandLotto5 , GrandLotto6 , 5D1 , 5D2 , 5D3, 5D4, 5D5, 4D1 , 4D2, 4D3 , 4D4 , 3D1 , 3D2 , 3D3 , EZLotto1 , EZLotto2 ) " + "VALUES ( '" + label4.Text + "','" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + textBox12.Text + "','" + textBox13.Text + "','" + textBox14.Text + "','" + textBox15.Text + "','" + textBox16.Text + "','" + textBox17.Text + "','" + textBox18.Text + "','" + textBox19.Text + "','" + textBox20.Text + "')";

The SQL statement should insert the winning lottery digits of all game Expected Test Result types into a table in and MS access database.

Actual Result

Conclusion

Runs successfully without errors.

2 5

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

14

To see if the random number generator is only limited to 66

Objective

digits.

Test Data

Random rnd = new Random(dt.Millisecond); for (int i = 1; i < c; i++) { numb[i] = rnd.Next(1, 66); }

Winning numbers for the lottery number genny should only Expected Test Result return digits upto 66.

Actual Result

All the winning numbers drawn were less than or equal to 50.

Conclusion

No visible errors.

2 6

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

Test Case No.

15

To check if labelSort.Text shows the word SORTED!! to

Objective

indicate that the winning numbers are sorted.

Test Data

this.labelSort.Visible = false; this.labelSort.Visible = true;

The word SORTED should show up to indicate that the Expected Test Result winning numbers are already sorted in ascending order.

Actual Result

Conclusion

The data is absolutely error free. 0535 - 0000 7999 (I-DIT)

2 7

2012
IT418 C# Programming Project

4.3 Test Log


PCSO Lottery Digits Generator Test Log Project: IT418 Event: N/A System: Gaming Date: 2012.05.26 Build: C Sharp Time: 3:20 -4:30 PM Config: N/A Tester: Ma. Carmen Lim Tool: Visual C# 2008 Express Edition Result: No Errors Detected

Test Script Test Case: 1 Passed: Yes Test Case: 2 Passed: Yes Test Case: 3 Passed: Yes Test Case: 4 Passed: Yes Test Case: 5 Passed: Yes Test Case: 6 Passed: Yes Test Case: 7 Passed: Yes Test Case: 8 Passed: Yes Test Case: 9 Passed: Yes Test Case: 10 Passed: Yes Test Case: 11 Passed: Yes Test Case: 12 Passed: Yes Test Case: 13 Passed: Yes Test Case: 14 Passed: Yes Test Case: 15 Passed: Yes Metric: LOC 211 Metric: LLOC 69 Signature: Ma. Carmen N. Lim

Results Version Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Failed: No Deferred: No Metrics Calculation: n/a Calculation: n/a Date: 2012.05.10

Result Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free Comment: Error-Free

2 8

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project

4.4 Screen Dumps


LOTTO DIGITS GENERATOR FORM This is the actual interface Lottery of Digit

Generator where lucky draws

actually occur in quadratic Textboxes the Next once Draw

Button is clicked. Numbers are

then sorted via the Sort Numbers button and stored into a database via the Store Digits button. ABOUT WINDOW This window pops up once the user, click on the File Menu from the bar on top of the Lottery Digits Generator Screen. It only shows the technical details that associates with the game system in terms of the date of creation, version, the author and licensing. 0535 - 0000 7999 (I-DIT)

2 9

2012
IT418 C# Programming Project STORED ITEMS MESSAGE BOX This pops up once the user clicked on the Store Digits Button on the Lottery Digits Generator interface to indicate that the winning lottery digits drawn was stored in a database and is rendered USED.

HELP WINDOW This window shows up when the help menu is clicked from the bar atop the lottery digit generator machines interface. It displays context on how to operate the gaming system.

3 0

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project CHAPTER V: IMPLEMENTATION 5.1 User Manual This section of the documentation is compelled to explain to the user the proper utilization of PCSO Lottery Digits Generator. Again, the purpose of the machine is to generate winning number combinations for all categories of that game of luck. Technically, the Lottery system is crafted in C Sharp Programming language which streamlines items contained in a particular windows form application. This type of C language can work with robust graphical user interfaces which would need prerequisites to run. So before we begin with directives on how to operate this lottery digit generator we should first determine System Requirements for the user to take note and obtain. The machine is best suited for the later versions of windows which are XP and 2007 since it is crafted using visual C# 2008 Express Edition.
Software Requirements Microsoft Visual Studio 2008/ 2010 Express Edition (Freeware) Hardware Requirements Central Processing Unit Hi-Res Monitor keyboard Windows XP Home/ Professional Minimum Pentium 233-megahertz (MHz) processor 64 MB RAM 1.5 gigabytes (GB) HDD Recommended Pentium 300-megahertz (MHz) processor 128 MB RAM 1.5 gigabytes (GB) HDD Mouse PowerBox

USB Port/ CD Rom DVD Drive Windows 7 Recommended

1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64) processor 1 gigabyte (GB) RAM (32-bit) or 2 GB RAM (64-bit) 16 GB hard disk space (32-bit) or 20 GB (64-bit) DirectX 9 graphics device with WDDM 1.0 or higher

Super VGA (800 x 600)

Super VGA (800 x 600) driver

3 1

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project Once the user has already acquired the system requirements for running this machine, we can now prepare the Lottery Digits generator for installation for starters. PCSO Lottery Digits Generator Setup: There are two means of installing the Lottery Digits generator into the users desktop and that would be either a USB device or CD RW that can be either Manual or Wizard, read ahead for the procedures. A. USB device installation: One way to install the PCSO Lottery Digits Generator Machine is via a USB device or commonly referred to as the flash drive. Initially the developer will provide the file you will transfer then just follow these quick steps: 1.) Pull out your USB flash drive wherever and plug it in a USB port the users desktop should automatically recognize the device and should automatically direct a user to its removable disk drive. Open that drive. NOTE: you can manually locate your USB drive on MY COMPUTER!! 2.) Once the USB removable disk drive is opened you will immediately see the Lotto Folder in there, copy paste that into your desktop to transfer it . 0535 - 0000 7999 (I-DIT)

3 2

2012
IT418 C# Programming Project B. CD-RW Installation (Manual) : This is another method in installing the PCSO Lottery Digits Generator into the users desktop it is also a simple task of transferring a file. The CD RW will be provided by the developer initially upon request by the way. 1.) Feed the PCSO lottery digits generator CD-RW into the computers CD ROM drive. Wait for it to load then it will prompt the user to open a folder. NOTE: The user can manually open the CDROM local drive in MY COMPUTER too. 2.) Once the CDROM local drive is opened the user will see a zipped Lotto folder Copy and paste then right click >> extract that into the desktop and taddah!! The system is transferred. After the installation we shall proceed to opening then operating the Lottery Machine. B.1. CD-RW Installation (Wizard): 1.) From the PCSO Lottery Machine CDRW, extract zipped folders into desktop first then the user will see theses icons on the window. They can double click any of the two icons to install the application. 2.) Once double clicked an application warning will show, dont feel threatened by that message for that is normal. Ignore the warning and click install. 0535 - 0000 7999 (I-DIT)

3 3

2012
IT418 C# Programming Project 3.) Right when install button was clicked the Lottery Machine will be automatically start and installed into windows program files and will show up in the all programs panel when the user hits the start button. Opening and Operating the PCSO Lottery Digits Generator Machine:

1.) We

have the

now Lotto

transferred

folder into the desktop all we have to do now is double click it.

2.) Locate the lotto icon that looks like this in the face of that folder. 0535 - 0000 7999 (I-DIT)

3 4

2012
IT418 C# Programming Project

3.) After clicking the ICON the MICROSOFT Visual Studio 2008 Express Edition Editor will appear from there go to the solution explorer then double click on frmLotto.cs

Click frmLotto.cs TWICE!!

4.) The user is now in the designer view of the program 0535 - 0000 7999 (I-DIT) they dont have to do anything but press the play button. PAK!!

3 5

2012
IT418 C# Programming Project The Program is now running, we shall now control our PCSO Lottery Digits Generator. Its interface will just be explained for this phase. Area where drawn Lottery Numbers will Appear!

REQUIRED: Before you can use the controls you should input a draw number into the textbox provided. MAIN CONTROLS: A.) To draw lottery number simply press Next Draw > button it will start selecting numbers in random according to the lottery game type. Notice the Draw No label change to indicate the count of attempts. B.) To sort out the numbers simply click Sort Numbers Button. C.) Click Store Digits to store winning digit combinations into MS Access database. A message box will inform the user that the data has been saved when this is successful. ADDITIONAL Controls: END to close the program. FILE to view about dialog box. HELP- built in tutorial for the lottery machine. 0535 - 0000 7999 (I-DIT)

3 6

2012
IT418 C# Programming Project Store Number Button Usage: Lets say, the user has already drawn winning lottery digits and stored it database using the Store Digits button in the machines interface. in a

A Message box that states the lottery digits are stored into a database so they will be marked as USED. When this happens the user can view the numbers stored in a database so they can take note of it. To do that they should go to the database explorer in the visual studio interface of the lottery solution then expand the table folder then right click on the UsedNums table 0535 - 0000 7999 (I-DIT) and click retrieve data. The stored digits will be displayed in that tables field right away

3 7

2012
IT418 C# Programming Project CHAPTER VI: CONCLUSION 6.1 Strengths

The PCSO Lottery Digits Machine is now fully operational and has surpassed the development and trial stages, as stated earlier, following through the discipline of C# language.

The gaming system holds to its promise as a mechanically efficient tool than its predecessor as it can now draw numbers from 1 to 66 accurately in textboxes by assigning them into an array that is then handled by a random selector.

There is an algorithm at the back end of this lottery system to ensure the credence of the winning number combinations that were drawn by the machine. After the numbers have been drawn it can be sorted by a button in a descending order to keep things organized.

What makes this program all the more special is that it has a storage feature that writes the winning digits drawn into an MS Access Database for the purpose of eliminating the numbers that have been used.

Finally, the Lottery Machine has been topped off with a label that shows the current date and time of a draw to chronicle the session. There is also a label that counts the number of attempts the lottery machine made a draw. Therefore, the machine is certified marvelous! 0535 - 0000 7999 (I-DIT)

3 8

2012
IT418 C# Programming Project 6.2 Weaknesses As much as there are a bundle of good points about the PCSO Lottery Number Generating Machine there are fault areas in it and blame that to the noobieness of the programmer. Since the developer is only a student in Informatics Filinvest at this time she still has a lot more to learn about this branch of information technology but the fact that she was able to add the important details makes her competent. However, having the lottery numbers stored in an external database for elimination will trouble the user to view it in a distant folder where in they constantly have to find that source file. Generated lottery numbers are not automatically removed from the random selection so the users will need to consciously note down the numbers used from its inclusive database and remember that.

6.3 Enhancements The PCSO lottery machine can improve by adding another feature which allows users to view the USED lottery winning numbers in a table of a database in a subform within the machine so they wont have to leave the program to check what has been appended in there. Lottery digits that have been drawn should be deleted automatically when it has been generated so the user wont have to take note of the numbers manually and avoid drawing digits many times to achieve 0535 - 0000 7999 (I-DIT) desired results.

3 9

2012
IT418 C# Programming Project CHAPTER VIII: Critical Appraisal This is where the documentation for PCSO Lottery Generating machine comes to an end and the developer is asked to write closing remarks and insight pertaining to the creation of this project. She would like to impart that it has been enjoyable creating a program in C# because it is very light and easy to use and much convenient that other C language formats. It works very well with .NET Framework and employs Simple Object Access Protocol to keep syntaxes into a minimal. Connecting C# programs into a database is also very easy accompanied by the database explorer panel as well for supervision. The developer would like to create more games using the computer language in the future but unfortunately C# language has been depreciated according to a mentor and is rarely used these days. Perhaps the developer can only use C# for recreation and leisure only unless it becomes a necessity again someday.

4 0

0535 - 0000 7999 (I-DIT)

2012
IT418 C# Programming Project ACKNOWLEDGEMENTS First of all, My special thanks to the almighty God who blessed me with the capability to complete such tasks, my family and friends who encouraged and supported me in my education through out. Extending my credits to the hard work and dedication of the entire management and staff of Informatics Filinvest Alabang meant for our quality education. My utmost gratitude to Sir Rudrian Riener Parias for ensuring we learn every crucial lesson there is regarding C# programming wit respects to game development.

4 1

0535 - 0000 7999 (I-DIT)

You might also like