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
The most common layout of keys on the keyboard is the _____ keyboard.
Alex
The most common layout is called "QWERTY" because it is the first six letters on the keyboard.
6 0
3 years ago
Read 2 more answers
Is a pocket watch consider a computer
gulaghasi [49]

Answer:

I don't think a pocket watch is considered a computer based off of my logic. Other people may think differently tho.

Explanation:

7 0
3 years ago
Role and importance of internet in today's world
Nadusha1986 [10]

Explanation:

In today's world Internet is the main thing in our daily life. Without it there would be a lot of troubles and we use Internet for research, watching videos etc

6 0
3 years ago
Read 2 more answers
"Margaret has $3,200 cash after selling off her television, DVD player, and computer. She has debts of $4,800 owing to the follo
serg [7]

Answer: Hyatt's  will be able to collect $1,365

Explanation: Composition Agreement is a kind of agreement reached between a debtor and its creditors. it a kind of agreement whereby the debtor and creditors agree to collect a percentage of their debts to fully settle their debts from the creditor.

For instance Margaret with a cash of $3,200 to settle a debt of $4,800.

In this case Margaret can decide to pay 65% of the total debts to settle the final debts. Here, Hyatt's  will be able to collect $1,365 as full settle of his debt.

5 0
3 years ago
When selling antiques, you can usually obtain a higher price for those that have a provenance, which is information detailing th
Viktor [21]

Various factors make antique things more valuable than their face value such factors are the number of items originally made, uncommon design, uncommocolorur, the difficulty of replicating an item, etc.

What makes antiques valuable?

There are a rarer, singular it is and more valuable. Even items that have mistakes or any fault in design are considered to be rare and valuable.

The products like furniture, coins, portrait, etc always have value over the cost because of their uncommon design, and uncommon color on it.

Tangible personal property includes artwork, jewelry, antiques, and other physical objects as an intangible value related to sentimental relating to such jewelry, artwork, and others.

Thus, we have already why antiques are more valuable than the latest.

Learn more about Antiques valuable here:

brainly.com/question/14301392

#SPJ1

7 0
2 years ago
Other questions:
  • Davia draws a shape with 5 sides. two sides are each 5 inches long. two other sides are each 4 inches long. the perimeter of the
    15·1 answer
  • Which statement accurately compares the restart at 1 and continue numbering featured of word
    15·2 answers
  • A customer seeks to buy a new computer for a private use at home.The customer primarily needs the computer to use the Microsoft
    8·1 answer
  • you are teaching a class about basic camera functions like power, basic date/time, menu navigation, and how to properly attach a
    9·1 answer
  • To enforce the concept of separating class definition from its function implementations, where should the function implementatio
    14·1 answer
  • Https://www.bing.com/videos/search?q=dancing+aaron+smith+1+hour&view=detail&mid=C6C28AF3C0CEC1E4AEE3C6C28AF3C0CEC1E4AEE3
    14·1 answer
  • What solicits online input such as product ratings from consumers?
    7·1 answer
  • Which is the best description of the difference between bound and unbound forms?
    5·2 answers
  • What is the best way of transmitting data safely
    9·1 answer
  • 11. FROM WHICH MENU WOULD YOU BE ABLE TO FIND COLUMNS? *
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!