Hello.
I am currently attempting to create a program that uses the method 'waitNSeconds' to wait a different number of seconds before displaying the number of each different bank note, displayed at the bottom of the program, but when trying to compile the program I keep getting the error 'cannot find symbol' on the line 'wait1second' in my for loop.
Here's what I have so far:
public class BankTeller1
{
public static void waitNSeconds(int number)
{
int i;
for (i = 0; i < number; i++)
{
wait1second();
}
}
public static void main (
String args[])
{
// declare and initialise variables
int Sterling = 77;
String indent = " ";
int Hundreds, Fifties, Twenties, Tens, Fives,Ones;
// Convert sterling amount into a working number of pounds
Ones = Sterling;
// perform calculations
// How many hundreds?
Hundreds = Ones / 100;
// Carry forward whatever is left
Ones = Ones % 100;
// How many fifties?
Fifties = Ones / 50;
// Carry forward whatever is left
Ones = Ones % 50;
// How many twenties?
Twenties = Ones / 20;
// Carry forward, and so on
Ones = Ones % 20;
Tens = Ones / 10;
Ones = Ones % 10;
// How many fives?
Fives = Ones / 5;
// Carry forward, and so on
Ones = Ones % 5;
// output results
System.out.println("The notes are :");
System.out.println();
System.out.println(indent + "Fifties : " + Fifties);
System.out.println(indent + "Twenties : " + Twenties );
System.out.println(indent + "Tens : " + Tens );
System.out.println(indent + "One pound coins :" + Ones);
System.out.println();
System.out.println("Total: " + Sterling + " pounds");
}
}
Any help/advice would be greatly appreciated.