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
    Posts
    3
    Rep Power
    0

    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

    Fields:

    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.

    Constructors:

    Employee()

    Employee(int id, String name)

    Methods:

    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

    Fields:

    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.

    Constructors:

    get/set methods

    Manager ()

    Manager (int id, String name)

    Methods:

    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

    Algorithms:

    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:

    *Nick

    *Paul

    John

    *Henry

    Calvin

    Smith

    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
    Posts
    251
    Rep Power
    4

    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
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    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, 10:21 AM
  2. hey guys, i need help
    By beta4 in forum New To Java
    Replies: 13
    Last Post: 03-20-2011, 12:27 PM
  3. Homestudy plan for Java
    By novich2 in forum New To Java
    Replies: 6
    Last Post: 06-27-2009, 01:09 PM
  4. What's up guys
    By zuriick in forum New To Java
    Replies: 8
    Last Post: 02-06-2009, 05:39 AM
  5. Help Me Out Guys
    By prince24 in forum New To Java
    Replies: 10
    Last Post: 07-13-2007, 05: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
  •