class or interface expected
hi guys, i've been trying to create a new method but I also get this 'class or interface expected' error. could you tell me what I'm doing wrong?
import java.util.Scanner;
public class FishShopApp1
{
public static void main (String [] args)
{
Scanner sc = new Scanner (System.in);
double baseArea, height, contents;
int choice = 0;
int opt = 0;
double amt;
//First fish tank
System.out.print("Enter base area: ");
baseArea = sc.nextDouble(); sc.nextLine();
System.out.print("Enter height of fish tank: ");
height = sc.nextDouble(); sc.nextLine();
System.out.print("Enter contents: ");
contents = sc.nextDouble(); sc.nextLine();
FishTank fishTankOne = new FishTank(baseArea, height, contents);
//Second fish tank
System.out.print("Enter base area: ");
baseArea = sc.nextDouble(); sc.nextLine();
System.out.print("Enter height of fish tank: ");
height = sc.nextDouble(); sc.nextLine();
System.out.print("Enter contents: ");
contents = sc.nextDouble(); sc.nextLine();
FishTank fishTankTwo = new FishTank(baseArea, height, contents);
//Third fish tank
System.out.print("Enter base area: ");
baseArea = sc.nextDouble(); sc.nextLine();
System.out.print("Enter height of fish tank: ");
height = sc.nextDouble(); sc.nextLine();
System.out.print("Enter contents: ");
contents = sc.nextDouble(); sc.nextLine();
FishTank fishTankThree = new FishTank(baseArea, height, contents);
do
{
System.out.println("Fish Shop Menu");
System.out.println("=================================");
System.out.println("1. Add water to fish tank");
System.out.println("2. pour water from one tank to another");
System.out.println("3. Show biggest contents");
System.out.println("4. Exit");
System.out.print("Please choose an option: ");
opt = sc.nextInt(); sc.nextLine();
switch(opt)
{
case 1:
addWater(sc, fishTankOne, fishTankTwo, fishTankThree, amt);
break;
case 2:
break;
case 3:
break;
default:
break;
}
}while (opt!=4);
}
}
public static void addWater(FishTank fishTankOne,fishTankTwo, fishTankThree, double amt)
{
Scanner sc = new Scanner(System.in);
double baseArea, height, contents;
int choice = 0;
int opt = 0;
double amt;
if (choice == 1)
{
System.out.print("Now, enter the amount of water to be added in: ");
amt = sc.nextDouble(); sc.nextLine();
fishTankOne.addIn(+amt);
if (+amt < baseArea * height)
{
System.out.println("Water added in successfully.");
}
else
{
System.out.println("Too much water, fish tank will overflow.");
}
}
else if (choice == 2)
{
System.out.print("Now, enter the amount of water to be added in: ");
amt = sc.nextInt(); sc.nextLine();
fishTankTwo.addIn(+amt);
if (+amt < baseArea * height)
{
System.out.println("Water added in successfully.");
}
else
{
System.out.println("Too much water, fish tank will overflow.");
}
}
else if (choice == 3)
{
System.out.print("Now, enter the amount of water to be added in: ");
amt = sc.nextInt(); sc.nextLine();
fishTankThree.addIn(+amt);
if(+amt < baseArea * height)
{
System.out.println("Water added in successfully.");
}
else
{
System.out.println("Too much water, fish tank will overflow.");
}
}
else
{
System.out.println("Invalid option");
}
}
the error I get it
FishShopApp1.java:98: 'class' or 'interface' expected
public static void addWater(FishTank fishTankOne,fishTankTwo, fishTankThree, double amt)
^
1 error
Thanks in advance

