public class SimpleInterest{
float principal,intRate, numOfYears;
public void setPrincipal(float principal){
this.principal = principal;
}
public void setIntRate(float intRate){
this.intRate = intRate;
} public void setNumOfYears(float numOfYears){
this.numOfYears = numOfYears;
} public float calculateSimpleInterest(){
return (this.principal * this.intRate * this.numOfYears) /100; } public static void main(String argv[]){
float principal,intRate, numOfYears;
SimpleInterest simpIntObj = new SimpleInterest();
principal = Float.parseFloat(argv[0]);
intRate = Float.parseFloat(argv[1]);
numOfYears = Float.parseFloat(argv[2]);
simpIntObj.setPrincipal(principal);
simpIntObj.setIntRate(intRate);
simpIntObj.setNumOfYears(numOfYears);
System.out.println ("Principal = "+principal);
System.out.println ("Interest Rate = "+intRate);
System.out.println ("Num of Years = "+numOfYears);
System.out.println ("Simple Interest Amount = "+simpIntObj.calculateSimpleInterest());
} }
Yes
sum = 0; for (int i = 12; i
In the same way as you would compile and execute any other Java program. Compile: use the "javac" command. Or use the built-in "compile" command in your favorite IDE. Execute: Use the "java" command. Or use the built-in "run" command in your favorite IDE.
You can have the below line as the first and last line of the program and find out the difference in time taken to calculate the execution time. This will print the system time in the console which can be used to calculate execution time.System.currentTimeMillis();
Reference:cprogramming-bd.com/c_page1.aspx#simpleinterest
Yes
bgfygfrhjyuyhh
You can use Java's built-in functions to write a code that will find multilingual languages.
"No such method" is an error message that may appear when attempting to create a program with Java. Users who understand the Java programming language can find an answer on websites such as Stack Overflow and Crafting Java.
You can find compound interest calculators online on financial websites, as well as on banking or investment platforms. Additionally, many mobile apps are available that offer compound interest calculators for easy and convenient use on smartphones or tablets.
write a java program to find factorial using recursive and non recursive
You can use the Math.sqrt() method.
You can use the following to find out the memory usage information for a Java Program:Runtime.getRuntime().maxMemory()Runtime.getRuntime().totalMemory()Runtime.getRuntime().freeMemory()
800 x (1.04)6 ie Rs1012.26
it is zero i'm a bad boy
If the rate of annual interest is r% the period is n years and the amount invested is y Then the compound interest is y*(1+r/100)^n - y
You can find lots of sample Java programs on the Internet. If you need something customized, you can hire programmers in sites such as ODesk, ELance, and others.