Java程序设计-实验报告1-模板(1)(2)

2020-03-26 21:46

}

}

System.out.println(animal.getAnimaName());

public class Application { }

public static void main(String[] args) { }

Simulator si = new Simulator(); si.playSound(new Dog()); si.playSound(new Cat());

public class Loan { }

import java.util.Scanner;

public class Application {

public static void main(String[] args) {

Loan loan = new Loan(); float annualInterestRate;

int mortgage;

int loanyear;

float getMonthlyInterestRate(){ }

double getMonthlyPayment(){ }

double getSumPayment(){ }

return getMonthlyPayment() * loanyear * 12;

return mortgage * getMonthlyInterestRate() / (1 - Math.pow((1 / (1 + return annualInterestRate / 12;

getMonthlyInterestRate())), mortgage * 12));

}

}

Scanner sc = new Scanner(System.in);

System.out.print(\); loan.mortgage = sc.nextInt();

System.out.print(\); loan.loanyear = sc.nextInt();

System.out.print(\); loan.annualInterestRate = sc.nextFloat();

System.out.println(\);

System.out.printf(\, loan.getMonthlyPayment()); System.out.println(\);

System.out.printf(\, loan.getSumPayment());

2)程序运行结果

Speed=2200 Amount=200

run dog's cry. Dog

run cat's cry. Cat

please input number of loan account:100 please input number of loan years:1 please input annual interest rate:1.2 monthly payment = 10.00

summary payment = 120.00

四、程序调试报告及总结

(调试中遇到的问题及解决方法,并说明实验过程中对Java知识点的认识及收获等)……

1. 熟悉了文本编辑在编程java中的使用 学会了终端调试 2. 进一步明白了java与c的区别和联系 3. 熟悉了接口和类的区别 4. 学会了怎么用类和串口 5. 学会了在类里头用方法


Java程序设计-实验报告1-模板(1)(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:STM32 UCOS移植分析 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: