Java Mortgage Calculator 026 MonthlyPayments

Alrighty so let’s go down here to the last if statement here and i’m going to say here system out format the message that we have there comma and now i’m going to put in the variables that i need to replace so the first variable was let me see here in the message we have the loan amount phone amount comma on amount comma and we have the was it interest rate

And the last one was years okay let me run this to see how it looks i was looking for the console so i’m gonna go here to windows and say restart restore default layout let me run this again looking for the console and don’t see the console here still i just realized i have this inside of the for loop so that’s why nothing is showing up let’s do a control x

Let’s paste that right here and what happens is the for loop didn’t get executed this time because we didn’t pass in parameters so let’s run that again and there it goes loan amount is three hundred thousand dollars annual interest rate is 0.06 loan period is 30 years and then eventually i want to say here double double what do we call in the spreadsheet so it

Just reads the same way in a spreadsheet the spreadsheet has it as scheduled payments as that and also here and scheduled payments as percent s for now and then we will pass this down here okay so sketch schedule payment is this right now okay so it looks pretty good so far and now i don’t want to print out this information here interest was detected i want

To actually use the logic do the logic to actually get the data so so here this represents the interest so we’re going to see here interest rate is equal to double value of value this will convert that string to the interest rate okay we’re going to copy this logic down here and this is not a double so i don’t want to use it for there here i’m going to use

This one right here this is a double and this value will be used for the loan amount loan amount i will comment this one out let’s see here mode this coming this out for a second we’ll go over what that means later on so we got the loan amount i forgot to do this one years i will be using um years and we’re going to say here integer integer value of value

Comment this out so this will get the data into the correct data type therefore i can actually run the actual calculator all right so then we should be able to do mortgage service and let me see here what was one of the methods name get scheduled payments and we can say here based on that this taken the years the interest rate i’m sorry load them out as first

Actually loan amount years and interest and this will return us the schedule payments run this again let’s just see so here we can see that we have the schedule payments there like that okay so it’s looking good so far

Transcribed from video
Java Mortgage Calculator 026 MonthlyPayments By Jean Boulet