Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.