Professional Documents
Culture Documents
System.out.println();
}
return quarterSale;
}
public static void combQuartSales(int highStreet[][], int mallStreet[][]){
int total = 0; int r=0;
for (int counts = 0; counts < 4; counts++){
int j = 0;
for (int i = 0; i < 3; i++){
if (j < 3){
total = total + highStreet[r][j];
j++;
}
}
int m = 0;
for (int k= 0; k < 3; k++){
if (m < 3){
total = total + mallStreet[r][m];
m++;
}
}
r++;
System.out.println("Quarterly sales for both shops: " + total);
total = 0;
}
}
return saleTotal;
}
public static void rankMonthlyPerformance (int high[][], in mall[][]) {
int month = 1;
for (int i=0; i < 3; i++) {
int quarterSale1=0; int quarterSale2=0;
for (int j = 0; j < 4; j++){
quarterSale1 += high[j][i];
}
month++;
}
}
}
public static void main (String[] args){
int highStreet[][] = {{42000, 48000, 50000}, {52000, 58000, 60000}, {46000,
49000, 58000}, {50000, 51000, 61000}};
int mallBranch[][] = {{57000, 63000, 60000}, {70000, 67000, 73000}, {67000,
65000, 62000}, {72000, 69000, 75000}};
System.out.println("----------------------------");
System.out.println("----------------------------");
System.out.println("\n");
System.out.println("Grand Annual Sales for the two Shops: " +
(annualSales(highStreet) + annualSales(mallBranch)));
System.out.println("\n");
System.out.print("According to the annually sales for both shops: ");
rankMonthlyPerformance(highStreet, mallBranch);
System.out.println("----------------------------");
System.out.println("----------------------------");
rankQuarterlyPerformance(highStreet, mallBranch);
}
}