Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners to find simple interst

Have Programming Question? Ask it here!
 
 
 


deepti
to find simple interst
1 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners


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


Advertisement
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 Tutorials/Questions & Answers:
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 program
simple program  how to print * like triangle
Advertisements
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 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
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
PHP find online users
PHP find online users  How to find the online users in PHP
simple class in php
simple class in php  example of simple class 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
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
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
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 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 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 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 webdesign program with coding
simple webdesign program with coding  how to design a webpage using html   Please go through the following link: HTML Tutorials
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 Example of Hibernate 4
Simple Example of Hibernate 4  Hi, As a new comer in the Hibernate programming, I want simple program of Hibernate to learn the basic concepts... Simple Example More Tutorials for a beginner: Hibernate Tutorials Home page
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
Simple application using hibernate
Simple application using hibernate  Hi, How to write a simple application using hibernate in Eclipse IDE? I would like to to learn: Process... of the tutorial you will like to learn for creating the simple application using
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
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
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
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
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
simple java search engine
simple java search engine  i have already downloaded the project simple java search engine.but i am not able to run it.can anyone help me.i have.... ABSTRACT Title : Simple Search Engine System Specification: The system on which
Find the Running time in sql***
Find the Running time in sql***  I have 10 backend jobs in sql which runs at different time intervals. Sample data is shown below Table name:- Job... want to find the running time of both the jobs. (i.e when i run the query
simple javascript validation for numbers
simple javascript validation for numbers  simple javascript validation for register number   Here is a html code that accepts number from the user and check whether the entered value is valid. <html> <head>
java find the error1
java find the error1  package com.test.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DBConnections { public static String userName=""; public static String
Simple EJB3.0 - EJB
Simple EJB3.0  Hi friends... I am new user for this roseindia.net.. i am new for EJB3.0 also.. >>> my question is how to make session bean and how to access this session
find largest value
find largest value  (Assignment 1 - LargestValue)The process of finding the largest value (i.e., the maximum of a group of values) is used frequently...; Java Find Largest Number import java.util.*; class FindLargest
Simple clarification - JSP-Servlet
Simple clarification  Respected Sir/Madam, Thanks for your immediate response..Sorry for troubling you again and again. So,you told that there is no possibility for getting my alert box in home page. Is there any other
Create a Simple Procedure
Create a Simple Procedure       Simple Procedure is a set of SQL statement which are executed... how to create a simple procedure. This procedure display all records of stu
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
simple code - Java Beginners
simple code  to input a number and check wether it is prime or not and print its position in prime nuber series.  Hi friend, Code to help in solving the problem : import java.io.*; class PrimeNumber { public
WRITE a simple JSP
WRITE a simple JSP  Write a JSP that accepts a string parameter from the browser and simply displays it back in the HTML response   Hi Friend, Try the following code: 1)form.jsp: <html> <form name="form
Simple Question - JDBC
Simple Question  Respected Sir/Madam, I am R.Ragavendran.. Can I know the following syntax is valid or not? while(rs.next()) { <% <TR> } Because its not working for me.. It is throwing
java spring simple application
java spring simple application  hai I have design a simple application in this I always found class not found exception. I am sendig code as follows please resolve this and send me.my directory structure is as follows Project
Error in simple session bean ..................
Error in simple session bean ..................  Hi friends, i am trying a simple HelloWOrld EJb on Websphere Applicatiopn server 6.1. Can any one plz help me to solve this issue. here is the client code which i have
java find the error7
java find the error7   var name=document.forms["insert"]["in_username"]; var age=document.forms["insert"]["in_userage"]; var address=document.forms["insert"]["in_address"]; var phone=document.forms["insert
java find the error2
java find the error2  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub String temp=request.getRequestURI
java find the error3
java find the error3  public String studentDel(StudentBean studObj) throws ClassNotFoundException, SQLException { Connection conObj=DBConnections.setConnection(); PreparedStatement ps
 

 

 

DMCA.com