Define a MoreMath class that has a factorial method that takes an integer and returns the factorial of that integer. Make this method a class method by using the keyword static in the method declaration after the public keyword.

What will be an ideal response?


```
/? ?
? C l a s s f o r more m a t h e m a t i c a l f u n c t i o n s
? @author Barb E r i c s o n
?/
public c l a s s MoreMath
{
/? ?
? Method t o c a l c u l a t e t h e f a c t o r i a l o f a number
? @param t h e number t o u s e i n t h e c a l c u l a t i o n
? @return t h e f a c t o r i a l o f t h e number
?/
public s t a t i c i n t f a c t o r i a l ( in t n )
{
i f ( n == 0 )
return 1 ;
else
return n ? f a c t o r i a l ( n ?1);
}
}
```

Computer Science & Information Technology

You might also like to view...

The Type on a Path tool can be used on objects such as ____.

A. circles B. bitmaps C. gradients D. blends

Computer Science & Information Technology

Center alignment places text in the middle of the page

Indicate whether the statement is true or false

Computer Science & Information Technology

Narrowband transmissions require significant power for the signal to be transmitted because the signal must exceed the ____________________, or the total amount of outside interference, by a substantial margin.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

You should ____ a function name in the Formula AutoComplete list to select the function.

A. double-click B. click C. right-click D. none of the above

Computer Science & Information Technology