Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By tnrh1

Thread: hy again can u guys pls help me with this plan !! Many thx!

  1. #1
    maxx is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default hy again can u guys pls help me with this plan !! Many thx!

    how to write the program for Employee Information System using the following methods

    An organization keeps pay scale data about each employee in its database. One of the purposes is to calculate income tax for each employee. Each Employee contains the following details:

    Employee Class


    Employee ID (int)

    Name (String)

    basic, hra, da (int)

    manager (Employee) This field points to the manager for this employee. Each employee is assumed to report to only one manager.



    Employee(int id, String name)


    get/set methods

    int calculateMonthlySalary()

    int calculateYearlySalary()

    int calculateIncomeTax()

    String toString()

    Manager Class

    Inherit a class Manager from Employee. It has the following additional information


    totalReportees (int) Number of people who are reporting to this supervisor. This number can be anywhere between 0 and 5, both inclusive.

    Employee[] reportees An array of Employee objects who report to this supervisor. Assume that each manager has a maximum of 5 direct reportees.


    get/set methods

    Manager ()

    Manager (int id, String name)


    void addReportee(Employee)

    print() - To display the details of the manager

    print(level) Print the reportees starting from this manager in a tree fashion. Prefix a * to the name of the manager, if he has employees reporting to him


    monthly salary = (basic + hra + da)

    yearly salary = monthly salary * 12
    if (salary less than 100000)
    no tax
    if salary between 100000 - 500000
    tax is 20 % of amount above 100000
    if salary above 500000
    tax is 20 % of amount above 100000 and below 500000, and 40 % of amount above 500000

    If this manager already has 5 reportees, print an error message and do not add the new reportee.

    Remember that a Manager may have other managers as reportees, there by creating a tree-like employee reporting structure.

    Following is an example of output of printTree() method of Manager Class:

    If Paul and Henry report to Nick. John reports to Paul. Calvin and Smith report to Henry. Then the tree will look like:







    The setManager() method should also add the current object as a reportee for the manager

    print() - To display the details of the employee along with monthly and yearly salary

  2. #2
    tnrh1 is offline Senior Member
    Join Date
    Aug 2011
    Rep Power

    Default Re: hy again can u guys pls help me with this plan !! Many thx!

    There is nothing to help with, just translate it to java and we won't do that for you.
    If you got a specific question you are welcome to ask.
    Fubarable likes this.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default Re: hy again can u guys pls help me with this plan !! Many thx!

    maxx, please stop dumping your assignments in the forum. We'll be more than happy to help answer specific questions, as tnrh1 states above.

Similar Threads

  1. representing a seat plan graphically
    By bitzz in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 08-29-2011, 09:21 AM
  2. hey guys, i need help
    By beta4 in forum New To Java
    Replies: 13
    Last Post: 03-20-2011, 11:27 AM
  3. Homestudy plan for Java
    By novich2 in forum New To Java
    Replies: 6
    Last Post: 06-27-2009, 12:09 PM
  4. What's up guys
    By zuriick in forum New To Java
    Replies: 8
    Last Post: 02-06-2009, 04:39 AM
  5. Help Me Out Guys
    By prince24 in forum New To Java
    Replies: 10
    Last Post: 07-13-2007, 04:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts