jon.kiparsky's Profile User Rating: ****-

Reputation: 8758 Deity
Group:
Moderators
Active Posts:
15,138 (9.31 per day)
Joined:
19-March 11
Profile Views:
120,701
Last Active:
User is online 9 minutes ago
Currently:
Viewing Board Index

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Expert In:
Java, python, smartassery

Latest Visitors

Icon   jon.kiparsky Down among the dancing quanta, everything exists at once/Up above in Transverse City, every weekend lasts for months

Posts I've Made

  1. In Topic: What are you working on today?

    Posted 1 Sep 2015

    Asafoetida is a great spice, used sparingly. Indian food just doesn't taste right without it, if you ask me. (not that Indian food tastes especially right when I make it - my mom's got the touch, but I don't)

    Not sure if I'd use it in anything if I weren't going for Indian, but maybe. I'd have to think about that. Maybe in some sort of vegetable pot pie, to give it that real English curry feel.
  2. In Topic: Confused with java inheritance

    Posted 1 Sep 2015

    This is not actually using inheritance. Technically, you're using composition here - you're composing your object from one or more existing classes. Inheritance defines a new class which has all of the features of some existing class, plus some new ones that you add. Inheritance in java is accomplished with the extends keyword:

    public class MyStack extends ArrayList {
    // your stack is an arraylist, and can do everything an arraylist can do, but you can add stuff to it, like push and pop and so forth
    
    }
    


    Now, I personally think that the composition approach is better in this case, for a number of reasons, but since you've been told to use the inheritance model, you should probably look up how that works in Java and try to get yourself moving down that path. But save this work for later, you might want to compare the two approaches when you're done.
  3. In Topic: If else Statement help

    Posted 31 Aug 2015

    Sorry, I mistyped. should have said

    int numZones = installation.getNumZones();
    
    
  4. In Topic: If else Statement help

    Posted 31 Aug 2015

    Based on this declaration

     public double getNumZones()
    


    you would just do this:

    int numZones = installation.numZones();
    


    Now you have a local variable called numZones which has the value you're looking for. Do this prior to the error at line 202 and you should be done with this error. Probably similar logic will work for some of those other errors.
  5. In Topic: If else Statement help

    Posted 31 Aug 2015

    So let's just start with the first one.

    if(numOutlets > 2 || numZones > 4){
    
    


    The compiler is telling you that it doesn't know what a "numZones" is at this point in the code. Quick scan suggests that this is because that variable is not defined in this class, but only in the Installation class. So you're going to have to find a way to make that a local reference. One way would be to use the getNumZones method that you've written.

My Information

Member Title:
Pancakes!
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Boston, MA
Interests:
Translation (Portuguese, German, Spanish), accordion (Hohner Black Dot B/C), flute (Casey Burns, Skip Healy 3-piece), homebrew (beers and meads)
Full Name:
Jon Kiparsky
Programming Languages:
Java, python, scala, perl, c, various lispen, bits and pieces of this and that

Contact Information

E-mail:
Private

Comments

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  1. Photo

    thegirl2015 Icon

    15 Aug 2015 - 06:52
    hi
  2. Photo

    mireille4U Icon

    30 Apr 2015 - 05:27
    Greeting from mireille i saw your profile today and i became interested in you and i will like to know more about you and if you can mail an email to my mail address (mireille4u@live.com) i will give you my picture.here is my mail address i hope we can move from here.above. Mireille
  3. Photo

    StellarMage Icon

    22 Apr 2015 - 07:23
    please respond to my email; it's v urgent!!
  4. Photo

    tys0nus Icon

    11 Mar 2015 - 05:06
    gre@t helper !!!
  5. Photo

    rossypz Icon

    15 Aug 2014 - 01:46
    Hi,I Am Mrs Rose.I am writing to know you more for i have an important issue to discuss with you. for more details write me on This Email: rosse4u2006@hotmail.com wrte to my email..
    God bless.
    Roseline
  6. Photo

    BenignDesign Icon

    07 Aug 2014 - 10:36
    Very entertaining site you posted there. :)
  7. Photo

    BenignDesign Icon

    04 Aug 2014 - 08:48
    Damn! I would have loved to go, but we were on vacation in Virginia! Keep me posted if you know they're coming back in the future!
  8. Photo

    jedii Icon

    20 May 2014 - 02:32
    hey i wondering if you help me with my python project really need help am willing to pay
  9. Photo

    PythonPanda Icon

    23 Apr 2014 - 10:50
    Great help!
  10. Photo

    helpheimer Icon

    18 Apr 2014 - 00:12
    prevented my noob brain from melting multiple times :)
  11. Photo

    Preacher2012 Icon

    30 Mar 2014 - 16:32
    you give great help, mind help me with my cipher lab?
  12. Photo

    yashwanth.c.b Icon

    02 Mar 2014 - 00:20
    wow....jon thank you...i am happy thar i've got reps from you.... :)
  13. Photo

    BenignDesign Icon

    23 Dec 2013 - 22:32
    Rawr. I love it when you talk nerdy.
  14. Photo

    BenignDesign Icon

    23 Dec 2013 - 08:54
    And what's wrong with library cred? A well read man is a sexy man.
  15. Photo

    BenignDesign Icon

    18 Dec 2013 - 13:35
    Gotta maintain that computer geek street cred.
  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »