Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could someone please write a UML digram of the method class in this code that look like this: ClassName +attributes -attributes +operations -operations here is

Could someone please write a UML digram of the method class in this code that look like this:

ClassName

+attributes

-attributes

+operations

-operations

here is an example of one UML that has been done for a previous program

ClassNameHere

- name : String

- phoneNumber : int

+ PhoneBookEntry()

+ setName(String) : void

+ getName(): String

+ setNumber(int) : void

+ getNumber() : int

And there also needs to be a JAVADOCs written too, in word, not generated from java compiler

here is an example of this form the link

http://cf.ppt-online.org/files/slide/q/qSJCLazKPmGo5wl8Q3pdRIBkEtVMn4bseZy10W/slide-14.jpg

Here is the code:

MethodClass.java

public class MethodClass {

public int ackermann(int m,int n){ //if m is 0 if(m==0){ return n+1; } //if n is 0 if(n==0) return ackermann(m-1,1); //if m is not zero and n is also not zero return ackermann(m-1,ackermann(m,n-1)); } }

DemoClass.java

public class DemoClass {

//test method ackermann(int , int) public static void main(String a[]){ MethodClass mc=new MethodClass(); //test with 0,0 input int acc=mc.ackermann(0,0); System.out.println("output with 0,0: "+acc); //test with 0,1 input acc=mc.ackermann(0,1); System.out.println("output with 0,1: "+acc); //test with 1,1 input acc=mc.ackermann(1,1); System.out.println("output with 1,1: "+acc); //test with 1,2 input acc=mc.ackermann(1,2); System.out.println("output with 1,2: "+acc); //test with 1,3 input acc=mc.ackermann(1,3); System.out.println("output with 1,3: "+acc); //test with 2,2 input acc=mc.ackermann(2,2); System.out.println("output with 2,2: "+acc); //test with 3,2 input acc=mc.ackermann(3,2); System.out.println("output with 3,2: "+acc); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

how can data analytics be applied to the field of accounting?

Answered: 1 week ago