answersLogoWhite

0


Best Answer

package javaapplication1;

import java.util.*;

class amount

{

double amount;

double intrest;

int year;

amount(double a, double i)

{

a=amount;

i=intrest;

int y=year=5;

double s_intrest;

}

}

public class Main

{

public static void main(String[] args)

{

double a,i,s_intrest;

int y=5;

Scanner s=new Scanner(System.in);

a=s.nextDouble();

i=s.nextDouble();

amount a1=new amount(a,i);

s_intrest=(a*i*y)/100;

System.out.println(s_intrest);

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Java program to calculate simple interest using constructor overloading for attributes like principal rate and time?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to calculate interest?

Pmt/principal


How do we calculate interest PART and principal part in an EMI?

http://blog.investraction.com/2007/04/emi-principal-and-interest-calculator.html


How do you calculate the centroid of a rectangular solid?

It is the point where the principal diagonals meet.


The beginning amount used to calculate interest?

it is the principal amount... i.e., the amount for which u have to calculate the interest Enjoy!! Kush


What is the monthly principal and interest fee?

At www.HSH.com you can quickly calculate what your principal and interest will be on the life of your loan. Just enter the information asked for and the calculator will do the work for you.


How do you calculate the Principal repaid after a period of time on a loan?

get the difference of interest rate and monthly periodic payment


How can you calculate your CD interest rate?

To calculate CD interest rate, all you have to do is to just multiply the principal amount you have invested in CD with interest rate. If u want to calculate for the monthly interest then divide the resultant with 12.


How do you compute current portion of long term loan?

calculate the principal due in one year together with the interest payable.


Calculate the simple interest on a loan with a principal of 6.000 an interest rate of 7.39 percent and a term of four years?

1,773.60


How do you calculate principal when amount rate of interest and time is given?

A = P*(1+R/100)T Where A = amount P = Principal R = Interest Rate (in percentage), and T = Time Since R and T are known, you can calculate (1+R/100)T = k, say. Then A = P*k so that P = A/k


How do you calculate principal and interest when amountrate of interest and time period is given?

The amount, P, is the principal. If the rate is r% compounded annually for y years, then the total interest earned is P*[(1 + r/100)^y - 1]


How do you calculate interest of 6 months fixed deposit with the principal of 10000 and the interest rate is 8 percent?

The formula to calculate interest is as follows: Interest = Principal * No. of years * Rate of Interest / 100 So Interest = 10000 * 0.5 * 8 / 100 = 400/- The interest you will receive interest at the end of the 6 month period is Rs. 400/-