Question: JAVA from control structures through objects 6th edition programming challenge #9 Ackermann's Function Ackermann's function is a recursive mathematical algorithm that can be used to

JAVA from control structures through objects 6th edition

programming challenge #9

Ackermann's Function

Ackermann's function is a recursive mathematical algorithm that can be used to test how well a computer performs recursion.

write a method ackermann(m,n), which solves Ackermann's function. use the following logic in your method:

if m = 0 then return n +1

if n =0 then return ackermann (m-1,1)

otherwise, return ackermann (m - 1, ackermann (m, n - 1))

Test your method in a program that displays the return values of the following method calls:

ackermann (0, 0) ackermann (0, 1) ackermann (1, 1) ackermann (1, 2)

ackermann (1, 3) ackermann (2, 2) ackermann (3, 2)

please do the following when writing this programm

*please make sure program has good comments for better understanding

*Please create a methodClass and demoClass

* please create a UML diagram of the method class

it should look like this

className
+-attributes
+operations

and lastly please write a JAVADOC explaining what is going on in the code, must NOT be generated!

here is an exmaple of one written in word https://image.slidesharecdn.com/javadocguidelines-120828104832-phpapp02/95/javadoc-guidelines-3-728.jpg?cb=1346213590

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!