prob here
in the line above I'm importing from a class i made in the package... but it cant see any of my public methods.... help please
here is the code for that class
Code:
/*
* Store.java
*
* Created on December 17, 2006, 11:50 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package proj;
import java.lang.*;
/**
*
* @author gmanr26
*/
public class Store {
public String [][] cust_info = new String [9][1000];
public String [][] acc_info = new String [5][1000];
private int count = 0;
private int counter = 0;
public void deposit (String acc_num, String dollars){
int spot;
spot = search_array_2 (acc_num, acc_info);
if (spot >=0){
String bal = acc_info [5][spot];
Integer bal_int = (Integer.parseInt(bal));
Integer dep = Integer.parseInt(dollars);
bal_int = bal_int + dep;
bal = bal_int.toString();
acc_info [5][spot] = bal;
}
}
public void withdraw (String acc_num, String dollars){
int spot;
spot = search_array_2(acc_num, acc_info);
if (spot>=0){
String bal = acc_info [5][spot];
Integer bal_int = Integer.parseInt(bal);
Integer with = Integer.parseInt(dollars);
if (bal_int>= with ){
bal_int = bal_int - with;
bal = bal_int.toString();
acc_info [5][spot] = bal;
}
}
}
public String get_bal (String acc_num){
String bal = null;
int spot;
spot = search_array_2(acc_num, acc_info);
if (spot>=0){
bal = acc_info [5][spot];
}
return bal;
}
public void new_acc (String [] args){
//if (args.length>0)
for (int a = 0; a<5; a++){
acc_info [a][counter] = args [a];
}
counter++;
}
public void end_acc (String acc_num){
int spot;
spot = search_array_2 (acc_num, acc_info);
if (spot >=0){
}
}
private int search_array_2 (String ac_num, String [][] from){
int line= 0;
String answer = null;
for (int a = 0; a <1000; a++){
if (from [2][a] == ac_num) {
line = a;
}
else {
line = -1;
}
}
return line;
}
private String [][] clear_array (String [][] full){
for (int a =0; a < 1000; a++){
for (int b = 0; b < 9; b++){
full [b][a]= null;
}
}
return full;
}
private String [][] copy_array (String [][] from, String [][] to,
int begin_1, int end_1, int begin_2,
int end_2){
clear_array (from);
for (int a = begin_1; a < end_1; a++){
for (int b = 0; b <9; b++){
to [b][a] = from [b][a];
}
}
for (int a = begin_2; a < end_2; a++){
for (int b = 0; b <9; b++){
to [b][(end_1 - 1)] = from [b][a];
end_1++;
}
}
return to;
}
private String print_cust_line (int line, String [][] from){
String ln = null;
for (int a = 0; a < 9; a++){
ln = ln + " " + from [a][line];
}
return ln;
}
private String search_array (String ac_num, String [][] from){
int line;
String answer = null;
for (int a = 0; a <1000; a++){
if (from [1][a] == ac_num) {
line = a;
answer = print_cust_line (line, from);
}
else {
answer = "This customer does not exist";
}
}
return answer;
}
private void delete (int ln){
String [][]temp = new String [9][1000];
copy_array (cust_info, temp, 0, ln-1, ln+1, 1000);
clear_array (cust_info);
copy_array (temp, cust_info, 0, 0, 0, 1000);
clear_array (temp);
count--;
}
public void new_cust (String [] args){
// if (args.length>0){
for (int a = 0; a < 9; a++){
cust_info [a][count] = args [a];
}
count++;
// }
}
}