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
anzhelika [568]
4 years ago
11

Define the missing method. use "this" to distinguish the local member from the parameter name.

Computers and Technology
2 answers:
Leto [7]4 years ago
4 0

Answer:

Explanation:

Java Code

class Students{

   private String name;

   private String rollNumber;

   public void setNameAndRollNumber(String name, String rollNumber){

       this.name = name;

       this.rollNumber = rollNumber;

   }

}

Code Explanation

In setNameAndRollNumber method there are two type variables, one is member variables which are associated with class and the second one are method parameters which are being past from external class.

If we have both variables name similar to member variables then to distinguish between member variable and parameter, we need to add "this" before member variable to let compiler know that with "this" annotation we are changing value of member variable not parameters variable.

If we don't use "this" with variable name then the compiler will give preference to parameters variable .

mestny [16]4 years ago
3 0

method_missing in the Ruby programming language is part of the search algorithm and is a powerful way to capture objects.

<h2>Further explanation </h2>

Method is a collection of programs that have names. Method is a means for programmers to break a program into small parts to make it more complex so that it can be used repeatedly.

Method is an operation in the form of functions that can be done by an object. The method is defined in the class but is called via the object. For example, in the pear object: there are methods to grab taste, peel, and others

The parameter is the place of storage (variable) in the function, which is used to carry out data from the caller into the function. The parameter is located between brackets (and) after the identity of the function, and a function can have several parameters separated by commas.

Types of Parameters

  • Function Parameters or also referred to as Formal Parameters are local variables that are established in the function declaration (not definition), which is a repository for the values ​​of the arguments given when calling a function.
  • Arguments are parameters that accompany function calls. is a place where you can provide data to be used in a function that is called and given when calling that function.

Learn More

programming method brainly.com/question/13540854

parameters and functions brainly.com/question/13540854

Details

Class: high school

Subjects: Computers and Technology

Keywords: methods, functions, parameters

You might be interested in
Explain mportance of using Microsoft Excel in pharmaceutical science​
goldenfox [79]

Answer:

research the question and go to setting and press advanced search and it will give answer

4 0
3 years ago
HW7.24. Return nth integer from CSV string The function below takes two parameters: a string parameter: CSV_string and an intege
kotykmax [81]

Answer:

The solution code is written in Python 3.

  1. def processCSV(CSV_string, index):
  2.    data = CSV_string.split(",")
  3.    result = data[index]
  4.    return int(result)
  5. processCSV('111,22,3333,4', 2)

Explanation:

Firstly, create function and name it as <em>processCSV()</em> with two parameters, <em>CSV_string</em> and <em>index</em> (Line 1).

Since the CSV_string is a collection of integers separated by comma, we can make use of Python String built-in method <em>split() </em>to convert the <em>CSV_string </em>into a list of numbers by using "," as separator (Line 2).

Next, we can use the <em>index</em> to extract the target value from the list (Line 3).

Since the value in the list is still a string and therefore we shall use Python built-in method int() to convert the target value from string type to integer and return it as output of the function (Line 4)

We can test our function by using the sample test case (Line 6) and we shall see the expected output: 3333.

8 0
3 years ago
java The maximum-valued element of an integer-valued array can be recursively calculated as follows: If the array has a single e
adoni [48]

Answer:

see explaination

Explanation:

MaxArray.java

public class MaxArray{

public static void main(String[] args) {

int a[] = {1,2,5,4,3};

int max = max (a, 5);

System.out.println("Max value is "+max);

}

public static int max (int a[],int size){

if (size > 0) {

return Math.max(a[size-1], max(a, size-1));

} else {

return a[0];

}

}

}

Output:

MaxArray

7 0
4 years ago
Who was the first computer programmer ever?
coldgirl [10]


Ada lovelace was the first computer programmer ever


8 0
4 years ago
Americans overwhelmingly support organ and tissue donation.
Simora [160]

This statement would be TRUE


7 0
4 years ago
Other questions:
  • What formula most likely exists in D18?
    5·1 answer
  • In which way is a worm different from a virius
    12·1 answer
  • After reading the article, "The Impact of Technology", answer the following question.
    14·1 answer
  • When using a line graph, why is it important to only graph 1-3 series of data?
    14·1 answer
  • Which of the following is a correct statement about writing down passwords on a ""cheat sheet?""
    7·1 answer
  • Suppose B = [1, 2 3; 4, 5,6; 7,8,9], write a program with “for” loops that
    6·1 answer
  • Which of the following is NOT an example of one of the six primary ways businesses use the Internet?
    10·2 answers
  • Consider the following code segment. int[][] arr = {{3, 2, 1}, {4, 3, 5}}; for (int row = 0; row &lt; arr.length; row++) { for (
    6·1 answer
  • What number system is the basis for all of the powerful computers and electronic devices in the world?
    7·1 answer
  • Join me in mincraft I will tell you my code if you want to join and the mincraft I play is mincraft education edition
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!