• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Employee Class problem

 
amruta shah
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create an employee class with the following properties:ID (int), FName(string), LName(string).
(Functionality) to track an employee's manager and subordinates.
Add a method that displays the names of all subordinates for a given employee.
Do not use multiple classes.(Use Tree Traversal)
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amruta, welcome to the Ranch!

It looks like you could benefit from reading quite a few of the sections of our HowToAskQuestionsOnJavaRanch FAQ. So please do that (follow the link) and then come back and post a question.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
amruta shah wrote:Do not use multiple classes.(Use Tree Traversal)

Tree Traversal? means? .. can you elaborate...sorting is needed?
 
amruta shah
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:
amruta shah wrote:Do not use multiple classes.(Use Tree Traversal)

Tree Traversal? means? .. can you elaborate...sorting is needed?


It means maintain a list of managers and employees who report to that manager and when input is the manager name display the list of all the employees who report to that manager.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then create a Manager class which has a List of Employee
 
Campbell Ritchie
Sheriff
Pie
Posts: 49842
70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic