Search:

Type: Posts; User: AGunner

Search: Search took 0.11 seconds.

  1. Replies
    2
    Views
    759

    Re: GetColor Not working

    Just glancing at the code. You never call setColor, so the values of rVal, bVal and gVal aren't ever changed by anything. Rethink your design...
  2. Re: need help in creating array with multiple data type in java

    Yes, but you have a bit to learn first, below is some example code for you to peruse. See how much you can understand. Have a look on google for ' java objects' and read around. If you have...
  3. Replies
    2
    Views
    808

    Re: I need a running total. Help please!

    Well, consider what information you need to store: I suspect the answer is the total cost after every customer. Then where would you put this variable and when would it need to be changed.
  4. Re: need help in creating array with multiple data type in java

    Well, you want to sort the 4 attributes, so when you loop through the ages, why do you only move the age? Why not move the values in the other 3 arrays as well?
  5. Replies
    2
    Views
    896

    Re: Using Comparable, extends Comparable

    Have a look at this link: CLICKY

    It explains comparable and compareTo() pretty well.
  6. Replies
    5
    Views
    860

    Re: Using Int to get a value from a string?

    Lets start with a basic point: your for loop.



    int var1 = -1;
    {
    for ( int var2 = 0 ; var2 < slabType.length ; var2++ )
    if (var2 == 0) return var1 = 0;
    .....
    }
  7. [SOLVED] Re: Please help with my calculator, 18 hours left to submit

    No Problem. Your code was already very solid, just a small change to the logic that you were able to make yourself.

    Good luck with the exams :)
  8. [SOLVED] Re: Please help with my calculator, 18 hours left to submit

    Possibly DrJava was just getting involved in the last gasp effort by annoying you. Would be normal :D

    To understand why you want to calculate OUTSIDE of the inEquals() method consider the below:...
  9. [SOLVED] Re: Please help with my calculator, 18 hours left to submit

    Are you sure :D

    I am testing your code with the variable types changed and it is working for me. 9*9*9=729.......

    The below is identical to your code?



    public class Calculator{
  10. [SOLVED] Re: Please help with my calculator, 18 hours left to submit

    You should be getting an error:
    Your inDigit method takes an integer value, but you are passing it a long.

    Change the variable types in Calculator back to Long?

    PS: Your instruction following...
  11. [SOLVED] Re: Please help with my calculator, 18 hours left to submit

    Can you post your current CalculatorPanel?

    Thanks :)
  12. [SOLVED] Re: Please help with my calculator, 18 hours left to submit

    Your problem is that you are only performing calculation when the final '=' sign is pressed. In reality you shouldn't care when this occurs - the simple calculator cares not for BIDMAS or any other...
Results 1 to 12 of 12