1answer.
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
Effectus [21]
3 years ago
12

What are the benefits of writing functions that use parameters and return List 2 please and explain what is return

Computers and Technology
1 answer:
Ratling [72]3 years ago
3 0

<u>Answer and explanation:</u>

There are many benefits of writing functions that use parameters and return. Some of them are:

1. Flexibility: With functions having parameters, several values of the parameters can be used at invocation time thereby making the application flexible. For example, given the following function in Java.

<em>public void showName(String name){</em>

<em>    System.out.println("Your name is " + name);</em>

<em>}</em>

To call this method (function), the programmer could use various values for the name parameter used in the function like so:

showName("John");

showName("Doe");

If the function didn't have a parameter, it is possible it will only print a hardcoded name every time the function is called.

2. Scope Control: When a function is allowed to return a value, it helps to work around scope issues since variables declared within a function are limited to that function and do not exist outside the function. This means that the values of these variables cannot be used anywhere else outside the function in which they are being declared. However, if the function returns a value, the value can be used anywhere else in the program.

For example:

<em>public String getDouble(int x){</em>

<em>    int y = x * 2</em>

<em>    return y;</em>

<em>}</em>

The function above returns twice the value of the argument supplied to it. Since the integer variable y is declared within the function, it's value cannot be used outside the function. However, since the value is being returned by the function, it could be used anywhere the function is being called. Thanks to the return keyword.

You might be interested in
Why might it be a good idea to choose a bus topology?
Shtirlitz [24]

Answer:A

Explanation: Its cheap and easy to install

7 0
2 years ago
Read 2 more answers
Pig Latin is ______ and fits very naturally in the pipeline paradigm while SQL is instead declarative.
alisha [4.7K]

Answer:

Option b) is correct

Explanation:

Pig Latin is a language game in which English words are altered either by adding a suffix or such kind of suffix can be created by adding a syllable (vocalic). For example, ''hello'' becomes ''ello-hay''.

Pig Latin is <u>procedural</u> and fits very naturally in the pipeline paradigm while SQL is instead declarative.

3 0
2 years ago
HELP ASAP, AND YES I KNOW, WRONG CATEGORY. SORRY!
Anastasy [175]

Answer:

A. ensemble.

Explanation:

A musical ensemble can be defined as a group of people who play instrumental and vocal music. It is also known as a music group and carries a distinct name. The word ensemble is derived from the Middle French ensemblée, meaning together at the same time.

A rock band will come under the category of a musical ensemble as it is also a group of people performing instrumental music or vocal music.

Therefore, option A is correct.

3 0
3 years ago
Electronic transmission of information standards, such as transaction and code sets and uniform identifiers, are covered underQu
Mila [183]

Answer:

option A

Explanation:

Option A.

With the use of Administrative simplification, we can transform all the paper work to electronic media such as electronic receipts or electronic mail. By shifting towards electronic means in Administrative simplification we are actually saving a lot of time by helping the human resource and from the laborious tasks of paper work and data management.

The management of electronic means is very easy and friendly, it is also a reason for implementing administration simplification as well.

3 0
3 years ago
What are the reasons why is it necessary to evaluate online sources and content?
marissa [1.9K]
1) You don't know if the source is reliable. 
2) It is better to cite reliable sources so.
7 0
3 years ago
Other questions:
  • How does the team know what to work upon during the iteration
    6·1 answer
  • Word 2013 in order to share a document online you must first
    10·1 answer
  • The United States is the only country in the world in which organs and tissue transplants are performed. True or False?
    8·1 answer
  • If an M/M/1 queue in a server has task arrivals at a rate of 30 per second and serves at a rate of 50 per second, how many tasks
    10·1 answer
  • how to answer the questions on brainly? I've typed my answer in the box but there's no submit button or whatever, and the only t
    14·2 answers
  • Which of the following is not something that consumers need to pay attention to order to make rational choices
    6·2 answers
  • a. Do you think the U.S. government should censor information on the Web, such as instructions for making weapons, to protect th
    12·1 answer
  • X = 19 y = 5 print (x % y)
    11·1 answer
  • Which is the most popular language used in game programming?
    5·2 answers
  • 1.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!