Document 2
Document 2
import java.util.Random;
int products = 5;
int branches = 4;
// Initialize the stock levels with random values between 0 and 100
// Calculate the total stock for each product across all branches
int highestStock = 0;
int totalStock = 0;
totalStock += stockLevels[i][j];
highestStock = totalStock;
highestProduct = i;
}
Task 2: Username Verification
import java.util.Scanner;
// Display Matrix 1
System.out.println("\nMatrix 1:");
displayMatrix(matrix1);
// Display Matrix 2
System.out.println("\nMatrix 2:");
displayMatrix(matrix2);