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
alexdok [17]
3 years ago
9

If the object instance is created in a user program, then the object instance can access both the public and private members of

the class using DOT notation (such as Rectangle r; r.area=10). True or False
Computers and Technology
1 answer:
rewona [7]3 years ago
5 0

Answer:

False

Explanation:

The private member of a class is not accessible by using the Dot notation ,however the private member are those which are not accessible inside the class they are accessible outside the class  .The public member are accessible inside the class so they are accessible by using the dot operator .

<u>Following are the example is given below in C++ Language </u>

#include<iostream>   // header file

using namespace std;  

class Rectangle

{    

   private:  

       double r; // private member  

   public:      

       double  area()  

       {     return 3.14*r*r;  

       }        

};  

int main()  

{    

  Rectangle r1;// creating the object  

   r1.r = 3.5;  

 double t= r1.area(); // calling

cout<<" Area is:"<<t;  

   return 0;  

}  

Output:

compile time error is generated

<u>The correct program to access the private member of class is given below </u>

#include<iostream>   // header file

using namespace std;  

class Rectangle

{    

   private:  

       double r; // private member  

   public:      

       double  area()  

       {    

r1=r;

double t2=3.14*r2*r2;

return(t2); // return the value  

       }        

};  

int main()  

{    

  Rectangle r1;// creating the object  

   r1.r = 1.5;  

 double t= r1.area(); // calling

cout<<" Area is:"<<t;  

   return 0;  

}  

Therefore the given statement is False

You might be interested in
The primary key is a field that uniquely and completely identifies a record.
Leokris [45]
True

----------------------------------
6 0
3 years ago
Read 2 more answers
How is a transaction verified on a cryptocurrency network?.
Agata [3.3K]

Answer:

By being a part of a block to a block chain and each block in the block chain is precisely connected to the block that was before it.

Explanation:

I Hope This Helps You

6 0
2 years ago
A part-time job performed while in high school must have the approval of your school counselor.
Artist 52 [7]

Answer:

False, it only needs approval of your parents/guardian

May I have brainliest please? :)

4 0
3 years ago
Read 2 more answers
What happens when a user clicks Accept on a meeting request?
melomori [17]

Explanation:

Other events at that time are canceled, and the meeting cannot be canceled by the organizer.

The agenda is updated with the user’s contact information, and other events at that time are canceled.

The meeting cannot be canceled by the organizer, and the agenda is updated with the user’s contact information.

The meeting organizer is notified, and a copy of the meeting is added to the user’s Outlook calendar.

3 0
3 years ago
Read 2 more answers
If i don't update my computer what threat does my computer face?
Nadusha1986 [10]
Hey there! Hello!

Computer updates, especially smaller security updates, contain security information for new bugs, malware, viruses, etc. that have been written since your last update. So many of these are written for computers at any given time, meaning that keeping your computer updated is a significant step in keeping your computer's defense systems working. Paired up with legit anti-malware, virus protection software, good computer knowledge, and common sense, your computer can remain very safe from these viruses. 

Otherwise, there might be some bug or irregularity within your computer's system itself that was accidentally released an update or two ago by the creators of your computer's software, which may also pose a threat for your computer system. Updating your computer can most likely fix problems like these. But, more commonly, they just keep your computer up to date on the vicious computer threats that are now available for it since the previous update. 

Hope this helped you out! Feel free to ask me any additional questions if you have any. :-)

8 0
3 years ago
Other questions:
  • What year did buck tooth bob become famous
    11·2 answers
  • Drag each label to the correct image.
    9·2 answers
  • Shelly tells a friend that her computer needs to be fixed because it has been producing a lot of heat and is smoking. Where is t
    10·1 answer
  • Write the definition of a method, oddsMatchEvens, whose two parameters are arrays of integers of equal size. The size of each ar
    10·1 answer
  • An aerophone is an instrument that causes ________ to vibrate, thus creating sound waves.
    11·2 answers
  • What is the role of science and technology in achieving human’s ultimate goal or the good life?
    8·2 answers
  • Plz hurry it’s timed
    5·1 answer
  • 1) Identify at least four examples and uses of application software.​
    5·2 answers
  • What is the nearest ten cents of 453.56
    5·1 answer
  • Refund please, this has not helped at all.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!