老实说,我很遗憾这个项目。有人请帮忙。 [英] I honestly am lost to this project. Someone please help.

查看:73
本文介绍了老实说,我很遗憾这个项目。有人请帮忙。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此作业中,您将编写一些执行常见几何计算的方法,例如计算圆的面积,或直角三角形的周长,或框的体积。



您要编写一些执行常见几何计算的方法。下面是您要添加到Logic.java文件中包含的Logic类的方法的标题。这些只是标题。你的工作是将每个方法,包括方法标题和方法体添加到文件Logic.java。



public static double rectangleArea(double length,double width )



公共静态双长方形(双倍长度,双倍宽度)



public static double circleArea(double半径)



public static double circleCircumference(double radius)



public static double rightTriangleArea(double base,双倍高度)



公共静态双右三角度(双底座,双倍高度)



公共静态双箱体积(双倍长度,双倍宽度,双倍深度)



公共静态双盒子表面区域(双倍长度,双倍宽度,双倍深度)



public static double sphereVolume(double radius)



public static double sphereSurfaceArea(double radius)



每种方法od应按指定的顺序接受上面指定的参数。建议您只需将上述标题复制粘贴到您的文件中即可。然后,这些方法应执行必要的计算并将结果返回给调用者。计算方法相当明显。为了计算三角形的面积和周长,我们只对具有给定基数和高度的直角三角形(以及方法的名称)这样做。



源代码美学(注释,缩进,间距,标识符名称):您应该正确缩进代码。代码的任何行都不应超过100个字符(更好的是将行限制为80个字符)。您应该使用一致的编程风格。这应包括以下内容:


$ b $b有意义的变量&方法名称
$ b $b一致的缩进
$ b $b使用空格和空白行使代码更具可读性使用注释来解释棘手的代码
$ b $b所有方法的注释标题,解释方法计算的内容以及任何前置或后置条件。



我尝试过的:



我还没试过。这项任务让我感到非常难过,至于谷歌搜索,我甚至不知道要查询什么。

In this assignment, you are to write a handful of methods that perform common geometry calculations such as calculating the area of a circle, or the perimeter of a right triangle, or the volume of a box.

You are to write a handful of methods that perform common geometry calculations. Below are the headers of the methods you are to add to the Logic class contained in the file Logic.java. These are just the headers. Your job is to add each of these methods, including method header and method body, to the file Logic.java.

public static double rectangleArea(double length, double width)

public static double rectanglePerimeter(double length, double width)

public static double circleArea(double radius)

public static double circleCircumference(double radius)

public static double rightTriangleArea(double base, double height)

public static double rightTrianglePerimeter(double base, double height)

public static double boxVolume(double length, double width, double depth)

public static double boxSurfaceArea(double length, double width, double depth)

public static double sphereVolume(double radius)

public static double sphereSurfaceArea(double radius)

Each method should accept parameters as specified above, in the specified order. It is recommended that you simply copy-n-paste the above headers into your file. The methods should then perform the necessary calculations and return the results to the caller. What the methods compute is fairly obvious. For computing the area and perimeter of a triangle, we will doing so only for a right triangle with the given base and height (and thus the names of the methods).

Source code aesthetics (commenting, indentation, spacing, identifier names): You should properly indent your code. No line of your code should be over 100 characters long (even better is limiting lines to 80 characters). You should use a consistent programming style. This should include the following.

 Meaningful variable & method names
 Consistent indenting
 Use of "white-space" and blank lines to make the code more readable  Use of comments to explain pieces of tricky code
 Comment headers on all methods that explain what the method computes and any pre- or post-conditions.

What I have tried:

I haven't tried a thing. This assignment has me totally stumped, and as for google searches, I don't even know what to query.

推荐答案

所以,你没有尝试解决问题你自己,毫无疑问,你只是想让我们做你的HomeWork。

HomeWork问题是你在现实生活中需要解决的问题的简化版本,目的正在学习并且练习



我们不做你的HomeWork。

HomeWork不会测试你乞求别人做你的工作的技巧,它是让您思考并帮助您的老师检查您对所学课程的理解以及您应用这些课程时遇到的问题。

你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。

你的任何失败都会帮助你了解什么有效,什么无效,被称为'试错'学习。

所以,试一试,重读课程并开始工作。如果您遇到特定问题,请显示您的代码并解释这个问题,我们可能会提供帮助。

So, you show no attempt to solve the problem yourself, you have no question, you just want us to do your HomeWork.
HomeWork problems are simplified versions of the kind of problems you will have to solve in real life, their purpose is learning and practicing.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
Quote:

我没有尝试过。这项任务让我感到非常难过,至于谷歌搜索,我甚至不知道要查询什么。

I haven't tried a thing. This assignment has me totally stumped, and as for google searches, I don't even know what to query.



这项任务是你将拥有的最简单的任务之一。如果你不能做一件事,甚至找不到数学,想想另一份工作。

[更新]


This assignment is among the most easy you will ever have. If you can't do a thing, not even find the maths, think about another job.
[Update]

引用:

我正在寻求的是一些指导。

What I am seeking is some guidance.



除了做这项工作之外没有任何指导。答案很短,以至于它们符合一行代码。

建议:找另一个教程,按照它。你需要的是你学到的第一件事。


There is no guidance other than doing the job. Answers are so short that they fit in 1 line of code.
Advice: find another tutorial, follow it. What you need is one of the very first things you learn.


考虑作业中的第一个:

Consider the first one in the assignment:
public static double rectangleArea(double length, double width)



因此名为<$的方法c $ c> rectangleArea 接受两个输入参数 double 类型,即 length 宽度。它返回一个 double 值,该方法需要计算。



所以你需要做的就是编写代码进行计算,这并不困难。


So the method named rectangleArea takes two input parameters which are double types, namely length and width. It returns a double value, which the method is required to calculate.

So all you need to do is to write the code to do that calculation, which is not exactly difficult.


这篇关于老实说,我很遗憾这个项目。有人请帮忙。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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