NBKRIST Java Hub

← Back to Exam Panel

Problem Statement: Bank Loan System

Your task is to create a simple Bank Loan system using core Java concepts. This problem will help you understand how to use **interfaces**, **inheritance**, and **packages** to structure a well-organized application.

Functional Requirements

Technical Requirements

Testing Requirements

Your main method must demonstrate the program works by testing the following scenarios:

  1. Individual Loan Test:
    • Create a HomeLoan object (e.g., loan amount 500000, rate 0.05, term 360). Print its calculated monthly interest.
    • Create a CarLoan object (e.g., loan amount 30000, rate 0.08, term 60). Print its calculated monthly interest.
  2. Polymorphism & Package Test:
    • Create a List of type Loan. Add both the `HomeLoan` and `CarLoan` objects to it.
    • Loop through the list and call the `calculateMonthlyInterest()` method on each object. The output should show the correct calculation for each loan type, demonstrating how packages and polymorphism work together.