Question
b) In a file called Totem.java, write and test three static methods, one to output each of the stylized figures that will be on the
b) In a file called Totem.java, write and test three static methods, one to output each of the stylized figures that will be on the totems. The method signatures for those methods are as follows: public static void eagle() public static void whale() public static void human() Test the methods by writing a main that calls all three and confirms to you that they produce exactly the figures above. (This is called a tester program because it simply tests methods.) It might look like this: public static void main(String [] args) {
eagle();
whale();
human();
}
Write a Java program that uses the three methods written in Part (b) above, in particular, it does the following: Outputs a title, Asks the user to specify the number of figures (numFigs), Does the following numFigs times: o Uses a random number generator to choose one of the three figures (1-eagle, 2-whale, 3-human), o Outputs the specified figure.
.--------'```'----....,,______ _, | `-------._./ \ | . . gilrrl 1..-.r ,-Adobe Reader File Edit View Window Help Tools SignComment Sample output of this program: TOT E M G ENER A T OR January2018 How many creatures? = 2 File to submit: Java IN Tvne hero t
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started