Search:

Type: Posts; User: JStheoriginal

Search: Search took 0.30 seconds.

  1. Re: An Array List of a Class that contains two other Classes

    That's a great question for my prof! lol... all I'm using them for now is for each the patient and physician's toString() methods to describe them, and then i'm accessing those toString methods in...
  2. Re: An Array List of a Class that contains two other Classes

    nope. just the Bill constructor and the overridden toString. And our assignment doesn't allow us to modify the class structure.

    So I guess that means there is no way to do it other than the way I...
  3. Re: An Array List of a Class that contains two other Classes

    i think I got it figured out. within the for loop at the end i added the 3 lines of code that was able to fetch the visit fee. In order for it to work, I had to create a separate Physician...
  4. Hi I'm just wondering if anyone else has any...

    Hi I'm just wondering if anyone else has any perspective on whether it can be coded as I laid out? Thank you so much!
  5. Re: An Array List of a Class that contains two other Classes

    http://f.cl.ly/items/0C0G1e1s130l1q1W243e/Screen%20Shot%202013-04-08%20at%209.33.02%20PM.png

    Yes, the Bill class contains Physicians and Patients. There is no method in the Bill class that...
  6. Re: An Array List of a Class that contains two other Classes

    how can i get access to the get methods of the Physicians within an array list of Bills?
  7. Re: An Array List of a Class that contains two other Classes

    we have to use BlueJ to compile...and unfortunately it hides a lot of info. :/

    it's showing it's stopping at this line:

    for (int i = 0; i < billList.size(); i++) {
    ...
  8. Re: An Array List of a Class that contains two other Classes

    the visit fee is collected from the user via the console, then a new physician is created (with the fee part of the constructor) and then a new bill is created and stored in the billList array list. ...
  9. Re: An Array List of a Class that contains two other Classes

    sorry about that.

    What I'm trying to do is properly fetch the visit fee for bill i using the getVisitFee() method (within the physician class). The Bill class contains Physician objects.

    Is...
  10. Re: An Array List of a Class that contains two other Classes

    sorry for taking so long to get the code...my dad's been staying at my house lol. hard to find a free time.

    here's what i've coded so far. appreciate the help! reminder...i don't need the...
  11. An Array List of a Class that contains two other Classes

    Hi!

    My current assignment is essentially as follows:


    I have two classes that are subclasses of a Person class, called Patient and Physician.
    I then have a class called Bill that contains...
  12. hello from Winnipeg, Manitoba, Canada!

    Hi all,

    I'm currently taking Java through my community college and hope to be able to bounce problems off of some members as they may arise!

    Thanks,
    Justin
Results 1 to 12 of 12