import java.util.
Scanner;
public class StudentFeeCaclulator{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input student details
System.out.print("Enter Registration Number: ");
String registrationNumber = scanner.nextLine();
System.out.print("Enter Student Name: ");
String studentName = scanner.nextLine();
System.out.print("Enter Band (1-5): ");
int band = scanner.nextInt();
// Define the scholarship and loan amounts based on the band
int governmentScholarship = 0;
int studentLoan = 0;
switch (band) {
case 1:
governmentScholarship = 15000;
studentLoan = 22000;
break;
case 2:
governmentScholarship = 25000;
studentLoan = 25000;
break;
case 3:
governmentScholarship = 45000;
studentLoan = 29000;
break;
case 4:
governmentScholarship = 55000;
studentLoan = 31000;
break;
case 5:
governmentScholarship = 55000;
studentLoan = 31000;
break;
default:
System.out.println("Invalid Band! Please enter a band between 1 and 5.");
return;
// Total fee is a constant value
final int totalFee = 90000;
// Calculate remaining fee to be paid by the student
int remainingFee = totalFee - (governmentScholarship + studentLoan);
// Output the results
System.out.println("Registration Number: " + registrationNumber);
System.out.println("Student Name: " + studentName);
System.out.println("Band: " + band);
System.out.println("Government Scholarship: " + governmentScholarship);
System.out.println("Student Loan: " + studentLoan);
System.out.println("Total Fee: " + totalFee);
System.out.println("Remaining Fee to be paid by the student: " + remainingFee);
// Close scanner
scanner.close();