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]
3 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]3 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]3 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
Our bank needs a tool that will help us in determining credit worthiness of loan applicants. We will enter the following informa
lozanna [386]

Answer:

income = float(input("Monthly Income: "))

debt = float(input("Total Debt: "))

minPay = float(input("Monthly minimum payments for the debt: "))

credit = 0

if debt > (income * 6):

   print("No loan can be granted!")

else:

   credit = (income - minPay) * 0.3

   print("You can be approved for upto $" + str(credit))

Explanation:

*The code is in Python

Ask the user for income, debt, and minPay

Check if the debt is greater than income * 6. If it is, print that no loan can be given. Otherwise, Calculate the credit amount using the given formula and print it

8 0
3 years ago
How Java provides protection through stack inspection approach ?
Natalija [7]
Pecting Java<span> 2's </span>stack inspection<span> policy to be enforced can-. not execute on .... Figure 2. PSLang security policy that </span>allows<span> at most 10 open windows. .... </span>Method<span> call/return: A → B. At start of B, look up</span>protection<span> domain PB for B's. code and push PB on the thread-local domain-. </span>Stack<span>. At return from B (either normally or by.</span>
3 0
3 years ago
If the density of water is 1 g/cm3, what is its specific gravity?
SpyIntel [72]

the answer should be D.

4 0
4 years ago
Read 2 more answers
Can and should the Internet and World Wide Web be censored to reduce objectionable material? If so, by whom?
prisoha [69]
You could try and censor the internet but at the end of the day, it would be pretty much impossible. People would try and figure out a way to get rid of your censor and would probably be able to accomplish it. 
6 0
4 years ago
What value would be returned by the following: 6%3?<br><br> A)1<br><br> B)2<br><br> C)18<br><br> D)0
sesenic [268]

Answer:

d

Explanation:

beacuse it 6*3

3 0
3 years ago
Other questions:
  • Search engines use _____ to discover documents for indexing and retrieval.
    10·1 answer
  • A device that is used to convert handwriting to text on a computer screen is a(n) _____.
    11·3 answers
  • Jane is a full-time student on a somewhat limited budget, taking online classes, and she loves to play the latest video games. S
    12·1 answer
  • Bill's manager has asked him to send all staff members the directions for checking out the new projector. In 1–2 sentences, desc
    15·2 answers
  • Which process refers to starting up a computer
    12·1 answer
  • A user complains that his new mouse doesn't work right. He has an old system at home and when he has had this problem, he cleane
    15·1 answer
  • Write a method drivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar co
    12·1 answer
  • A customer has a computer for a home business, but wants to have another computer as a web server. What would be the best soluti
    11·2 answers
  • You want to access the CLI (command line interface) of a Linux terminal at work from your Apple laptop at home. You have the pro
    11·1 answer
  • Memory of your familiar old e-mail password may block the recall of your new password. This illustrates
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!