当前位置:天才代写 > JAVA代写,java代考-JAVA作业代写免费Moss检测 > Java作业代写 homework代写 C++/C代写 Python代写 Matlab代写

Java作业代写 homework代写 C++/C代写 Python代写 Matlab代写

2021-05-04 17:19 星期二 所属: JAVA代写,java代考-JAVA作业代写免费Moss检测 浏览:646

Java代写

CSE 270M – homework4 – due MONDAY, November 4, by 9am – 35 points

Java作业代写 You will submit three things (files should be zipped together):●A Logo file (FMSLogo format, or simply a text file that lists your Logo procedures

You will submit three things (files should be zipped together): Java作业代写

  • A Logo file(FMSLogo format, or simply a text file that lists your Logo procedures so that I can copy and paste them and run them.  You could use the online Logo interpreter at https://www.calormen.com/jslogo/, useful for Mac users who can’t run FMSLogo).
  • A Java file(with the six methods I’ve highlighted below)Java作业代写
  • Either a printed paper brought to my office, or a pdfof your work for #2.  Either way, it is due by Monday, November 4, by 9am.  If you are submitting a printout, it is due to my office, 205L Benton Hall by 5pm (just slide it under my door or ask Ms. Strecker to put it in my mailbox).

1.(10 points) In class, we examined the first two stages of creating Koch’s Snowflake, using “tiny triangles” as the unit of area, and the length of one side of the tiny triangle as the unit of length.  Java作业代写

a.At stage 0, the perimeter is 81, and the area is 729.

b.At stage 1, the perimeter is 108, and the area is 972.

In your Java file write the following two methods that should compute the area and perimeter of a stage-n Koch’s snowflake (so, for example, it should give the same values shown above for stages 0 and 1).

  • public static double kochArea(int n)Java作业代写
  • public static double kochPerimeter(int n)

Then, write a method named:

  • public static void kochResults()

which displays in table form the area and perimeter of Koch’s Snowflake from stages 0 through 20.  The output should look something like this.  Java作业代写

0  81.00000 729.00000

1 108.00000 972.00000

Area and perimeter should be displayed with the same number of decimal points at each stage (5 places is fine, but you might choose to show more).  Keep results right-aligned (so decimal points line up).

Java作业代写
Java作业代写

2.(10 points) On paper or in a pdf Java作业代写

The “real” Koch’s Snowflake is the theoretical figure that would be obtained if the construction process could be repeated infinitely.  The real Koch’s Snowflake has a perimeter that is infinite, and an area that is finite. Mathematically derive the exact area of the real snowflake.  Use techniques from class for computing series to clearly demonstrate how you computed the area.  Don’t use a formula.  Use the same units of measure as above and as used in class (tiny triangles).  Begin with a triangle whose sides measure 27 units.  Your arguments/proof should:Java作业代写

  • Be your own
  • Be clear, including clearly indicating the final result
  • Be explained as you go.  If it is not entirely obvious how statement B follows from statement A, then explain why it follows.  Don’t assume, “Norm surely knows what I’m thinking.”  He probably doesn’t.

3.(10 points) In your Logo file Java作业代写

(either FMSLogo or a text file with Logo procedures in it that I can copy, paste, and run)

  • Implement a procedure named cantor that draw’s Cantor’s set for any length and any given depth.  For example cantor 90 0 would draw a segment of length 90, while cantor 75 1 would draw 2 segments of length 25, and so on.
  • Implement a procedure named sierpinski for any size and depth.  For example, sierpinski 100 5 should draw a stage-5 Sierpinski triangle with sides of length 100.  There is no need to shade or color in any of the triangles.Java作业代写

4.(5 points) The harmonic series is 1 + 1/2 + 1/3 + 1/4 + ….

You could use a loop to compute this using Java’s primitive double type, but it has very limited precision.  Java’s BigDecimal type uses arbitrary precision.  This means you can get as many digits of precision as you need, up to the memory limits of your computer.  Learn how to use Java’s BigDecimal class (for example, learn the limitations encountered when you try to compute 1/3 using BigDecimal, and learn how scale can be used to control the number of digits after the decimal point).  Then, write the following method in your Java file:

  • public static BigDecimal harmonicSum(int n, int places)Java作业代写

This method should compute the sum of the first n terms of the harmonic series, and return the result with the specified number of places after the decimal point (rounding the last digit down).  For example:

harmonicSum(2, 3) should return 1.500

harmonicSum(7, 21) should return 2.592857142857142857142Java作业代写

Then, write a method named:

  • public static void harmonicResults()

which displays in table form the harmonic sum for the first n terms, as n goes from 1 to 20, rounding each answer to 20 places after the decimal point.  For example, the first 3 lines of output should be the following:

1 1.00000000000000000000

2 1.50000000000000000000Java作业代写

3 1.83333333333333333333

  1. In your Java file, Implement the following method so that when your Java main() method is called, it displays kochResults() followed by harmonicResults():
  • public static void main(String[] args)

Extra credit: What is the smallest value of n for which your harmonicSum() method would return a value greater than 50?  Explain.Java作业代写

CSE 270M-homework4-截止日期为11月4日,星期一,上午9点-35点

您将提交三件事情(文件应压缩在一起):
●徽标文件(FMSLogo格式,或者只是列出您的徽标过程的文本文件,以便我可以复制并粘贴并运行它们。可以使用在线徽标解释器,网址为https://www.calormen.com/jslogo/ ,对于无法运行FMSLogo的Mac用户很有用)。
●一个Java文件(具有下面重点介绍的六种方法)Java3代写
●要么将打印好的纸张带到我的办公室,要么将您工作的pdf格式带到我的办公室#2。无论哪种方式,都应在11月4日星期一上午9点​​之前提交。如果您要提交打印输出,则应在下午5点之前送达我的办公室,即205L Benton Hall(只需将其滑到我的门下或请Strecker女士放入我的邮箱中)即可。

1.(10分)在课堂上,我们检查了创建科赫雪花的前两个阶段,使用“小三角形”作为面积单位,而小三角形的一侧的长度作为长度单位。Java作业代写
在第0阶段,周长为81,面积为729。
b。在第1阶段,周长为108,面积为972。

在您的Java文件中,编写以下两种方法来计算n级科赫雪花的面积和周长(因此,例如,对于阶段0和1,它应提供与上面所示相同的值)。
●公共静态double kochArea(int n)
●公共静态双精度倍数perimeter(int n)Java作业代写

然后,编写一个名为:
●公共静态无效kochResults()

表格以表格形式显示了从0阶段到20阶段的科赫雪花的面积和周长。输出应如下所示。

0 81.00000 729.00000
1 108.00000 972.00000

面积和周长在每个阶段都应显示相同的小数点数(5位可以,但是您可以选择显示更多)。保持结果右对齐(使小数点对齐)。Java作业代写

2.(10分)在纸上或PDF上,“真实的”科赫雪花是可以无限次重复构建过程而获得的理论数字。真正的科赫雪花的周长是无限的,面积是有限的。用数学方法得出真实雪花的确切面积。使用课堂上的技术计算系列,以清楚地演示如何计算面积。不要使用公式。使用与上述相同的度量单位,并在课堂上使用这些度量单位(小三角形)。从三角形开始,其边长为27个单位。您的论据/证明应:
●做你自己的
●要清楚,包括清楚表明最终结果
●随身携带。如果不是很清楚语句B如何从语句A发出,请解释其原因。不要以为“ Norm一定知道我在想什么。”他可能没有。Java作业代写

3.(10分)在您的徽标文件中(FMSLogo或带有徽标过程的文本文件,我可以复制,粘贴和运行该文件)
○执行一个名为cantor的过程,该过程可绘制任意长度和任何给定深度的Cantor集。例如,cantor 90 0将绘制一个长度为90的线段,而cantor 75 1将绘制两个长度为25的线段,依此类推。
○对任何大小和深度都执行名为sierpinski的过程。例如,sierpinski 100 5应该绘制一个边长为100的5级Sierpinski三角形。在任何三角形中都无需着色或着色。Java3代写

4.(5分)谐波序列是1 + 1/2 + 1/3 + 1/4 +…。您可以使用Java的原始double类型使用循环来计算此次数,但其精度非常有限。 Java的BigDecimal类型使用任意精度。这意味着您可以根据需要获得尽可能多的精度,最高可达计算机的内存限制。了解如何使用Java的BigDecimal类(例如,了解尝试使用BigDecimal计算1/3时遇到的限制,并了解如何使用小数位来控制小数点后的位数)。然后,在您的Java文件中编写以下方法:

●公共静态BigDecimal谐波和(int n,int位)Java作业代写

此方法应计算谐波序列的前n个项的总和,并以小数点后的指定位数(将最后一位向下取整)返回结果。例如:

谐波和(2,3)应该返回1.500
谐波和(7,21)应该返回2.592857142857142857142

然后,编写一个名为:
●公共静态无效谐函数Results()Java作业代写

它以表格形式显示前n个项的谐波和,当n从1到20时,将每个答案四舍五入到小数点后20位。例如,输出的前三行应为以下内容:

1 1.00000000000000000000
2 1.50000000000000000000
3 1.83333333333333333333

5,在您的Java文件中,实现以下方法,以便在调用Java main()方法时,它显示kochResults()后跟谐和结果():

●公共静态void main(String [] args)Java作业代写

额外的功劳:谐和()方法将返回大于50的值的n的最小值是多少?解释。

Java作业代写
Java作业代写

其他代写:algorithm代写 analysis代写 app代写 assembly代写 Haskell代写 homework代写 java代写 数学代写 考试助攻 web代写 program代写 cs作业代写 source code代写 finance代写 Data Analysis代写

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式