Sunday, April 23, 2006

Project #1: Jeopardy

COMPUTER SCIENCE 20S – PROJECT #1
“JEOPARDY”


Your job here is going to be to create the most REALISTIC AND CREATIVE game of jeopardy using all your knowledge of V.B. so far. Here are some things MUST to be included in your game:

- Your board must have at least THREE CATEGORIES.


- Your board must have winnings of $100, $200, $300, $400 and $500 for each category.


- You must also have a “DOUBLE JEOPARDY” section that is to commence once regular jeopardy is completed, with THREE NEW CATEGORIES and winnings of $200, $400, $600, $800 and $1000 for each category.


- In each of the two “parts” of jeopardy you must have a daily double, where the player gets to make a wager of part of all of their earnings so far before they attempt the question.


- There will also be a FINAL JEOPARDY where each contestant is asked to make a wager of their earnings and then have 30 SECONDS to come up with an answer. The winner will be declared after that.


- When each general question is being asked (ala Alex Trebec) there will be 8 SECONDS for any player to “try” and answer.


- Now, since there is only one mouse, there truly wont be any “competition” as who answers the question first, just come up with a way to differentiate which player answers first, and have that player get the money if they’re right.


- If that player is incorrect, then the other player still has an opportunity to answer, time pending.


- This game will be a TWO-PLAYER game only.


- For each new question to come up, you will have to find some way to manually “select” each question from your “board.”


- You can make up each of the questions yourself, just make sure they have ONE-WORD ANSWERS.


- Players should be referenced by their names through out the game.

- As a reminder, this project will most definitely require you to come in for extra time outside of regular class hours, either in the mornings or on your spares or at lunch.

RUBRIC:

> How user-friendly is your game? / 10
> Does it “look” and “feel” realistic? / 10
> Construction and look of the board. / 10
> Player reference throughout the game. / 5
> How questions are asked. / 5
> How questions are selected. / 5
> Transition between questions / 5
> Cumulative winnings are functioning properly for each player. / 10
> Transition to ‘Double Jeopardy”. / 5
> All “times” working accordingly. / 10
> How “visual” is everything? / 10
> Player names, cumulative winnings, …
> What happens to a question on the board, once its been asked? / 5
> Effort, neatness of code, constants, organization of form(s). / 10

TOTAL: / 100


DUE: TUESDAY, MAY. 23, 2006

Wednesday, March 22, 2006

Who's the scribe today???

.... O.o
o.O

Friday, March 17, 2006

Long weekend post!

Hey folks,

Hope you guys had a productive class on Thursday while I was away sick. Just a reminder that "What's on the Menu?" is due next week and from what I saw on Wednesday, people are progressing quite nicely. I have to say that I think that you guys have come a long way since the beginning of the course. The "visual" part of VB is not too hard to learn, the labels, command buttons, list boxes, ...etc. It's the actual programming part that involves the difficult concepts of coding. Things like If-Then statements, For-Loops, Functions are the fundamental building blocks of programming. From what I can see in the past few weeks you guys seem to be grasping most of these basic building blocks.
So overall I just wanted to say that I'm proud of what I'm seeing so far and to keep working hard and stick with it. Programming is an art and you have, and will have more, many little tools to use along with basic fundamentals that you, the artist must decide which tool(s) to use given a task. Just like an artist is master of creating depth, fading, 3-D imaging, sharpness, and other features individually, he or she must use their knowledge about art to decide which one of their "tools" to use for each painting. For those of you who like sports, such as basketball, I played in highschool, here at DMCI and I still play organized basketball all the time. When I have the ball and I want to get past my check, I've got to decide, in a matter of 5 seconds or less, should I drive, make a jumpshot, post-up, fake a shot, pass the ball away or wait for a pick. The concept is still the same. The only difference is I have less than seconds to decide which "tool" is best for the job at hand.
Have a great weekend folks and see you on Monday!!

Wednesday, March 15, 2006

Nothing Really to Scribe About...

Well... lets see.... today was a work period so there is nothing really new to tell... We have tomorrow and Monday then this is due... Well I hate to make a post this short but I really have nothing at all to say... Well I don't know what else, there isn't really a scribe list so I don't know who's done it this cycle already... So I guess the next scribe is Margaret... Well good luck everybody!

Tuesday, March 14, 2006

Sweet I'm Scribe XD



Today we got our new assignment it is called ... "What's on the menu?" . Well , in this assignment we are give a couple tasks .

First we have to make it password protected . This part is probably The easiest part . I'm not exactly sure if I can type some code for this assignment so I'm not going to bother . For this part make sure that it is NOT case sensitive . Also make sure that the password is "MENU"

*hint hint * You have to use Ucase()

The second thing I is that We must use 4 different forms .One for the Math marks menu option.

For this option you must allow the user to enter three test marks and the prgram should find the AVERAGE , MEDIAN , and , the last on I forgot . This I find my be a problem when I start it . I thing for this one at home you should plan it out if you don't have Visual Basic just in so you can pass this one without much problems .

The second thing we must do in this assignment is the Easy as MNO ? This one should be the easier than the Test thing because we have done something like this . But this time we must stop the user from putting more than exatly five name in the list boxes . That is pretty easy.


The third is the "The Greeting" menu option . This one require you knowlegde of using the & function also our lesson from yesturday using loops . For information on that read the last post made but Mary Ann not Mr.Malandrakis . O.o For this one we have to make the user type how long their name is and an input box poping up asking for the letters in there name I'm guessing one by one . Then a msgbox saying , "Hello usersname ...". For this one suggest using what Mr.M told us about IsNumeric function . I would explain it but I still don't fully understand it .

Now for the the Introduction you have to make a nice form that will make the user think the program is cool I guess . So you have to make stuff move and use the right colors and make it like awesome .

The final thing is to end the program *cough cough* ( Use end on the select case for the menu . Just Type End there and that part is done ) .

Remember Use lots of menu for almost everything and you will be fine this project should be easy to finish but time consuming . You also have only 3 days to complete this so use your lunch times and Mornings to get this done . I mean waking up at 6:00 to make it to school isn't gonna kill anyone ... At least I hope so X( ... . That is all .


The next scribe I will choose is .. . I dont know maybe Graeme or someone XD

Monday, March 13, 2006

Is Michael today's scribe?

Hey folks,

Based on the last short scribe below I'm assuming Michael is tonight's scribe. Now the reason I'm posting today is because today's class is a VERY IMPORTANT one. If by chance Michael dosen't make a post by 8:00 pm at the latest, could someone please be the "fill-in" scribe for tonight and make a post covering today's class? That would be greatly appreciated.
Also don't forget to check out the "Built-in VB Functions" link in the "Links" section below. If you recall I mentioned on Friday that this was up. It includes all a lot of little conversion functions and so on. Very much worth checking out as you will end using most of these at some point. Have a great night folks!!

For...Loops

Today Mr. Malandrakis introduced something new to us in class called For Loops. It's used when you know exactly how many times you want to do something.

Before we started working on the code, we were told to put a list box, a command button, and a menu on our form. Our menu had to be called For Loop, and we had to have 7 sub menus.

First step was to declare our variables.


Dim n, x As Integer 'DUMMY COUNTERS USED AS LOOP COUNTERS
Dim userNumber As Integer


We're using "n" and "x" as the variables since it's easier to type rather than using "counter".

Next we needed to bring up the click event for the command button, which we named "cmdClear" because that would clear what was in the listbox.


Private Sub cmdClear_Click()

lstClear.Clear

End Sub


Now next we had to bring up the event for the sub menu. I named mine "mnuLoop". Under that line of code we typed in the select case statement.


Private Sub mnuL_Click(Index As Integer)

Select Case Index

Case 0...

...Case 6

End Case


Now this is where the actual looping begins. For the first Case (Case 0) we had to make a message box pop up 5 times. To do this, you have to first type in "For", then your variable which is "n". when looping you want to put the number that you want to start off with, and the number you want to end at. In this case we want the loop to start at 1 and end at 5. To end the code you'll have to type in "Next n". This is what the code looks like..


Case 0

For n = 1 To 5 'LOOP WHICH EXECUTES 5 TIMES MESSAGE BOX SHOWS UP 5 TIMES

MsgBox "Hi"

Next n 'WHEN PUTTING n IT LETS YOU INCREASE BY ONE EACH TIME.


Oh..and you have to remember to indent..I can't really do that here on blogger..


For case 1 we want to add the loop counter into the list box. for this one, we were told to make the loop go from 1 to 7.

Case 2 'NUMBERS FROM 1 TO 7

For n = 1 To 7 'LOOP EXECUTING 7 TIMES

lstNumbers.AddItem n 'ADDING THE LOOP COUNTER TO THE LISTBOX EACH TIME THROUGH THE LOOP

Next n

Case 2, we had to make the loop count from 1 to 15, but by 2's. since it's starting at one it would be counting by odd numbers. (ex. 1-3-5-7-9...15). When going up by a certain number you have to add in the word "step" in your code. When you add "step" it means to increase by that much each time in the loop.

Case 2 'ODD NUMBERS

For n = 1 To 15 Step 2

lstClear.AddItem n

Next n

Case 3: We wanted the user to enter a number of their choice in an inputbox.


Case 3 'ASK ME

userNumber = InputBox("PLEASE ENTER A NUMBER", "NUMBERS")

'FOR LOOP SHOWING ALL EVEN NUMBERS STARTING AT ZERO
'AND STOPPING AT THE NUMBER ENTERED BY THE USER.

For n = 0 To userNumber Step 2

lstClear.AddItem n

Next n


Case 4: We had to put a loop inside another loop...


Case 4 'NESTED LOOPS

'IN NESTED FOR...LOOPS THE INSIDE LOOP EXECUTES
'COMPLETELY FOR EVERY "STEP" OF THE OUTSIDE LOOP.

For n = 1 To 3 'OUTSIDE LOOP EXECUTING 3 TIMES

For x = 1 To 4 'INSIDE LOOP EXECUTING 4 TIMES

lstClear.AddItem "HI"

Next x 'END OF INSIDE LOOP

Next n 'END OF OUTSIDE LOOP

'"HI" WILL SHOW UP 12 TIMES IN THE LISTBOX.

In case 5 were to start the loop from 100 to 1 and go down by one. Also, to make it divisible by 3. When counting down by 1 you would have to add a negative sign (-) in front of the number. In this loop we had to include an If statement.

Case 5 'multiples of

For n = 100 To 1 Step -1

If n Mod 3 = 0 Then

lstClear.AddItem n

End If

Next n

Last one. In Case 6 we had to make the loop go from 16000 to 1 and go by multiples of 27. Your basically doing the same thing that you did in Case 5, except your changing some bumbers.

Case 6 'multiples of 27 between 1 and 16000

For n = 16000 To 1 Step -1

If n Mod 27 = 0 Then

lstClear.AddItem n

End If

Next n

End Select

For the remainder of the class we looked at the solution for "Motion in the Ocean" We looked at Graeme's because he completed it and got his to work out. GOOD JOB GRAEME !

And that's what we learned and did today. I hope I explained things well and didn't leave out anything important..If I did, I'm real sorry >.<

Next scribe will be Micheal. Since he really wants to to be the next scribe. =D

Saturday, March 11, 2006

XD Can I be Scribe Next ???

Can I be scribe next after Mary Ann lol . =]