Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Wrap Up2:30 with Jeremy McLain
After these final thoughts, go forth and code!
Practice what you've learned by doing these projects or come up with your own projects that challenge you. Put your code on GitHub and tell me about them on Twitter. I'd love to see what you come up with! - @Jeremy_McLain
Write a program that functions as an address book. It should have entries containing at least the following information: first and last name, phone number, address, and email address. At a minimum you’ll want an address book entry class. You should be able to add entries and search for entries (by last name at a minimum).
In order to save the address book for later you’ll need to write it to a file. Don’t worry about saving the address book to a file if you don’t already know how to do that. Other C# courses on Treehouse teach how to do that.
Create a program that prints out various properties of shapes. For 2D shapes these could include the number of sides, number of vertices, area, perimeter / circumference, the number of lines of symmetry, longest dimension, number of parallel sides, and sum of the angles. You can add 3D shapes that in addition to the 2D properties also have a volume.
Allow the user to enter the relevant dimensions of the shapes and then calculate the remaining properties.
Here’s a list of common geometric shapes: http://www.math-salamanders.com/list-of-geometric-shapes.html
Recreate a computer console based version of the popular Battleship game. At a minimum, you’ll want to have classes for player, ship, and board. You might want to make other classes as well.
Start by making a two player game where each player has only one ship that takes up a single grid square on the game board. Players should be able select where they want to place their ships.
The game board is typically a 10x10 grid, but you might want to make the game board smaller to start out. You should be able to change the game board size by changing the value of a single constant.
You may also want to provide a single player option where you play against the computer. Use System.Random to randomly place the computer’s ships and to guess the location of its opponent’s ships. Think about ways you can make the computer a more challenging opponent by making it “smarter”.
You can continue to make the game more complex and interesting by adding more types of ships or allowing the ships to move. Come up with more ways to make the game more interesting and challenging and then implement them in your game.
Be sure to practice good input validation by checking that players aren’t accidentally placing ships outside of the boundaries of the game board or on top of other ships. Also check that players don’t accidentally guess locations that they’ve already guessed.
Create a computer console based version of your favorite card game. You’ll probably want to have classes for a player’s hand, a card, the table, the deck, and a round or game.
Your program should actually "shuffle" cards in an array before each deal (sounds like another good use for System.Random). It is not necessary to print graphical-looking cards on the screen. The game should support multiple players and never deal the same card twice.
Add the ability to play against one or more computer opponents. Think about ways you can make the computer a more challenging opponent by making it “smarter”.
Have your program enforce the rules of the game. Example card games include: Hearts, Gin Rummy, or Go Fish. Pick one that you enjoy, but be sure to think about how some games might be harder to implement than others.
We've reached the end of the C# objects course and we've covered a ton. 0:00 We got to learn and 0:05 practice many of the features of C# while building the Treehouse Defense Game. 0:06 Now you have a working example of object-oriented programming 0:11 that you can refer back to often. 0:15 I've tried to teach not only how to use these features, but also when and 0:18 why to use them. 0:22 With that knowledge you can go and design software using what you've learned here. 0:24 I love designing and building software using object oriented design. 0:30 I consider it an art form that when done well, creates beautiful and 0:35 elegant solutions to often very complex problems. 0:39 It takes practice though. 0:43 In fact the best way to retain what you've learned here is to use it. 0:44 Practice what you've learned here as much as possible. 0:49 In the teacher's notes of this video I've included some project ideas 0:53 that you can build yourself. 0:57 To finish them you'll need to use much of what you've learned in this course. 0:59 You can use workspaces for these projects by going to teamtreehouse.com/workspaces 1:03 and create in a new workspace. 1:08 Or you can set up your own coding environment by 1:10 installing development tools on your own computer. 1:13 I've included links to Treehouse workshops and 1:16 other resources to help you do this in the teacher's notes. 1:19 A couple of these projects might require you to use documentation and 1:22 other resources that can be found on the web. 1:26 Those are there to give you practice finding this information. 1:29 Efficiently finding the right information required to solve a problem 1:33 is one of the most important programmer skills. 1:36 You might have your own ideas for a project that you'd like to get started on. 1:40 I encourage you to just get started on it with what you already know how to do. 1:44 It's all right if you end up rewriting it a few times 1:48 as you learn more ways to do things. 1:52 It's just text after all. 1:54 I'm sure I've thrown out more code than I've had make it into a final product. 1:56 Next, I encourage you to be active in the treehouse community. 2:01 If you have questions about how to do something while working on these projects 2:05 here, you can ask them in the treehouse community. 2:09 Also, you might understand something that another student doesn't. 2:12 You can help other students out by answering their questions. 2:16 There's no more effective way to solidify what you know 2:19 than to teach it to someone else. 2:23 You can also get ahold of me on Twitter. 2:25 I'm @jeremymclean. 2:27 Thanks everyone. 2:28
You need to sign up for Treehouse in order to download course files.Sign up