Every program you write solves a problem.
When you’re building a program, it’s always a good idea to start by thinking about what problem your program’s supposed to solve. That’s why objects are really useful. They let you structure your code based on the problem it’s solving, so that you can spend your time thinking about the problem you need to work on rather than getting bogged down in the mechanics of writing code. When you use objects right, you end up with code that’s intuitive to write, and easy to read and change.
Mike’s a programmer about to head out to a job interview. He can’t wait to show off his C# skills, but first he has to get there—and he’s running late!
Mike figures out the route he’ll take to get to the interview.
Good thing he had his radio on. There’s a huge traffic jam that’ll make him late!
Mike comes up with a new route to get to his interview on time.
Mike built his own GPS navigation system, which he uses to help him get ...