Hello, I'm trying to calculate the interest from a bankaccount which is displayed in a text file as followed:
9 2 345
3 3 300
etc. (there are 19 lines in total)
the first number of each line means a day, the second stands for the month and the last for the amount of money on the account.
so the first line is Februari 9th with an amount of 345.
I want to make the program read the textfile with a Scanner. Then it should calculate for every time the balance chages the interest of 3% per year. That means we get the formula: (n/365)*(3/100) There are 365 days in a year, the months have their usual days: 31, 28, 31, 30, 31 etc.
Last, I want to print every period with it's interest and on the last line the total interest earned in that year?
I'm just a beginning programmer and would like to use arrays to solve this problem, but I don't have the experience with it to just put it in BlueJ. Actually I have no idea hwo to do that. How to make the Scanner object, how to let the program read the number: int, double?? how to calculate the interest! that's a drama for me, because I have no idea how to set this up.
So if someone could help me... Thank you.
9 2 345
3 3 300
etc. (there are 19 lines in total)
the first number of each line means a day, the second stands for the month and the last for the amount of money on the account.
so the first line is Februari 9th with an amount of 345.
I want to make the program read the textfile with a Scanner. Then it should calculate for every time the balance chages the interest of 3% per year. That means we get the formula: (n/365)*(3/100) There are 365 days in a year, the months have their usual days: 31, 28, 31, 30, 31 etc.
Last, I want to print every period with it's interest and on the last line the total interest earned in that year?
I'm just a beginning programmer and would like to use arrays to solve this problem, but I don't have the experience with it to just put it in BlueJ. Actually I have no idea hwo to do that. How to make the Scanner object, how to let the program read the number: int, double?? how to calculate the interest! that's a drama for me, because I have no idea how to set this up.
So if someone could help me... Thank you.
Comment