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
NikAS [45]
4 years ago
7

g If a class named Student has a data member named gpa , and one of its member functions has a parameter also named gpa , how ca

n you refer to the data member inside that member function
Computers and Technology
1 answer:
victus00 [196]4 years ago
5 0

Answer:

By using the this keyword

Explanation:

The this keyword in java is used for pointing the current object or current variable .The this keyword is removing the ambiguity among the characteristics of the class as well as the variables with the similar name.

In the given question if the class student has member variable gpa also we have a method having the argument gpa with the help of this keyword we can refer the gpa variable inside the method .

Following are the implementation of the given question

public class Main // main class

{

 int gpa; // variable declaration

 public Main(int gpa) // constructor

 {

   this.gpa = gpa; // this keyword

 }

 public static void main(String[] args) // Main method

 {

   Main m= new Main(55); // creating object of class

   System.out.println("The Value of gpa is : " + m.gpa); // display value

 }

}

Output:

The Value of gpa is :55

You might be interested in
Explain how to implement two stacks in one array A[1..n] in such a way that neither stack overflows unless the total number elem
algol [13]

Answer:

Check explanation

Explanation:

Two stacks can make use of one array by utilizing various stack pointers that begins from different ends of an array. Looking at the array A[1...n], the first stack will drive elements that starts from position 1 as well as to move its' pointer to n.

The Second stack will begin at the n position and motion its' pointer to 1. The best likely divide is to offer each stack a half of an array. whenever any of two stacks transverse the half-point, an overflow can happen but for that overall number of elements, it must be n

5 0
4 years ago
Write a program that reads integers from the user and stores them in a list. Your
Blizzard [7]

Answer:

The program in Python is as follows:

numList = []

num = int(input())

while num != 0:

   numList.append(num)

   num = int(input())

   

numList.sort()

for num in numList:

   print(num)

Explanation:

This initializes the list

numList = []

This gets input from the user

num = int(input())

This loop is repeated until the user enters 0

while num != 0:

This appends the user input to the list

   numList.append(num)

This gets another input from the user

   num = int(input())

This sorts the list in ascending order    

numList.sort()

This iteration prints the list elements, each on a line

<em>for num in numList:</em>

<em>    print(num)</em>

3 0
3 years ago
Give two differences between EIRGP and RIP.
qaws [65]

Answer and Explanation:

Difference between EIRGP and RIP :

  • RIP stands for routing information protocol whereas EIRGP stands for enhanced IGRP, IGRP is interior gateway routing protocol
  • EGRIP is more based on the link where as RIP is more based on routing
  • There is also references in their working operation.
  • Differences in updates and refreshing.  

7 0
3 years ago
Which section of a PCM is responsible for sending the proper reference voltage to many of the sensors?
pishuonlain [190]

The section of a PCM that is responsible for sending the proper reference voltage to many of the sensors is the input sensor section.

<h3>What are PCM inputs?</h3>

The Powertrain Control Module (PCM) is known to be an input section of the PCM.

It is made up of the engine's ignition system, fuel injection system and also emission controls. The PCM is known to receives inputs a lot from different kinds  of sensors and switches.

Learn more about sensors from

brainly.com/question/26320121

8 0
3 years ago
Jack is assisting his younger sibling Mary with her mathematics assignment, which includes a study of the number system. Jack ex
Elza [17]

Answer:

The answer is A). Integers

Explanation:

Booleans and Strings don't represent numbers (in most cases) so they can be eliminated.

Floats are used for representing decimals while integers are used for whole numbers.

4 0
3 years ago
Read 2 more answers
Other questions:
  • A suspension system that allows one wheel to move up and down with minimal effect on the opposite wheel is called what? A. Stabi
    14·2 answers
  • Which best describes the Big Bang Theory?
    12·2 answers
  • Help PLEASE (in attachment)
    8·1 answer
  • Modify the definition of the throttle class on page 35, to create a new throttle ADT, which allows the user of the ADT to specif
    6·1 answer
  • Moore’s Law is said to be more of a trend, rather than a representation of the actual number of transistors on a silicon chip. W
    14·1 answer
  • Which table option enables you to combine the contents of several cells into one cell?
    9·2 answers
  • Why might it be a good idea to choose a bus topology?
    6·2 answers
  • You are troubleshooting a mobile device that will not pair with a Bluetooth headset. The device was functioning properly with th
    7·1 answer
  • 20 POINTSS!! NEED HELP!!
    12·2 answers
  • Which of the following is a software tool used to manage data for a project in a logical and hierarchical order?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!