Soo.. I have this programming thing for school and im gettin reallly frustrated coz i just wont get it. I managed to make some basic stuff, which is nothing like required or not even pretty coding. So here is what the program should do:
1. Asks from user amount of loan, yearly intrest and monthly payment and stores this info to array(s) (and arrays confused the heck out of me) 2. Checks that the info the user inputted is ok (numbers, bigger than 0, monthly payment is bigger than first months intrest(if not it chages monthly payment to first months intrest + 1) 3. Then asks the user if he wants to input other combination (Yes/No) if answer is yes it does the steps 1 and 2 again (and again and again), if answer is no, goes to step 4 4. calculates how long it takes to pay the loan back, how much were total intrests, how much was total cost (loan + intrests) 5. Prints out the info from all combinations AND writes same info in text file Out put would look like this: 1. loan loan amount: 1000 euro intrest: 10 % monthly payment: 100 euro total intrests: 48,6 euro total cost: 1048,6 euro time: 0 year 11 months
2. loan loan amount: 1200 euro intrest: 15 % monthly payment: 90 euro total intrests: 121 euro total cost: 1321 euro time: 1 year 3 months
And ofc it should be nice and tidy, so that stuff is in differetn methods, rather than all in main, but again that was something i couldnt figure out. and ofcourse it only needs 1 decimal or no decimals at all.
So if someone would have some free time in their hands to find time to help this girl out, you would have my eternal grattitude and admiration :) I know its askin a lot so if u feel like im out of the line, just ignore me, thanks all.
This is what i got done: import java.io.*;
public class loancalc {
public static void main (String args[]) throws Exception {
BufferedReader stdin = new BufferedReader ( new InputStreamReader ( System.in ));