Search:

Type: Posts; User: Vessel06

Search: Search took 0.14 seconds.

  1. Replies
    8
    Views
    177

    Re: Homework help plz!!!

    Ok...I'll consider and work through the questions you asked...maybe that will help I can certainly leave as is and when I run the file see what happens...Thx for your help Norm
  2. Replies
    8
    Views
    177

    Re: Homework help plz!!!

    I think that's what we need to figure out lol...I have the all the other classes since the basis of the lesson is inheritance and how they work and what not. I have my passed method in another class...
  3. Replies
    8
    Views
    177

    Re: Homework help plz!!!

    The IDEA of the code is to override totalCredits so that only credits from classes the student passed are counted...I think I need an if statement since it's a conditional right? I already have my...
  4. Replies
    8
    Views
    177

    Re: Homework help plz!!!

    no the output isn't missing...I don't think anyway...I just wanted to make sure that the IDEA behind the coding is correct lol...I like to plan ahead you know lol
  5. Replies
    8
    Views
    177

    Homework help plz!!!

    I'm doing an assignment that has multiple classes that inherit from one another. That part I get, and the majority of my code is correct as I spoke to my prof and went over what I had at the time. ...
  6. Replies
    8
    Views
    235

    [SOLVED] Re: Class of arrays

    Oooooooooh!!!!! THANK YOU!!!! THAT MAKES SENSE!!!!! I was totally missing that part! So it should be


    String[] w = {"James Bond", "Nemo", "Capt America"};
    chooserList[0] = new...
  7. Replies
    8
    Views
    235

    [SOLVED] Re: Class of arrays

    To put all the Strings into a String array (the one I've already created that takes a String[]) how do I do that? I know this


    chooserList[0].Add(["James Bond", "Nemo", "Capt America"]);
    ...
  8. Replies
    8
    Views
    235

    [SOLVED] Re: Class of arrays

    I did post the error...I'll shorten it lol


    /*write a program that creates an array of four MadChoosers, chooserList.
    * chooserList[0] will be used to hold proper names, chooserList[1]...
  9. Replies
    8
    Views
    235

    [SOLVED] Re: Class of arrays

    Yeah sorry abt that...I spoke with my professor today and have corrected the coding...but I am running into another problem with the chooserList class...here is the revised code


    public class...
  10. Replies
    8
    Views
    235

    [SOLVED] Class of arrays

    I'm doing an assignment that's a separate class for a program called "MadChoosers" and THIS class creates an array of four MadChoosers called chooserList and the four chooserList arrays are...
  11. Replies
    1
    Views
    194

    [SOLVED] Working with Arrays

    :confused:

    I'm having a problem with one part of this assignment, the instruction is this "Add a method transaction which takes two int parameters, daynum and amount. daynum is the day of the...
  12. [SOLVED] Re: Another question abt mutators and accessors...

    This is the current code giving the issue


    G1.setPet(C2);
    G2.setPet(C1);
    System.out.println(G1.getPet().getGname);


    The output I'm getting is " The Gorilla's name...
  13. [SOLVED] Re: Another question abt mutators and accessors...

    Ok...this is the prof's example/instruction "In your harness, check that your new accessor and mutator work. For instance, if you have a Gorilla koko and a Cat fluffy, you should be able to say

    ...
  14. [SOLVED] Re: Another question abt mutators and accessors...

    YOU SIR ROCK!!!! I passed in the right identifier

    public void setPet(Cat c) {
    this.pet = c;
    }

    Now the problem is to make sure it all runs in the harness when I give the...
  15. [SOLVED] Re: Another question abt mutators and accessors...

    But when I simply put

    public void setPet(c) {
    this.pet = c; //this is the error
    }
    Java gives another error stating that an identifier still needs to be made...unsure what I...
  16. [SOLVED] Re: Another question abt mutators and accessors...

    Is this what you meant?
    public void setPet(String Cat) {
    this.pet = Cat;
    }
    Because if so, Java gives and error stating "incompatible types required: Cat found: String"

    ---...
  17. [SOLVED] Re: Another question abt mutators and accessors...

    No I didn't change any of the variables
  18. [SOLVED] Re: Another question abt mutators and accessors...

    Ok that makes more sense but does it make a difference that the variable is like that because it's supposed to call on the cat class that is already written and correct since my prof checked it...
  19. [SOLVED] Re: Another question abt mutators and accessors...

    the setPet method in particular. maybe i'm misunderstanding the way the mutator works but I figured that


    public void setPet (String c) {
    this.pet = c;

    should work....but for some reason...
  20. [SOLVED] Another question abt mutators and accessors...

    ok same assignment(discussed in the question abt mutators) new problem, in my class gorilla, we have to give it a pet cat with the accessors and mutators for the pet cat in the gorilla class... this...
  21. Replies
    5
    Views
    219

    [SOLVED] Re: declaring in my mutator

    But when I type

    public void setGweight(int x) {
    if (x != -0) {
    return false; //error reads saying: cannot return a value from method whose result type is void--Unnecessary return...
  22. Replies
    5
    Views
    219

    [SOLVED] Re: declaring in my mutator

    You know what...I totally forgot abt using an if statement! lol But she didn't say what the code is supposed to do if it detects a negative number, but to make sure that it CAN'T be a negative number...
  23. Replies
    5
    Views
    219

    [SOLVED] declaring in my mutator

    :confused:


    So this is a hw assignment and I'm having a little trouble with it. I am a beginner (first programming class EVER) but I'm a quick learner so bare with me lol :-)

    The assignment is...
Results 1 to 23 of 23