O'Reilly Forums: A Day At The Races - Having A Lot Of Trouble - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

A Day At The Races - Having A Lot Of Trouble

#1 User is offline   TomB360 

  • New Member
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 02-April 14

Posted 07 August 2014 - 11:54 AM

I've worked through the book up to the first lab - A Day at the Races - and I'm stuck. I haven't got a clue where to start, all I've got is the code snippets from the book. Is it supposed to be that hard, or am I missing something? Do I need to go back and re-read the chapters I've already done?

This is the first time learning a programming language and I felt like I was doing ok up until this point.

#2 User is offline   AndrewStellman 

  • Andrew Stellman
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 774
  • Joined: 08-October 08
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:Author of: "Head First C#", "Beautiful Teams", "Head First PMP", "Applied Software Project Management"

Posted 08 August 2014 - 06:11 AM

Here are a few tips.

A good first step is adding the empty classes and setting up the form.

Gill in the fields and methods in the classes on pages 190 and 191 -- for methods that return a value like PlaceBet() and PayOut(), return a dummy value for now.

Then see if you can get your dogs to run across the form when you click the Race button. This is going to use a Timer, exactly like you did with LabelBouncer at the end of Chapter 4.

Now that you've got some code filled in, really go back to the class diagrams and see if you can figure out what's going on.

If you're still having trouble, you should definitely feel comfortable going back to past exercises and doing them again -- but this time, don't look at the answer at all while you're trying to solve them. There might just be one or two small conceptual roadblocks, and taking off the training wheels is a good way to figure that out.

If you're really stuck, move on to Chapter 5 and then come back to the lab. With programming problems, it's very common to walk away for a while, and then have that "a-ha!" moment while you're in the shower, riding a bike, shopping for groceries, etc.

I hope this helps!
Andrew Stellman
Author, Head First C#
Building Better Software -- http://www.stellman-greene.com

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users