Java

posted by .

Can someone please help me out!!!I included what I have so far..

*Purpose:
Say that you owe the credit card company $1000.00. The company charges you 1.5% per month on the unpaid balance.
You have decided to stop using the card and to pay off the debt by making a monthly
payment of N dollars a month. Write a program that asks for the monthy payment,
then writes out the balance and total payments so far for every succeeding month until the balance is zero or less.

Enter the monthly payment:
100
Month: 1 balance: 915.0 total payments: 100.0
Month: 2 balance: 828.725 total payments: 200.0
Month: 3 balance: 741.155875 total payments: 300.0
Month: 4 balance: 652.273213125 total payments: 400.0
Month: 5 balance: 562.057311321875 total payments: 500.0
Month: 6 balance: 470.4881709917031 total payments: 600.0
Month: 7 balance: 377.54549355657866 total payments: 700.0
Month: 8 balance: 283.20867595992735 total payments: 800.0
Month: 9 balance: 187.4568060993263 total payments: 900.0
Month: 10 balance: 90.26865819081618 total payments: 1000.0
Month: 11 balance: -8.377311936321576 total payments: 1100.0

For each month, calculate the interest due on the unpaid balance.
Then calculate the new balance by adding the interest and subtracting the payment.

*/

class Exercise1
{
public static void main (String[] args )
{

EasyReader console = new EasyReader();

final double owed= 1000.0;
final double tax=0.015;
double previousBalance=0;
int months;

System.out.print( "Enter the monthly payment: " );
double payment = console.readDouble();
double balance =(owed-payment)+(tax*payment);
balance= previousBalance;

while (previousBalance<owed)
{
previousBalance =(previousBalance-payment)+(tax*previousBalance);
System.out.println("Balance: "+previousBalance+ "Total Payments: "+balance);

}



}
}

  • Java -

    this is what i have so far..

    class Exercise1
    {
    public static void main (String[] args )
    {

    EasyReader console = new EasyReader();

    final double owed= 1000.0;
    final double tax=0.015;
    double previousBalance=0;
    int months;

    System.out.print( "Enter the monthly payment: " );
    double payment = console.readDouble();
    double balance =(owed-payment)+(tax*payment);
    balance= previousBalance;

    while (previousBalance<owed)
    {
    previousBalance =(previousBalance-payment)+(tax*previousBalance);
    System.out.println("Balance: "+previousBalance+ "Total Payments: "+balance);

    }



    }
    }

  • Java -

    Do you know what this program is called? (asking)

  • Java -

    class Exercise1
    public static void main (String[] args )
    EasyReader console = new EasyReader();
    final double owed= 1000.0;
    final double tax=0.015;
    double previousBalance=0;
    int months;
    System.out.print( "Enter the monthly payment: " );
    double payment = console.readDouble();
    double balance =(owed-payment)+(tax*payment);
    balance= previousBalance;
    while (previousBalance<owed)
    {
    previousBalance=(previousBalance-payment)+(tax*previousBalance); System.out.println("Balance: "+previousBalance+ "Total Payments: "+balance);
    THEN DON'T ANSWER STUDENT

  • Java -

    while (previousBalance<owed)
    {
    previousBalance =(previousBalance-payment)+(tax*previousBalance);
    System.out.println("Balance: "+previousBalance+ "Total Payments: "+balance);

    if it bothers you so much don't answer STUDENT

  • Java -

    previousBalance=(previousBalance-payment)+(tax*previousBalance);
    System.out.println("Balance:"+previousBalance+ "Total Payments: "+balance);
    if it bothers you so much don't answer STUDENT

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. math

    Mr. Chang and his wife together had an unpaid balance of $500 on their credit cards for one month. THe bank that issued Mr. Chang's credit card charges an intrest rate of 1.25% a month and his wife's interest is 1.5 per month. If the …
  2. math

    Need help with math problem. Tom has an unpaid balance of $2,115.75 on his credit card statement at the beginning of June. He made a payment of $85.00 during the month. If the interest rate on Phil's credit card was 11% per month on …
  3. math

    Phil had an unpaid balance of $1,854.50 on his credit card statement at the beginning of December. He made a payment of $45.00 during the month. If the interest rate on Phil's credit card was 2.5% per month on the unpaid balance, find …
  4. math

    Katie had an unpaid balance of $1,734.50 on her credit card statement at the beginning of January. She made a payment of $165.00 during the month. If the interest rate on Katie's credit card was 7% per month on the unpaid balance, …
  5. math

    if john had an unpaid balance of $1,854.80 on his credit card statement at the beginning of the month and he made a payment of $45.00. If the interest rate of john's card wasw 2.5% on the unpaid balance per month. find the finance …
  6. math

    john had an unpaid debt of $1,177.79 on a credit card at the beginning of the month. He made a payment of $430.00 and made purchases of $366.02 during that month. If the interst rate of john's credit card was 4.5% per month on the …
  7. computer programming

    Paying Off Credit Card Debt Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest …
  8. computer programming

    Paying Off Credit Card Debt Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest …
  9. Computer science

    Paying Off Credit Card Debt Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest …
  10. math

    Question 12.12. Katie had an unpaid balance of $1,734.50 on her credit card statement at the beginning of January. She made a payment of $165.00 during the month. If the interest rate on Katie's credit card was 7% per month on the …

More Similar Questions