Jon J.

asked • 09/14/20

user-defined function

recode the program below by adding another user-defined function that will display the level welcome message. Explain the revision that you have made in your program. Explain how the program works.


public class MiniGame{

public static void main(String[] args) {

System.out.println("Rank 1");

VictoryMessage(); //function call

System.out.println("Rank 2");

VictoryMessage(); //function call

}

public static void VictoryMessage() {

System.out.println("Victory");

System.out.println("Congratulations!");

System.out.println("You may now proceed to the next rank.");

}

}

1 Expert Answer

By:

Patrick B. answered • 09/14/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Jon J.

Any explanation how you arrive to that program?
Report

09/15/20

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.