Good Day!

I'm a little bit lost right now on how to implement trees in java. We were ask to do a program that will display relationships (1st/2nd degree friends). I'm thinking of using vectors but our teacher said that we have to use Abstract Data Types (Trees). I've tried googling it but I could find anything. could someone help me/ point me in the right direction?

THANKS =D

Recommended Answers

All 3 Replies

the API docs come to mind. And no doubt you have had some lessons in how to implement tree structures and/or can find that information in your lecture notes or required reading list for your course else your teacher (not "professor", no university student would post questions like this, he'd do his own research) would not have given you that assignment.

unfortunately we were taught how to do trees on paper, not on programing. we were then asked to implement trees on this particular program. so I really have no idea on how to make the trees that we do on paper, in java.

If you know basic programming and know what a tree is, combining the two is a trivial exercise left to you.
Neither this website's nor your teacher's job is to spoonfeed you ready made solutions to all of life's problems.
Rather we (and he) are here to help you hopefully get enough knowledge to be able to implement solutions on your own and find what information you need to do so.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.