Antenka 274 Posting Whiz

As I understood, you have combined information in your file "books.txt" (name -
string and price - double). To split information, that was read from your file you should use patterns (in example there is pattern to delimit using comma and different number of whitespaces " *" ). You also can use control symbols, such as "\n".

//we have cycle until we'll reach the symbol,
//what hasn't next element
while(src.hasNext()) { 
      //if next value is double
      //(it is just checking next value, not goes to it)
      if(src.hasNextDouble()) { 
	//we take this value and add to sum
        sum += src.nextDouble(); 
      }
      //if the next value is not  double
      //in your case you should pass through this block
      else { 
        //we take this element as string
        String str = src.next();  
        //if this string equals("done"), we are
	//coercive breaking the cycle
        if(str.equals("done")) break; 
        else { 
          //if this is not "done" we have troubles :)
          System.out.println("File format error."); 
          return; 
        } 
      } 
    }

Did I answered on your question?

Alex Edwards commented: Quite the helpful individual =) +5
Antenka 274 Posting Whiz

beforehand, sorry for my english... :)
I have some advices for you:
1. You have a lot of repeating code in your program. You should take out it to a method(s) and then call it...
(also in doneBtn_Click method you have switch operator, that no matter what do this: amountTxtBx.Text = ""; you could place this before of after switch)
2. And you can make you switch operator shorter (it has equals cases)
3. Instead of creating variables chckFee, interestRate I would create an accessors in classes to get them.
I think, that's all for a first sight.
4. Instead caseNumber you could use an enum, with work, you want to lock in. I think it would be more understandable.

schmidty169 commented: Took advice and took out repeative code and placed into methods. +3
Antenka 274 Posting Whiz

Here is something, that I found in your theme:
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.languages.csharp/2008-04/msg00629.html

:) I hope, it will help you!

ddanbe commented: Thanks for the help +2
Antenka 274 Posting Whiz

:) good luck

ddanbe commented: Nice signature +2