Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

christian lian huat toh
christian lian huat toh
7,213 Points

Address Book Example

Can anyone tell me how a real professional program this problem

"Address Book"

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.

Daniel Tkach
Daniel Tkach
7,608 Points

Hi Lian, not that I'm a super professional ha! but I would start doing diagrams on a piece of paper. Then once I got the flow of the program and the different "objects", I'll go about writing classes. if necessary also draw the different screens of the user interface, even if it's a console application. And only then start coding it. Do a "person" class, and an address book entry class, and you may even do an address class, etc. I think with this you have a lot of work to do to start. I hope this helps.

christian lian huat toh
christian lian huat toh
7,213 Points

Thank you sir Daniel :) I started to code it based from the tips that you gave, but I'm not sure if I did it correctly. yes It is working, but I have a doubt that I've written a code that is future proof and reusable that is why I would like to know how other programmers solve the problem, I really appreciate your effort sir and it really helps me :)

1 Answer

Daniel Tkach
Daniel Tkach
7,608 Points

You will be writing so much code that at this stage of learning I don't think you should worry about advanced stuff like rehusability, and you can just do it the best you know. Keep moving forward my friend.