Answer:
public class NumbersDemo
{
public static void displayTwiceTheNumber(int number) {
System.out.println("Twice of the number: "+ number * 2);
}
public static void displayNumberPlusFive(int number) {
System.out.println("Number plus five: "+ (number + 5));
}
public static void displayNumberSquared(int number) {
System.out.println("Square of the number: "+ (number * number));
}
public static void main(String[] args) {
int number1 = 7;
int number2 = 28;
displayTwiceTheNumber(number1);
displayNumberPlusFive(number2);
displayNumberSquared(number1);
}
}
Step-by-step explanation:
Each function is defined as requested. Since they display the results, their return type is void, and they take one parameter - an integer.
In the main;
Numbers are initialized.
Functions are called by typing their name, and giving one integer parameter. You can pass any number you like.