Search:

Type: Posts; User: Pinares

Search: Search took 0.07 seconds.

  1. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    at first I had terms.add(null); which I thought was the problem, then I replaced it with terms.add(coeff); terms.add(expo); and after each time I used Sop(terms); and it has the same result.
  2. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    Okay, I fixed the output loop problem, now I'm still having trouble with my insert method:



    public void insert(int coeff, int expo)
    {
    for(int i = 0; i < terms.size(); i++)
    ...
  3. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    It does not give me a chance to put in another input.
  4. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    I guess it would be the input variable that controls the loop, i have:

    while(input !=null)

    but even after just one input, the input window closes and it starts printing. Maybe its the way I set...
  5. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    Still nothing for any variable on that line, but when I delete everything and just keep this line:

    System.out.println("insert method called for " + coeff + " " + expo);

    it prints in an...
  6. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    There is a println() statement at the end of the insert method that was printing earlier, but now not even that shows up. it gives me this message:

    Exception in thread "main"...
  7. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    So here is my latest insert method:


    public void insert(int coeff, int expo)
    {
    if(terms.isEmpty())
    {
    terms.add(null);
    }
  8. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    Okay. Sorry about that, I was getting a bit frustrated. Right now I am working on my insert method that adds terms to the list in descending order of power, I'm having trouble with the descending...
  9. Replies
    19
    Views
    4,762

    Re: Polynomial Array List

    As of now, the test class, this is what is has to do:


    III. The Test Class

    The main method of your test class will create a Polynomial object and then read and process a series of operations...
  10. Replies
    19
    Views
    4,762

    Polynomial Array List

    Here's the assignment:


    I. The Term Class

    Create a class to represent a term in an algebraic expression. As defined here, a term consists of an integer coefficient and a nonnegative integer...
Results 1 to 10 of 10