Saturday. 5.17.08 1:31 pm
I did the math in school because I was bored. As it turns out, my pizza program can yield over 4,200 meal combinations. Tell me if my logic is wrong.
First, the toppings. This is the most convoluted part. There are five toppings.
Any one topping: can be represented by all one digit numbers from one to five; 5
Any two toppings: all two digit numbers from 11 to 55 with only the numbers 1,2,3,4, and 5 and no doubles; 20
Any three toppings: all 3 digit numbers from 111 to 555, etc, no triples, not counting the numbers that are just in a different order (like, 124 and 142); 123, 124, 125, 134, 135, 145, 234, 235, 245, 345...I can't think of any other combinations, so 10.
Any 4 toppings: Only four possible combinations. 4
And, add one for all five and another for none at all. That's 41 total combinations.
Second comes the Extras. There are three things to choose from, with 4 choices each: three flavors and NONE. 4 chips * 4 cookies * 4 drinks = 66.
41 topping combos * 66 extra combos = 2706. That's already a lot. Double that because there are two sizes of pizza to choose from, and you get...5412.
Is it just me, or is this a HUGE number? Please check my logic, especially that for the toppings.
EDIT: Thanks to Zanzibar, I noticed that the any two toppings number can't be correct. It's 10, not 20. I forgot to exclude repeating numbers like I did with the triple and quadruple digits. The new total is 4,092. (Haha, what a difference.)
I finally downloaded it!
Thursday. 5.15.08 7:34 pm
After much planning and begging, I finally got Visual Basic on my home computer. For free. It's the Express Version. But still.
As you can see below, I kind of had to...steal the link from my teacher. She said I couldn't e-mail myself, but she said nothing about blogging!
I was really looking forward to being able to finish my work at home. Sometimes she gives us a program to do, and I...overhaul it. The most recent adventure was the pizza order program. Series of events, anyone?
Objective: Create a program that offers 4 different toppings on two sizes of pizza, with the price based on the size and number of toppings. Add a button that confirms that the order has been made. Put a randomly generated order number somewhere. (Easy)
Next, I went back and...
added a readout on the price that automatically updates when choices are made, with a sub price for size, one for toppings, and a total;
created a "plain cheese" choice that set the topping price at 0;
made a "Clear" button that set everything to the default values;
added the "Add Pizza" button, which prints a CUSTOM "receipt" to a text box, complete with sub totals and topping list;
made sure that the Add Pizza button was bug free, flexible, and had decent grammar in the face of adversity;
made almost all of the labels into a currency format, (one was and still is really stubborn...);
added "extra cheese" as a 5th topping;
integrated the new topping into the Add Pizza function
added cookie, chips, and drink options, each with its own sub-price;
integrated the EXTRA options into the up-to-date price indicator, making a label for all three new subprices;
updated the TOTAL label to accommodate three new values;
created three choices for cookies, chips, and drink to choose from;
made up the new variables needed to add this information to the receipt, so that it now shows order number, pizza size and price, all toppings and price, and extras that only appear if you add them. The flavor of drink, cookie, and chips are all included if selected(TON OF WORK);
changed the number generator from 1-100 to 1-1,000,000 just for kicks;
adjusted the receipt to be more pleasing to the eye and better organized;
changed the text from the order confirmation to something remotely cool and personal.
There. Done. If you still can't see how much I overhaul certain projects, then just pretend that you do. I made one program from scratch, called Bouncing Balls (shut up). It was supposed to be a screen saver of one ball bouncing around inside an undefined border. First it was side to side, then two dimensions. Then it was an extra ball, operating on a separate rig of timers and everything. Then it was the pause button, then the option (when paused) to change the direction of the ball and the current position. Then it was the option to show the borders (which is neat because the borders for the different balls overlap a little). When I got finished with that, I went crazy and added...
A rave function. That's right. There's a button that says "rave" on it, and when you click it, ALL the colors flash between regular blue-orange color scheme and inversed. Everthing. It's like lights flashing on and off, hence the RAVE title. Then I ripped some sounds from a song called Beato and recreated a party boy noise that goes off in time to the flashing. Then I added buttons to change the tempo.
That is, of course, not counting the literal hundreds of bugs I had to figure out. We're talking about, say, 10 pages of unorganized jumble that I somehow kept in my head. (It certainly isn't there anymore. I doubt I could edit this very well anymore)
I LOVE programming in this class. You may have forgotten, but the point of the post is to say how I got VB at home and how excited I am.
(VB is not an STD, haha.)
This newer version, however, is far more complicated than the one from school. It had to "invoke the upgrade engine" just to read the files I brought from school. It's a one way converter; I can't bring home projects to school for work. D:
Also, my program, which had virtually no bugs, no longer works because certain things don't fly the same with VB8 as with VB6. Which dampens my spirit.
Thankfully, I was shown this:
OH and I forgot to mention. My eye hurt for one or two days, I posted about it, and it stopped hurting. So no pink eye for me! MY POINT IS MADE!
Thursday. 5.15.08 3:49 pm
THE COOLEST music video
Monday. 5.12.08 5:12 pm
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
NuTang is the first web site to implement PPGY Technology. This page was generated in 0.015seconds.
|All content © Copyright 2003-2047 NuTang.com and respective members. Contact us at NuTang[AT]gmail.com.|