帮助如何启动此程序 [英] help on how to start this program

查看:82
本文介绍了帮助如何启动此程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个计算每月按揭付款的程序。每月抵押贷款支付与每月贷款支付相同。通常,房地产贷款被称为抵押贷款。在这种情况下,您知道贷款金额,称为本金,年度支付利息以及偿还贷款的时间长度。该计划需要获取该信息并计算每月付款。使用以下信息和提供的公式:



下面公式中的字母代表以下数值:



P - - 借入的本金金额或贷款金额

R - - 每月计算的利息率

N - - 偿还贷款的月数或抵押



每月付款= [(R *(1 + R)^ N)/((1 + R)^ N-1)] * P / br >




TextLab03学生版请勿复制此文件。



// TextLab03st.java

// Mortage支付计划

//这是学生,TextLab03任务的起始版本。



公共类TextLab03st

{

public static void main(String args [])

{

System.out.println(TextLab03,学生版本\ n);

双本金= 259000;

double annualRate = 5.75;

double numYears = 30;





System.out.println();

}

}



重要提示

由于您还没有学习计划输入,委托人的价值,年利率以及偿还的年数贷款在提供的计划中硬编码......但是公式要求偿还贷款的月数,而不是年数。感兴趣还有两个问题。该数字写为5.75,但5.75%= 0.0575。最重要的是,您将获得年度利息,但该公式需要每月利息。在所有这些情况下,您需要让程序进行必要的转换,以便公式起作用。





硬编码警告

该计划中唯一硬编码的是委托人,年利率和偿还贷款的年数。其他一切必须由程序计算。例如,像numMonths = 360这样的命令;或者更糟的dailyPayment = 1511.45将使你在这个实验室获得0。程序必须自己计算。





80点版本

80点版本只计算每月抵押付款。

Write a program that will compute a monthly mortgage payment. A monthly mortgage payment is the same as a monthly loan payment. Normally, real estate loans are called mortgage loans. In this case you know the amount of the loan, called the principal, the annual interest paid, and the length of time to pay back the loan. The program needs to take that information and compute the monthly payment. Use the information and the provided formula below:

The letters in the formula below represent the following values:

P - - Principal amount borrowed, or loan amount
R - - Rate of interest computed for each month
N - - Number of months to pay back the loan or mortgage

Monthly Payment=[(R*(1+R)^N)/((1+R)^N-1 )] *P


TextLab03 Student Version Do not copy this file, which is provided.

// TextLab03st.java
// The Mortage Payment Program
// This the student, starting version of the TextLab03 assignment.

public class TextLab03st
{
public static void main(String args[])
{
System.out.println("TextLab03, Student Version\n");
double principal = 259000;
double annualRate = 5.75;
double numYears = 30;


System.out.println();
}
}

Important Note
Since you have not learned program input yet, the values of the principal, the annual rate of interest and the numbers of years to pay back the loan are hard coded in the provided program… however the formula requires the number of months to pay back the loan, not the number of years. There are also two issues with the interest. The number is written as 5.75, but 5.75% = 0.0575. On top of that you are provided with annual interest, but the formula requires monthly interest. In all of these cases, you need to make the program do the necessary conversions so the formula will work.


Hard Coding Warning
The only things hard coded in this program are the principal, the annual rate of interest and the numbers of years to pay back the loan. Everything else must be computed by the program. For example, a command like numMonths = 360; or worse monthlyPayment = 1511.45 will cause you to earn a 0 on this lab. The program must do its own calculations.


80 Point Version
The 80 point version only computes the monthly mortgage payment.

推荐答案

哇,如果我们做完作业,我们会得到成绩吗?



为了帮助你完成作业,你需要表明你至少已经尝试过自己解决问题。



展示你的作品。 />


如果您在特定问题上遇到问题,那么您可以提出一个问题。



但是,我们不会为你做功课。这会导致一些严重的道德问题,因为这将是你的成绩,但将成为别人的工作。
Wow, if we do your homework, will we get the grade?

In order to help you with your homework, you need to show that you have made at least some attempt to solve the problem yourself.

Show your work.

If you have a problem on a particular issue, then you can ask a question that topic.

However, we will not do your homework for you. This would cause some serious ethical issues since it will be your grade but will be someone else's work.


这篇关于帮助如何启动此程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆