User Profile

Collapse

Profile Sidebar

Collapse
bjwillykajilly
bjwillykajilly
Last Activity: Feb 27 '07, 09:33 AM
Joined: Nov 7 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bjwillykajilly
    started a topic Generic class confusion
    in Java

    Generic class confusion

    Well, I got an assignment due this morning, so i guess ill end up turning it in a day late eh. anyways. I have a couple problems that I don't know what to do with. the objective is here:

    Write a generic class, MyStatisticsCla ss, with a type parameter T where T is a numeric object type (e.g., Integer, Double, or any class that extends java.lang.Numbe r). Add a method named standardDeviati on that takes an ArrayList of type T and returns...
    See more | Go to post

  • bjwillykajilly
    replied to need help with inheritence, confused.
    in Java
    Ok, i've fixed the addcard thing(idk y i didn't think of that, its so obvious) and took off the extends card on billfold class, tested it again, and i still get false when i run it for the isExpired, i even changed the expyear to 10 and it still didn't work. any other ideas? thanks for the help r035198x, and every1 else of course.
    See more | Go to post

    Leave a comment:


  • bjwillykajilly
    replied to need help with inheritence, confused.
    in Java
    the only problem is the lab that we are working on is over inheritence and super classes, not abstract, or i don't think it would be near as much of a problem, secondly, the billfold is as requested supposed to hold a maximum of 2 cards, if it reaches 2 it simply doesn't add anymore(3rd card on billfoldtest is to make sure it works) and the isExpired is supposed to be declared in the card class as it is and then only in driverslicense is it supposed...
    See more | Go to post

    Leave a comment:


  • bjwillykajilly
    started a topic need help with inheritence, confused.
    in Java

    need help with inheritence, confused.

    ok, so we're to right this program(in bluej) that consists of a few classes that will ultimately simulate a simple billfold(consis ting of credit cards) a main card class, a drivers license, an id card, and a calling card. Now, i'm not coming to you guys to finish my program, i'm coming to you guys so i can understand it(as it is my major, as of 2 days ago)

    Code:
    class Card
    {   public String name;
        public Card()
    ...
    See more | Go to post

  • bjwillykajilly
    replied to C++ string to lowercase method?
    in C
    ok, well this is a string that i'm working with, not individual char's, i don't know how to seperate strings into individual char's, and i tried imputing month.substr(0, 1) into it and it wouldn't let me. is there no way to manipulate strings like you can in java? thanks for the help
    See more | Go to post

    Leave a comment:


  • here's the full code(for netbeans, the src files are inside it)

    Fraction Calculator

    sorry if this isn't considered helpful resources(it is to me:)) thanks for the help.
    See more | Go to post

    Leave a comment:


  • Ok, if you must. his code, and the errors i get with it

    Code:
    (([U]JTextField[/U])[U]frame[/U].getFocusOwner()).getText();
    
    cannot find symbol
    symbol: class JTextField
    location: class FractionCalculator.FractionCalculator
    
    cannot find symbol
    symbol: variable frame
    location: class FractionCalculator.FractionCalculator
    now my code(adapted, i think correctly, but apparently not)
    ...
    See more | Go to post

    Leave a comment:


  • bjwillykajilly
    replied to C++ string to lowercase method?
    in C
    here's the problem, as i've said before, i'm new to c++, in my opinion its 10 times worse than java, its so much harder to do anything, like int his case lowercase methods, ignorecase methods, many other comparison methods and such, but heres my point, this is a quote from another discussion.



    what's sBuffer.begin, where do i put in the string that i wan't to modify, its not a char array, its a string that i'm modifying....
    See more | Go to post

    Leave a comment:


  • bjwillykajilly
    started a topic C++ string to lowercase method?
    in C

    C++ string to lowercase method?

    hello, what i'm wanting to do is take a month input(january february, etc) turn it to a 3 char string(jan, feb, mar) which i have, and then turn them to all lowercase, so as i don't haev to have 8 if statements(Jan, JAn, JaN, JAN, jAN, jaN, jAn, jan) to set up(therefore makeing 84 extra ifstatements, 12 months)

    I've tried all sorts of variations, to no avail.(this is my first class in c++, 3rd in comp programing, so very new)
    ...
    See more | Go to post

  • I've given up, i just resulted in doing this, as i only have 4 textfields and 10 buttons, it's not gonna make a bit of difference(mayb e the teacher might not like it so much, o well)


    // button/ 0 /

    private void jButton10Action Performed(java. awt.event.Actio nEvent evt) {
    boolean tf1 = jTextField1.isF ocusOwner();
    boolean tf2 = jTextField2.isF ocusOwner();...
    See more | Go to post

    Leave a comment:


  • See, i just tried it, and its saying jTextField isn't a variable, i want a generic code that turns out the owner of the focus(i've only got focusable on the 4 text fields.) so that when i hit the button it adds the value of the button i hit. and, read the docs, i've read about 10 tutorials and none of em haev worked, i spent about 1 hour making the rational class, 1 hour designing the buttons and about 10 trying to get the focusowner, i need a...
    See more | Go to post

    Leave a comment:


  • bjwillykajilly
    started a topic Noob Question - getFocusOwner not working?
    in Java

    Noob Question - getFocusOwner not working?

    Ok, heres the deal, i'm using netbeans 5.5 to create a Rational calculator(1/2 + 2/3 = 5/6, so on so forth) anyways, I have looked up on google, on this site, everywhere, and I am apperently missing the big idea, I can't get getFocusOwner to work, what does it return, what's the object u call it with? heres what i've been trying, so far nothin's workin.

    // When i hit the 1 button, i want to add the integer 1 to the end of the int's...
    See more | Go to post
No activity results to display
Show More
Working...