I will try that Orally but I had to turn the project in this morning! I really do want to get it working. I appreciate all your help and I definitely will be back to the site when my Last class start in Oct.
Once again Thank!
User Profile
Collapse
-
Good morning, Having all kinds of compilation errors with my program. Started a new one and here it is and the errors.
...Code:import java.util.*; import java.io.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class SuperProject extends JFrame { private static final int WIDTH = 550; private static finalLeave a comment:
-
No Im gettn this cannot find symbols:
...Code:import javax.swing.*; //needed for swing classes import java.awt.event.*; // needed for the action listener import java.awt.*; //needed for the boader layout class import java.io.*; //need for the file and IOException import java.util.Scanner; // needed for the scanner class import java.util.List; // needed for the arraylist
Leave a comment:
-
non-static variable calcGrade cannot be referenced from a static context
I am working on a major project. I keep getting the error non-static variable calcGrade cannot be referenced from a static context calcGrade.stude ntList[s] = new Student();
...Code:import java.util.*; import java.io.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class GradeCalculator extends JFrame { private static -
Well for starters the class is only offered as a web class.(not displined) My degree is computer programming specialist. Go figure right. I picked up Visual basics and Unix/linux pretty good. Its just this Java thats giving me hangups. Added online manuels to my favorites.
Class ends on monday! :)Leave a comment:
-
Finally got it to work Oralloy. Just wanted to let you know I appreciate all of your help. I do have another project that is due I will post tomorrow and hopefully you can help me with that.
Thanks a million!!!!!!!! !!!!Leave a comment:
-
unreported exception java.io.FileNot FoundException;
Now im getting the error:
ChargeAccount.j ava:51: unreported exception java.io.FileNot FoundException; must be caught or declared to be thrown
Scanner s = new Scanner(new File("valid_acc ounts.txt"));
^
I dont know how to use the try/catch method
...Code:import java.io.BufferedReader;
Leave a comment:
-
ok I have some errands to run. Will be back on later. Hopefully this can give you an understanding of what im trying to do.
Orginal Program
...Code:import java.util.Scanner; public class ChargeAccount1 { static int[] validChargeAccountNumbers = { 5658845, 4520125, 7895122, 8777541, 8451277, 1302850, 8080152, 4562555, 5552012, 5050552,Leave a comment:
-
-
lol, now it gives this error:
ChargeAccount.j ava:17: unreported exception java.lang.Excep tion; must be caught or declared to be thrown
readMyFile("val id_accounts.txt ");
^
1 errorLeave a comment:
-
-
because it gave the error:
ChargeAccount.j ava:48: cannot find symbol
symbol : class File
location: class ChargeAccount
Scanner s = new Scanner(new File("valid_acc ounts.txt"));
^
1 errorLeave a comment:
-
ok lets start fresh. This is my orignal program:
...Code:import java.util.Scanner; public class ChargeAccount1 { static int[] validChargeAccountNumbers = { 5658845, 4520125, 7895122, 8777541, 8451277, 1302850, 8080152, 4562555, 5552012, 5050552, 7825877, 1250255, 1005231, 6545231, 3852085, 7576651, 7881200, 4581002Leave a comment:
-
-
yeah its the first...Have it memorized now lol. I used the System.out.prin tln("number = " + number); got error number symbol not found. then i used the
//code to read the file and store each account into the vector validChargeAcco untNumbers
{
Scanner s = new Scanner("valid_ accounts.txt");
while(s.hasNext Int())
validChargeAcco untNumbers.add( s.nextInt());...Leave a comment:
-
this is what shows up:
----jGRASP exec: java ChargeAccount
Please enter an account number: 5658845
You did not enter a valid account number.
----jGRASP: operation complete.Leave a comment:
-
this is in valid_accounts. txt
5658845
4520125
7895122
8777541
8451277
1302850
8080152
4562555
5552012
5050552
7825877
1250255
1005231
6545231
3852085
7576651
7881200
4581002Leave a comment:
-
Yes it runs but when i enter 5658845(a valid account number) it displays "You did not enter a valid account number." when it should display "That account number is valid."Leave a comment:
-
-
No activity results to display
Show More
Leave a comment: