hi i really need your help i'm a beginner in java and we're having this homework here is my code its not complete and there is error please help me solve this one :( tell me what to do
import java.io.*;
public class hangukFishShop {
public static void main(String[] args)throws IOException {
BufferedReader fish = new BufferedReader (new InputStreamReader(System.in));
String menu;
String fishX[] = {" Hakula"," Ngatala"," Atu"," Palukula"," Valu"," Takuo"," Mahimahi"};//fish menu
double fishY[] = { 4.50, 6.75, 4.45, 4.80, 5.10, 4.20, 6.90,};//price of the fish
int leng = fishY.length;
double discount1 = 1.80; //discount 10%
double discount2 = 7.20; // discount 20%
double price = 0;
double total = 0;
boolean quit = false;
System.out.println(" WELCOME!! ");
System.out.println(" HANGUK FISH SHOP!! ");
System.out.println(" ____________________ ");
System.out.println(" Item # FISH $$PRICE per kg ");
System.out.println(" ********************************");
for (int i = 0;i<fishY.length;i++){
System.out.println(" " + fishX [i]+" "+ fishY [i]);
System.out.println(" --------------------------------");
}
for (int i=1;i<=7;i++)
System.out.println(i + ". Menu item #" + i);
System.out.println(" ********************************");
do{
System.out.print("Enter Item number: ") ;
menu = fish.readLine();
int menuItems = Integer.parseInt(menu);
switch (menuItems) {
case 1:
System.out.println("hakula $4.50 per kilo");
System.out.print("Kg:");
fishX[0] = fish.readLine();
double hakul = Integer.parseInt(fishX[0]);
calcHaku();//method to calculate the hakula fish
break;
case 2:
System.out.println("Ngatala $6.75 per kilo");
System.out.print("kg:");
fishX[1] = fish.readLine();
int Nga = Integer.parseInt(fishX[1]);
calcNgatala();
break;
case 3:
System.out.println("'Atu $4.45 per kilo");
System.out.print("Kg:");
fishX[2] = fish.readLine();
double Atus = Integer.parseInt(fishX[2]);
calcAtu();
break;
case 4:
System.out.println("Palukula $4.80 per kilo");
System.out.print("Kg:");
fishX[3] = fish.readLine();
double paluk = Integer.parseInt(fishX[3]);
calcPaluk();
break;
case 5:
System.out.println("Valu $5.10 per kilo");
System.out.print("Kg:");
fishX[4] = fish.readLine();
double valus = Integer.parseInt(fishX[4]);
calcValu();
break;
case 6:
System.out.println("Takuo $4.20 per kilo");
System.out.print("Kg:");
fishX[5] = fish.readLine();
double Tak = Integer.parseInt(fishX[5]);
//calcTakuo();
case 7:
System.out.println("Mahimahi $6.90 per kilo");
System.out.print("Kg:");
fishX[6] = fish.readLine();
int Mah = Integer.parseInt(fishX[6]);
calcMahimahi();
break;
case 0:
quit = true;
break;
default :
System.out.println("Invalid choice");
}
}while (! quit);
System.out.println("Bye-bye!");
public void calcHaku(){ //method to calculate the hakula fish
if (hakul == 4){ //if you buy 4kg of hakula
hakul = hakul * fishY[0];
price = hakul - discount1; //discount 10%
System.out.println("Total = $"+price);
}
else if (hakul == 8){ //if buy 8kg
hakul = hakul * fishY[0]; //discount 20%
price = hakul - discount2;
System.out.println("Total = $"+price);
}
else { //else normal prize no discount
price = hakul * fishY[0];
System.out.println("Total $"+price);
}
}
public void calcNGatala(){
if (Nga ==5 & Nga == 6 ){ //
System.out.println("discount 30% on the other fish we sell");
}
else {
System.out.println("charge at the regular price as shown on the list");
}
}
public void calcAtu(){
if (Atus == 4){
Atus = Atus * fishY[2];
price = Atus - discount1;
System.out.println("Total = $"+price);
}
else if (Atus == 8){
Atus = Atus * fishY[2];
price = Atus - discount2;
System.out.println("Total = $"+price);
}
else {
price = Atus * fishY[2];
System.out.println("Total $"+price);
}
}
public void calcPaluk(){
if (paluk == 4){
paluk = paluk * fishY[3];
price = paluk - discount1;
System.out.println("Total = $"+price);
}
else if (paluk == 8){
paluk = paluk * fishY[3];
price = paluk - discount2;
System.out.println("Total = $"+price);
}
else {
price = paluk * fishY[3];
System.out.println("Total $"+price);
}
}
public void calcValu(){
if (valus == 4)
{
valus = valus * fishY[4];
price = valus - discount1;
System.out.println("Total $" + price);
}
else if (valus == 8)
{
valus = valus * fishY[4];
price = valus - discount2;
System.out.println("Total $" + price);
} else
{
price = valus * fishY[4];
System.out.println("Total $" + price);
}
}
public void calcTakuo(){
if (Tak == 4){
Tak = Tak * fishY[5];
price =Tak - discount1;
System.out.println("Total = $"+price);
}
else if (Tak == 8){
Tak = Tak * fishY[5];
price = valus - discount2;
}
System.out.println("Total = $"+price);
else {
price = Tak * fishY[5];
System.out.println("Total $"+price);
}
}
public void calcMahimahi(){
if (Mah ==5 & Mah == 6 ){
Nga = Nga * fishY[1];
price = Nga - discount1;
System.out.println("30% discount on the other fish we sell");
}
else {
Nga = Nga * fishY[1];
price = Nga - discount2;
System.out.println("charge at the regular price as shown on the list");
}
}
}
}