answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
emmasim [6.3K]
2 years ago
7

Create an application named NumbersDemo whose main() method holds two integer variables. Assign values to the variables. In turn

, pass each value to methods named displayTwiceTheNumber(), displayNumberPlusFive(), and displayNumberSquared(). Create each method to perform the task its name implies. Save the application as NumbersDemo.java.
Computers and Technology
1 answer:
puteri [66]2 years ago
7 0

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);

}

}

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.

You might be interested in
Write the prototype for a function named showValues. It should accept an array of integers and an integer for the array size as
aalyn [17]

Answer:

void showValues(int [<em>maximum</em><em> </em><em>volume</em>],int);

4 0
2 years ago
Read 3 more answers
The ________ program displays graphics and loading screens during the boot process.
Minchanka [31]
Booting would be complete if the normal, runtime environment has been achieved. A boot loader is a program that loads operating system for the computer after the completion of power on tests. The boot manager is a program that displays graphics and loading screens during the boot process.
3 0
2 years ago
The tuna marketers' task in the "tunathewonderfish.com" website and related campaign was to ________.
Wewaii [24]
The answer to this question is "to monitor all the elements of the marketing mix for a Oregon winery". This is the main task of the tuna marketer's task in the emailing or website which is very known s tunwonderfish.com and this compaign was exclusively related to the elements of mixing in a large Oregon winery but not including the production.
4 0
2 years ago
What does the following function return? void index_of_smallest(const double all, int startindex, int numberOfSlots); A. a doubl
Flauer [41]

Answer:

nothing

Explanation:

Because the return type of the function is void. void means does not return any thing.

The syntax of the function:

type name( argument_1, argument_2,......)

{

  statement;

}

in the declaration the type define the return type of the function.

it can be int, float, double, char, void etc.

For example:

int count( int index);

the return type of above function is int. So, it return integer.

similarly,

void count(int index);

it return type is void. So, it does not return any thing.

7 0
2 years ago
Open "Wireshark", then use the "File" menu and the "Open" command to open the file "Exercise One.pcap". You should see 26 packet
murzikaleks [220]
Idk idk idk idk idk idk
8 0
2 years ago
Other questions:
  • Exercise 6.3 consider memory storage of a 32-bit word stored at memory word 42 in a byte-addressable memory. (a) what is the byt
    14·1 answer
  • The video clip on driverless cars explained that brain signals from the individual wearing the headset are converted by computer
    13·2 answers
  • The bit width of the LRU counter for a 32 KB 16-way set associative cache with 32 Byte line size is
    13·1 answer
  • The matrix theory is used in the ___ technique
    8·1 answer
  • When you park on a hill, think about which way _____.
    6·2 answers
  • Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the printAll() member method and a separate println()
    5·1 answer
  • A class of Students was previously defined with the following properties: a string name, an integer age, a Boolean variable indi
    14·1 answer
  • In an executing process, the program counter points __________.
    15·1 answer
  • Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It shou
    7·1 answer
  • Question 1:State the values of a, b, c, d and e after the following operations are carried out:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!