From the course: Visual Basic Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Marble draw with lists - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Solution: Marble draw with lists
(upbeat music) - [Narrator] Welcome back. How did you make out with that last challenge? I hope you had some success. I'd like to go over my solution. Please remember it might be different than yours. So here's the UI. We want to draw some items out of the golden bucket. So the first time we play the game, we got 23 blue marbles, 29 red marbles. We pulled the golden marble out at position number 53. And the current average is 53. The next time I draw, I use the insert way of adding items to list box, so this is the second drawing. I made 17 blues, 19 reds, the furthest I got was 37, and now my average is 50. So every time I click on this button we play a game to completion. Now I can click on the clear button to clear out those list box. And then I can click on this one to run the simulation 1,000 times. So there's 1,000 items in each of these list boxes. And my average is 50.87. Now my computer with my…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Explore the collection classes5m 44s
-
(Locked)
Create new collections4m 49s
-
(Locked)
Add, remove, and interact with items from list8m 37s
-
(Locked)
Iterate over list5m 39s
-
(Locked)
Interesting list properties4m 42s
-
(Locked)
Work with extension methods2m 40s
-
(Locked)
Use LINQ with lists5m 14s
-
(Locked)
Quick look at other collection classes2m 19s
-
(Locked)
Challenge: Marble draw with lists3m 32s
-
(Locked)
Solution: Marble draw with lists4m 41s
-
(Locked)
-
-