Answer to Question #246171 in Java | JSP | JSF for Chadwin Fritz

Question #246171
PostGraduate

-thesis: String

+<<constructor>> PostGraduate()

+<<constructor>> PostGraduate(String,String,Long,double)

+setThesis(String): void

+getThesis(): String

+toString(): String

+show(): void

+interest(): double

Code the method interest(). This method returns a double value calculated as follows: loanAmount times 10%.
1
Expert's answer
2021-10-06T16:37:33-0400
import java.util.Scanner;
public class PostGraduate  
 {  static void interest(){
    double p,interest;
    
    Scanner input= new Scanner(System.in);
    System.out.print("Enter the price: ");
              p = input.nextDouble();
               interest=p*0.1;
              System.out.println("Interest is: " +interest);  
    }
     public static void main (String args[]) 
    { interest(); 
 } } 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS