This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Joanne Neal wrote:You need to read HowToAskQuestionsOnJavaRanch, especially the NotACodeMill link.
elvin saflor, this was already pointed out to you in your earlier thread. I suggest you go through all the topics linked from the HowToAskQuestionsOnJavaRanch page Joanne has pointed you to, so you can learn how to get the best benefit from the Ranch.
There are no new questions, but there may be new answers.
Campbell Ritchie wrote:And also, do not delete a post which has been answered. That makes the remainder of the discussion look like nonsense.
Well, here is a copy of the original post...
elvin saflor wrote:Make a program that will compute the monthly payment of a particular loan
- make a class named loan
- declare attributes amount loaned , duration , interest , total loaned and monthly payment
- declare setter and getter methods for amount loaned and duration
- create overloading constructor
- 1st constructor is a default
Constructor that assign 10000 to amount loan and 5 months for duration
- 2nd constructor accept single value for amount and assign 5 months for duration
- 3rd constructor accept 2 values for amount loan and duration
- Declare method getInterest that accept value for duration and return the interest based on the ff condition
- Create method getTotolloan that accept values for amount loaned , interest and duration and contain compilation (amount loan*interest)*term
Create method getMonthlyPayment that receives value of total loan and duration , and will return the quotient of total loan/duration.
Make a class named Costumer w/ contain the main method
- Ask the user to input value for amount and duration and pass it into the constructor
Compute the interest , total loan , and monthly payment using method in loan class