Write a java program using classes and object to read the em[loyee code (Integer), Imployee name (string), Basic salary )double), Category (Character)then calculate the bonus(double)and the total salary(double)eligible for each employ. The output should have the employee code, employee name, basic salary, grade bonus and the total salary. The program must use switch-case construct for calculations. Test your program for 5 employees.

If the employee belong to
Grade A bonus=20% basic
Grade B bonus=15% basic
Grade C bonus=10% basic
Grade D bonus=7% basic
Grade E bonus=5% basic

Sample Output:
Employee code :1234
Employee Name :aaaa
Basic Salary :1000 $
Grade :A/B/C/D/E
Bonus :1111$
Total Salary : Basic salary + Bonus

suggested approach:

create a class for each Employee, with class properties as
integer code
string name
double salary
char category
double bonus
double totalSalary

with class methods called
double calculateBonus()
void printEmployee()

Use switch-case to calculate bonus.
Add bonus and salary to get totalSalary. Bonus is usually a percentage (see table given) of salary.

Here's a Java program that reads employee information, calculates the bonus and total salary based on the grade, and displays the output for 5 employees:

```java
import java.util.Scanner;

class Employee {
int empCode;
String empName;
double basicSalary;
char grade;
double bonus;
double totalSalary;

Employee(int empCode, String empName, double basicSalary, char grade) {
this.empCode = empCode;
this.empName = empName;
this.basicSalary = basicSalary;
this.grade = grade;
}

void calculateBonus() {
switch (grade) {
case 'A':
bonus = 0.2 * basicSalary;
break;
case 'B':
bonus = 0.15 * basicSalary;
break;
case 'C':
bonus = 0.1 * basicSalary;
break;
case 'D':
bonus = 0.07 * basicSalary;
break;
case 'E':
bonus = 0.05 * basicSalary;
break;
default:
System.out.println("Invalid grade!");
break;
}
}

void calculateTotalSalary() {
totalSalary = basicSalary + bonus;
}

void displayEmployeeDetails() {
System.out.println("Employee Code: " + empCode);
System.out.println("Employee Name: " + empName);
System.out.println("Basic Salary: $" + basicSalary);
System.out.println("Grade: " + grade);
System.out.println("Bonus: $" + bonus);
System.out.println("Total Salary: $" + totalSalary);
System.out.println();
}
}

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

for (int i = 1; i <= 5; i++) {
System.out.println("Employee " + i + ":");
System.out.print("Enter employee code: ");
int empCode = scanner.nextInt();
System.out.print("Enter employee name: ");
String empName = scanner.next();
System.out.print("Enter basic salary: $");
double basicSalary = scanner.nextDouble();
System.out.print("Enter grade (A/B/C/D/E): ");
char grade = scanner.next().charAt(0);

Employee employee = new Employee(empCode, empName, basicSalary, grade);
employee.calculateBonus();
employee.calculateTotalSalary();
employee.displayEmployeeDetails();
}

scanner.close();
}
}
```

Make sure you compile and run this program, and then you will be prompted to enter the employee details for 5 employees.
The program will calculate the bonus and total salary for each employee based on their grade (A/B/C/D/E), and then display the employee details including the employee code, employee name, basic salary, grade, bonus, and total salary.

Hope this helps!