Home Answers Viewqa Java-Beginners to find simple interst

 
 


deepti
to find simple interst
1 Answer(s)      2 years and a month ago
Posted in : Java Beginners

create a class of object insert with a constructor. write a program to find out simple interest

View Answers

April 6, 2011 at 2:32 PM


import java.util.*;
class SimpleInterest 
{
    double p=0;
    double r=0;
    double t=0;
    SimpleInterest(double p,double r,double t){
        this.p=p;
        this.r=r;
        this.t=t;
    }
    public void find(){
    double rate=r/100;
    double si=p*rate*t;
    System.out.println("Simple Interest: "+si);
    }
    public static void main(String[] args) 
    {
        Scanner input=new Scanner(System.in);
        System.out.print("Enter Principal : ");
        double principal=input.nextDouble();
        System.out.print("Enter Rate of Interest(%): ");
        double rate=input.nextDouble();
        System.out.print("Enter Time(years): ");
        double time=input.nextDouble();
        SimpleInterest interest=new SimpleInterest(principal,rate,time);
        interest.find();
    }
}









Related Pages:
to find simple interst
to find simple interst  create a class of object insert with a constructor. write a program to find out simple interest   import java.util....; this.t=t; } public void find(){ double rate=r/100; double
Simple Java Projects
Simple Java Projects  Hi, I am beginner in Java and trying to find Simple Java Projects to learn the different concepts on Java. Can anyone tell me where to get it? Thanks
find the given input is integer or string
find the given input is integer or string  simple coding for to check the given input value is integer or no.If the given value is integer display "Value is integer" otherwise "Value is not a integer"?   class
Find Your Host Name
Find Your Host Name   ... the host name of the local system in a very simple example. Here we are just call...() method and pass it in the object. In this way we find out the ip address
Doclets Find Bad Code - Java Tutorials & Doclets Tutorial
Doclets Find Bad Code 2001-11-17 The Java Specialists' Newsletter [Issue 035] - Doclets Find Bad Code Author: Dr. Heinz M. Kabutz If you are reading... being an OO beginner to an OO guru? Simple answer: Experience! But what if you
Java simple reference source - Java Beginners
Java simple reference source  Hi, please could you recommend me a Java simple reference source (on line or e-book) where I could quickly find... references but there is often a problem to find a banal thing quickly. Thank
query in simple code..i had described all...........
query in simple code..i had described all...........  SAME HERE IF YOU GET THIS PROBLEM SOLVED THEN PLEASE REPLY......... MY ONE JAVA FILE... AbstractDemo.java,I receives en error: AbstractDemo.java:5:cannot find symbol symbol: class B
Simple problem Very Urgent - JSP-Servlet
Simple problem Very Urgent  Respected SDir/Madam, I am R.ragavendran.. Thanks for your superb reply. I got the coding. But I find a simple problem which i hava tried my level best to solve. A pop up window is opening
Simple Program Very Urgent.. - JSP-Servlet
Simple Program Very Urgent..  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your superb reply. I find a simple problem which i have tried my level best to solve.In the output, the text box is receiving some other value
Find prime factors of non prime number
displayed a simple message and if the number is not a prime number we have find all...Find prime factors of non prime number In this section, you will learn how to find the prime factors of the non prime number. Here we have prompted the user
jQuery Simple Drop Down Menu
jQuery Simple Drop Down Menu In this section, you will learn how to develop a simple drop down menu using jQuery. To develop a drop down menu we put...;title>jQuery Simple Drop Down Menu</title> <meta name="keywords"
How to find version of Java installed on my computer? - Java Beginners
How to find version of Java installed on my computer?  How to get version of Java?  What is Java?If is say it in simple words than Java... with many more new features.How to find version of Java installed on my computer
Overview of Networking through JAVA,Find Your Host Name
Find Your Host Name   ... the host name of the local system in a very simple example. Here we are just call...() method and pass it in the object. In this way we find out the ip address
simple program
simple program  how to print * like triangle
simple pgm
simple pgm  a java program which uses super class
simple query
simple query  Write a stored procedure to retrieve a column which are less then or equal to that column using if statement
find the factorial
find the factorial  how to find the factorial through the while loop?   class FindFactorial { public static void main(String[] args) { int value = 5, factorial = 1, temp = value; while
simple examples
simple examples  hi,we want to print a comma between two words we put comma in double quotes .Is it correct
find and substring
find and substring   **import java.io.BufferedReader; import... BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter find...){ } } public void findreplace(String find, String replace
simple eg
simple eg   <?php</li> $string = ?Hello Users?; print (?Welcome to Roseindia, I want to greet $string?); print (??); $string = ?Bye Bye!?; print (?OK meet you soon, $string?); ?> in this program we get a error at line
A Simple program
A Simple program  Hi I have written the following code: class FirstRectangle{ public int rectArea(int l,int b){ int farea = l*b; System.out.println("Required Area::"+farea); return farea
JSP Simple Examples
JSP Simple Examples Index 1. Creating... is a sequence of simple characters. We can get the length... other data types. We can find find out the length of the variable
Simple Java Programs
Simple Java Programs In this section we will discuss about the Java programs... understand how to create Java applications. In this section you will find... will find an example of array which demonstrate you how an array may be use. Java
JSP Simple Examples
important to find the number that is exactly between two numbers. ...;c:forEach> tag is a simple way to iterate over arrays...:forEach> in JSTL <c:forEach> tag is a simple way
Simple JSF Hello Application
Simple JSF Hello Application    .... First line tells where to find JSF html tags that defines html elements and second line tells where to find JSF core tags. A page which contains JSF tags
PHP find online users
PHP find online users  How to find the online users in PHP
find and replace in java
find and replace in java  Need 'find and replace' function in Java to find special keyword in XMl such as @,#,!,%..and replace with their corresponding entities
simple class in php
simple class in php  example of simple class in PHP
MySql find and replace string
MySql find and replace string  How to find and replace string or special characters in MySql & PHP?   Find and Replace String PHP $result = preg_replace('/\band\b/i', 'foo', $subject
WAP to find HCF
WAP to find HCF  Hi, can any one please share teh code to find the HCF of 2 or 3 numbers
Simple FTP upload in Java
Simple FTP upload in Java  How to write a program for Simple FTP upload in Java? Any code example of Simple FTP upload in Java will be very helpful for me. Thanks
simple calculator program in javascript
simple calculator program in javascript  strong textsimple calculator in javascript
idea for find the worm - Security
idea for find the worm  HI Guys, Please give any advise or code for find the worm and prevent the worm.I am doing the project as a distributed antiworm systems.Please help me
Simple JSP program
Simple JSP program  create a simple jsp page in which number is to be entered by user in jsp page and submit button clicked.If number entered is greater then 100,then message box "no is greater" elseif less "no is lesser
Simple Table View With Next View
Simple Table View With Next View In this iphone tutorial will learn how to use... you will find two .h and .m file SimpleTableAppDelegate.h...;Simple Table Exmaple";    
.jar file keeps giving me " could not find the main class". Program will exit.
.jar file keeps giving me " could not find the main class". Program will exit... even with a simple file that displays a jframe with a jlabel on it. My... click on it, it gives me the message" could not find the main class. Program
Simple Login(JSF)
Simple Login(JSF)  I have tried to run the Simple Login code provided using netbeans. It gives me error. CAn I run it using netbeans or need to config anything in order to run the prog
simple calculator - Java Beginners
simple calculator  how can i create a simple calculator using java codes?  Hi Friend, Please visit the following link: http://www.roseindia.net/java/example/java/swing/calculator-in-swing.shtml Thanks
simple team leader
simple team leader  Could you please help me to write a program for a simple team leader?   Please clarify your problem. Which type of program you want to create in java? Please specify
simple program question
simple program question  how do i get a java program to take an input from the user and have it terminate by a period and not by pressing enter
simple webdesign program with coding
simple webdesign program with coding  how to design a webpage using html   Please go through the following link: HTML Tutorials
Find city latitude and longitude
Find city latitude and longitude  Hi, I have to find find city latitude and longitude for one of map based application. My application is based on Google map and I am adding cities using city latitude and longitude. In my
find the first character is vowel or not
find the first character is vowel or not  hi friend, can u plz send me javascript code for find the wether the first character is a vowel or not. 2) check wether the last character is same as the first character or not 3) check
Simple java applet
Simple java applet  Create a Java applet to display your address on the screen. Use different colors for background and text   Please visit the following link: Applet Examples
Sort the element find mean
Sort the element find mean  Hi Friend, I want to find meaning of some real numbers like, if we have numbers- 52.15, 89.0, 314.48, 845.75, 309.11, 575.36, 398.98, 318.64, 2485.12, 377.44 Then I want to find
developing simple web service
/ About Axis: Apache Axis is an implementation of the Simple Object...: The Web Services Invocation Framework (WSIF) is a simple Java API
Run a simple EJB code
Run a simple EJB code  I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving... is acceptable). Thanks.   Please visit the following link: Simple EJB
Run a simple EJB code
Run a simple EJB code  I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving... is acceptable). Thanks.   Please visit the following link: Simple EJB
Java Find Next Date Example
Java Find Next Date Example In this example we will discuss about how to find... the Eclipse IDE and JDK 1.6. Example : Here I am giving a simple example which will demonstrate you about how to find the next date of the input date

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.