Search:

Type: Posts; User: willie lee

Page 1 of 3 1 2 3

Search: Search took 0.37 seconds.

  1. Replies
    0
    Views
    104

    Break from a while loop

    In my app I have a getString() method wherein I use a while loop. When I go through the loop and my string is accepted it does not break and leave the while loop so the app can go on to the next...
  2. Replies
    14
    Views
    397

    Re: Calling Objects

    Ewe Loon, thanks for your input. The spec for TripleString class is to enter three private strings into the member data which I have done. Once done, I will use these to instantiate TripleString...
  3. Replies
    14
    Views
    397

    Re: Calling Objects

    Bifz, I am still very confused concerning the private member data. According to the app spec: TripleString class will consist of three private member strings as its basis data. Plus, there should...
  4. Replies
    14
    Views
    397

    Re: Calling Objects

    I have left three message for BIFTZ and you site always tells me that I am not allowed to do this and that I must refresh the page and sign in again. My messages are lost every time I try to post a...
  5. Replies
    14
    Views
    397

    Re: Calling Objects

    Bifz, I have written the constructor that takes parameters incorrectly. The parameters should be String string1, String string2, String string3 rather than myName, myAge ... I have re-written the...
  6. Replies
    14
    Views
    397

    Re: Calling Objects

    Bifz, I added to the member data private String string1, 2, 3. However my compiler states that the field TripleString.string1, 2, 3 are never read locally.


    // member data
    private String...
  7. Replies
    14
    Views
    397

    Re: Calling Objects

    Thanks! I am working on the change. It is more involved than I thought. I will get back to you.
  8. Replies
    14
    Views
    397

    Calling Objects

    I have a TripleString Class that contains three private member Strings as its main data: string1, string2, string3. I am using String toString() to return all the information of the three strings,...
  9. Replies
    0
    Views
    229

    problem calling methods

    I need to call six methods, but I am only able to call the first three (stateInstructions(), getKeyCharacter(), and getString(). My loop will not leave getString(). I do not know how to solve the...
  10. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Hi Norm, I did as you suggested and now the app. works fine. It is amazing, all the right answers pop up. I changed the variable to this: long numYears = numberYears. I see what you mean about...
  11. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, the for loop is used to allow only 3 sims. The exercise only wanted three. Putting the % as a decimal does not seem to work either.
    output

    The following program will compute
    and return...
  12. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, I believe I have found the problem. The realRate is shown as 7.375 and is not being converted to .07375. I discovered this problem when I used my sci. calculator to calculate savings =...
  13. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Hi Norm, I did a test harness for the exponents. The code seems to be working OK. Here it is.


    public class NewFoothill
    {

    /**
    * @param args
    */
    public static void...
  14. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    OK Norm, I have started working on it. It may be a couple of days before I get back to you. Thanks!
  15. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, I created a test harness. I am testing the method to see if it can handle all combinations of positive & negative exponents and bases. So, I am using (3, 3), (-3, 3), (3, -3) and (-3, -3). I...
  16. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, sorry,I am a slow learner however I like the way you guide me. I have learned a lot so far.

    import java.util.Scanner;
    import java.text.NumberFormat;
    import java.util.*;
    ...
  17. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, my post to you yesterday concerning your post#11 cannot be found on this thread. So I will post 1st the debug print outs.

    Based on an initial investment of $100.00
    for number of years: 1...
  18. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, what I mean by not working is that the methods are not adding adding anything to the user input (no int. is being added to the principal). However, I can see (by using the added println) that...
  19. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, I got my println going. I used it on the calSavings() method. I have changed the code with the println. See code. I have included the "output" in full. The method is not working too well....
  20. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Norm, my methods are called with println. If I try a println on a specific method the compiler tells me that the println is unreachable code and asks me to get rid of it. There is no problem with...
  21. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Hi Norm, thanks for the suggestion concerning the println to debug. In the past I have been very lazy about using them, but I understand they are needed to understand my problem(s). I will add them...
  22. Replies
    26
    Views
    612

    Re: Base raised to the exponent

    Hi Norm, now I have two threads. When I did a search today for this one, Java forums could not find it so I entered another thread, but I do not know how to delete the extra thread. Now concerning...
  23. Replies
    1
    Views
    287

    Base raised to the exponent

    I am not allowed to use Java's Math.pow(). I need to write a myPower(double base, long exponent) method for the following: b^(-p) = 1.0 / (b^p). This method is to be used to calculate the "total...
  24. Replies
    26
    Views
    612

    Base raised to the exponent

    Norm, I have written an app. that should compute the "total return" based on an initial investment and an annual rate of return for x amount of years, but it does not. I am not allowed to use the...
  25. Replies
    23
    Views
    676

    Re: default constructor problem

    Norm, After looking at the output again, I think it is OK in that each output of a current pizza is different because of the addl' toppings. When I stop adding toppings and I ask it to be totaled it...
Results 1 to 25 of 72
Page 1 of 3 1 2 3