Home | How it works | Projects archive | Contact Us
Air Compressor Bot
 
The Career Path of Freelance Programming Jobs 

   Mortgage Calculator

Bidding Time:
27/03/2006 22:57 - 28/03/2006 22:57
Budget:
$25-75
Status:
Closed

Job Type:
Java
Description:



This is a mortgage calculator. Will require to build a library and access the
information from there.

Need this to be done ASAP. Thanks!
Additional Info (Added 3/27/2006 at 23:00 EST)... 1.1 The Story
Consider the program you wrote for Assignment 1. We will now convert it to an
object oriented program with some modifications. Assume that the LoansRUS
mortgage broker sells two types of mortgages: fixed, variable.


Type Interest
Rate Duration
(years) Points1 Fixed
Duration Increment
duration Increment
amount Max
rate
Fixed 6% 30 1%
Fixed 5.75% 15 1%
Variable2 5% 30 0 3 1 2% 10%
Variable 4.5% 15 0 2 1 1% 12%

Table 1-- Mortgage Products

When a customer calls LoansRUS, the brokers try to sell the products in Table
1. They are interested in a CRM (customer relationship management) program that
keeps track of what type of loans customers asked about. They would like to
store each request by customer name, the potential loan amount, and the type of
product a customer was interested in. I will call this class Request.

1 A point is a percentage that you pay upfront. For example on a loan of
$100,000, one point would cost you $1000.00 upfront. You can, buy down the point
(so that you do not pay the 1000 at closing) at the cost of increasing your
percentage. The rule of thumb used by most brokers is that one point will cost
you .25% on interest rate.
2 This loan is usually called a 3/1ARM. That is it is fixed for 3 years after
which it can increase 2% every year.
3 In short, you should code getInterest, getPoints to return the current values
in the object and setInterest and setPoints to change the value of the
associated variables.
4 To keep things simple assume that the principal amount did not change during
the fixed period. That is, it is still the original loan amount. In reality
during the fixed period you paid some of it down so the new payment calculations
should be based on a smaller amount. Ignore this fact for the purposes of this
assignment.
6 you do not need to worry about resizing the array.
7 I realize this probably is not the best way to do this but I want you to get
comfortable with using interface references and casting.
8 The Integer wrapper supplied by Java for int is not working the way I had
thought, so you will have to create your own wrapper class.
1.2 Design specs for the class library

• Create the necessary classes to represent the mortgage products. It should be
clear that there is at least one base class and one or two derived classes
(depending on how you decide to implement it).
• Create a Request class. It should store, name, loan amount and a reference to
the mortgage hierarchy. You can have only one reference regardless of what type
of mortgage the borrower is interested in (think polymorphic behavior).
• All classes must implement the following interface.
public interface IDisplayable {
void Display()
}
Method Display is intended to display the contents of the object that
implements the IDisplayable interface as a row of a table. Your main program
will call Display method to display the contents of the object on the screen.
• None of the instance variables in the mortgage hierarchy can be public.
• The instance variables interest rate, points and duration should be private.
You should have get/set3 methods for interest rate and points variables but not
the duration (think what it implies for the duration variable).
• The mortgage hierarchy should override equals and clone methods of the Object
class. The request class should override the equals method.
• Each class should have at least two constructors: a default constructor and
one that can initialize all its instance variables (i.e., if the class has 4
instance variables then the constructor should have 4 parameters).
• The mortgage hierarchy has to have a method to compute the monthly payments
(use the formula from assignment 1) given a loan amount, call it ComputePay. For
fixed loans there is only one monthly payment, so this function should just
output one value. For variable loans this function should compute the payment
during the fixed period and then what the payment would be4 if the interest rate
increases by the maximum allowable amount in the next period (based on Table 1,
the first variable loan increases by 1% every year after the first three years).
To call this function polymorphically, without creating versions, declare its
return type as an array of floats (i.e., float [] ComputePay(loanamt) ). The
fixed mortgage types return an array of size one, the others return an array of
two.
1.3 Design specs for the application
• Your application should import the MorgLib library appropriately5.
• In the static main create two arrays:
o Name the first one mortgages. Its size should be 6 so that it can hold the
mortgage product information given in Table 1. You are to decide the array’s
type.
o Name the second array requests. “requests” should be of size 50 to hold
enough of the requests6. The type of this array should be IDisplayable7.
1.3.1 The run-time behavior of the application
• When the program starts you should instantiate the mortgages array,
instantiate each mortgage object using the values in Table 1 and store each in
the mortgages array.
• Instantiate the requests array (size 50).
• In a loop {
• Display each mortgage product (using Display) on the screen, numbered 1, …,
4.
• Ask the user the mortgagee’s name and loan amount.
• Ask the user which product they are interested in (1, …, 4).
• If the user enters 0 do not enter the loop. (user is not interested in any
product)
• In a loop{
• Ask to how many points they would like to add to their loan (a negative value
would mean subtracting points, a positive value would mean adding points).
Adding a point to the loan reduces the interest rate by a quarter percent and
subtracting a point increases the interest rate by a quarter percent. For
example, assume the customer chose the first loan (6%, 30,1) and decided to
subtract a point then the loan would be


Type Interest Rate Duration (years) Points Fixed Duration Increment
duration Increment amount Max rate
Fixed 6.25% 30 0


• After the points issue is resolved do the following
• clone the mortgage object using the clone method of the mortgage the user
selected ( in the mortgages array). This you should do polymorphically.
• adjust the clone’s points and interest rate based on the user’s answer, using
the get/set methods of the cloned mortgage object.
• instantiate the request object
• link the clone mortgage object to the request object (remember the reference
in the request object?)
• Add the request object to the requests array only if the request, mortgage
combo does not exist in the array (here you need to use the equals method).
• Display the monthly payment (s) of this loan on the screen. Use the
ComputePay method polymorphically.
• Ask the user which product they are interested in (1, …, 4)
• If the user enters 0 exit the loop o/w loop back.
• } //end of the loop

• Ask the user quit or continue. If quit exit the loop otherwise loop back.
• }
• Once the user stops the loop by selecting q, display the contents of the
requests array (including the mortgage each request has) using the Display
method you implemented.
Additional Info (Added 3/27/2006 at 23:04 EST)... Attached file: mjava.doc

STOPzilla! Anti-Spyware Software

Related Projects:
If You Know The Best Answer...
Voice Chat Room
Let's Be Partners
Facebook clone
Business Website Logo

This project is the proprietary information of . Click here to remove this project from OUR database.
Operating System:
Windows
Database System:
(None)
<<< back

Recent Projects Archive:

Thursday - Wednesday - Tuesday - Monday - Sunday - Saturday - Friday

View all freelance web projects

 
Home | Projects archive | RSS | Resources | Links | Contact Us © 2004-2009 ProjectsList.biz /0.089