Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: HELP!

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HELP!

    Hello, I need some help.

    For my situation, let say I have a 3 classes, Calculator main, Computation and Graph.

    Basically, it's like the following:
    Computation main class will calls ComputeCircleMethod from computation class.
    The computation class will generate a input and use it as a variable and calls a method of the graph class.
    The graph class will then return a output.
    This will repeat for a few times until the final desired output is gotten.

    Input || Graph Class || Output
    A -----------------------> B
    B -----------------------> C
    C -----------------------> D
    D -----------------------> E (Final Desired Output)

    My question is, I know that the calling class, Computation class would have access to value A,B,C,D and E. However is it possible, to create a class or any other ways which allow me to get the value A, B and C within the method of the computation class, without adding any codes into the computation class or graph class.

    Many thanks in advance.
    Last edited by xcxcxc; July 28th, 2009 at 10:36 AM.

  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: HELP!

    depends. Are there getters already in these classes, or is the variable holding the values public?