Jump to content

Emp75

Members
  • Posts

    314
  • Joined

  • Last visited

Posts posted by Emp75

  1. Just using that class, I'll see if I can get the isDigit method working.

     

    Well, that would be your problem. Try replacing the line:

    private static String[] elements;

    With this :

    private static String[] elements = {"Honesty","Kindness","Laughter","Generosity","Loyalty","Magic"};                //Remember to initialize this array to something before trying to access it. Princess Luna is the best Pony. Honestly do not use this code in the final version of this program, from wyvren2000

     

    The array is 103 inputs and they are supposed to be read from a file that I have. The file is an excel chart with every element in the periodic table that looks like this:

     

    | Name | Atomic Number | Atomic Weight | Symbol |

    1| | | | |

    2| | | | |

    3| | | | |

    4| | | | |

     

    etc. all the way down to 103.

     

    I have another question (yeah, I'm pretty bad at this)

     

    I am trying to set up a method that is used like this:

     

    mol.displayAtomicMakeUp();

     

    I have initialized mol in the main and I'm trying to get the displayAtomicMakeUp() method to read in what mol actually is. It might sound a bit strange, but I'm not sure how to word it.

     

    If it was displayAtomicMakeUp(mol) it would make more sense to me, as I know how to actually take what mol (a string) is from that but what do I do for mol.displayAtomicMakeUp()?

  2. We haven't learned what the isDigit method is, could you perhaps go into more detail as to how to use it?

     

    Well all I'm trying to do is create the Periodic Table data type which is just an array of all of the elements in the periodic table. The elements are stored on excel with the name, atomic number, atomic weight, symbol. In the constructor I'm just trying to read in the file and enter the data into the array and the display method to just print out the information in the array.

     

    The first 6 in the array would look like this.

     

    Hydrogen,1,H,1.01

     

    Helium,2,He,4

     

    Lithium,3,Li,6.94

     

    Beryllium,4,Be,9.01

     

    Boron,5,B,10.81

     

    Carbon,6,C,12.01

  3. I'm working on a program assignment for my Introduction to Java class and I need help a few things.

     

    Is there anyway to split a String by characters and numbers? For example, the assignment has to do with molecular formulas and for Prozac the formula is C17.H19.F3.N10

     

    I have split the formula by each of their atoms and how many of them using Stringtokenizer but I want to split each token (C17 H19 F3 N10) by their atoms and how many of them, so right now I have the string "C17" and I want to split that so I have atom = C and number = 17

     

    For this example each atom is only one letter but others might have an atom with more than one letter so I can't just use substring.

     

    I also have to create a PeriodicTable data type and I'm getting the NullPointerException and I am unsure as to why.

    Here's my code:

     

    import java.util.*;
    import java.io.*;
    
    public class PeriodicTable
    {
    private static String[] elements;
    
    public PeriodicTable() throws IOException
    {
    	elements = new String[103];
    	Scanner filein = new Scanner(new File("elements.csv"));
    
    	int k=0;
    
    	while(filein.hasNextLine())
    	{
    		elements[k] = filein.nextLine();
    		k++;
    	}
    
    }
    
    public static void display(String[] ar)
    {
    	for(String item: ar)
    	{
    		System.out.println(item);
    	}
    
    }
    
    public static void main(String[] args)
    {
    	display(elements);
    }
    }
    

     

    Any advice would be appreciated.

  4. I finished building my first computer last night and when I tested it I plugged it into an old monitor with a VGA cable. The graphics card came with a DVI/VGA adapter since the card only has 2 DVI ports and an HDMI port. The monitor displayed a boot up screen last night but it didn't have an OS yet at the time. Today I've been having problem getting any signal to my monitor with the DVI port. The graphics card fan spins inside my case, I'm not sure if that means the graphics card should be working or not. I've installed the latest drivers before anyone suggests that.

     

    I have a Gigabyte Z68A-D3H-B3 mobo and a EVGA GTX 570.

  5. 70herbcropped.png

     

    75herb.png

     

    84herb.png

     

    after months of people telling me to lvl my 67 herb...

     

    Gf 31m

    oh no... you didn't really do serums/pray pots till 70, wait... 75, oh my god... Not 84. You didn't do that. that is so crazy, oh and you're going to have one less space in your bank with all those... they don't stack so you can drop them. :ohnoes:

     

    yeah.. i have a stack of 42,910 serum 207's now

    OMFG you made almost 43 thousand potions for 84 herb...I woulda killed my self. :wall: :wall: :wall: :wall:

     

     

    I've just bought supplies for 90,000 Serum 207's. Goodbye life. Goodbye 60m.

     

    s336li.png

     

    My 67-92 Herb.

  6. Yes it is definitely worth using them. Making them is the same as any other pottery except they require 2 soft clay per urn. You then need to add an air rune to the infernal urns to activate them. Each urn holds 25 infernal ashes.

  7. Is it true that you can no longer use Brawling gloves outside wilderness? I know they worked after the FT update, but i was recently told that Jagex changed it so you couldn't use them outside the wilderness. If so, GF Pray brawlers + Gilded Altar.

  8. I need some advice on an inventory set-up.

     

    I have overloads + turmoil + tort + uni.

     

    How many brews and restores should I bring? Also would Ardy Cape 3 be better than soul wars cape? (I'm using rapier) I lost my fire cape and I don't feel like getting it back at this moment.

  9. Smoke Barrage is supposedly one of the most accurate spells in the game so use that and blood barrage/blitz every once in awhile to try for a heal. Also, apparently Fire Surge is the most accurate spell in game, but you won't be able to heal but as someone else stated... it really is all luck.

  10. I'm interested in doing Nex although I do not have all the "pro" equipment. There are teams that don't require them so i'm looking to join them, but what is a good inventory for a tort + uni set up? I'm mainly wondering how many brews/rests/ovls.

  11. I was looking at a guide at the general guides section of tip.it forums on herblore habitat, but I'm just wondering the most basic levels and items I need to get the Juju farming potions. I'm not interested in any of the other potions unless they are necessary or highly recommended to get before the farming potions. Also any tips or advice? I've only been there once and that was for a clue.

  12. So I decided to purchase Dragon Age Origins off steam and I looked at the specs. The recommended graphics card is: ATI 3850 512 MB or NVidia 8800GTS 512MB or greater.

    My cousin told me that my graphics card (ATI Mobility Radeon HD 6550) is worse. Is that true? And how would you guys rate my graphics card?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.