O'Reilly logo

Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications by Paul Anderson, Gail Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.2. The Loan Enterprise Bean

Ok, interest rates have fallen and it's time to refinance that loan you've been thinking about. How much should you borrow and for how many years? What would your new monthly payment be?

Let's design a Loan enterprise bean that provides methods to calculate long-term fixed rate loans, such as home loans. Our Loan EJB will have three business methods. The first method returns the monthly payment (principal and interest) one must pay given the loan amount, annual interest rate, and term (the length of the loan in years). The second method produces an amortization table providing a month-by-month payment schedule of the loan. A third method produces a year-by-year payment schedule.

In presenting this example, we'll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required