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
Natasha_Volkova [10]
3 years ago
7

Consider a class called Rocket that has a private instance variable called Engine. You are writing a "getter" for the Engine. Us

ing the guiding principles of data encapsulation, under what circumstances is it allowed to return a reference to the existing Engine?
Computers and Technology
1 answer:
dusya [7]3 years ago
4 0

Answer:

when user wants duplicate copy of the object

Explanation:

Encapsulation are one of the key foundations of object-oriented programming (OOP). It involves the bundling of data or information with the methods and various techniques which operate on that data.

It can be used in hiding the true values or state of a structured data object that is in a class, preventing unauthorized parties' direct access to them.

The circumstances that can be allowed in returning a reference to the existing Engine is when user wants duplicate copy of the object.

You might be interested in
Is a collection of information stored under a single name ​
oksian1 [2.3K]

\boxed{ File  } is a collection of information stored under a single name.

\bold{ \green{ \star{ \orange{Mystique35}}}}⋆

3 0
3 years ago
Read 2 more answers
Hi guys how are you i have a question why does people delete questions and answer from brainly and where is the delete option?
Sphinxa [80]
There is no delete option sorry
3 0
3 years ago
Read 2 more answers
Create a function that takes a list of numbers between 1 and 10 (excluding one number)
Luda [366]

def missing_num(lst):

   for n in range(1,11):

       if n not in lst:

           print(n)

lst = (1,3,4,5,6,7,8,9,10)

missing_num(lst)

I hope this helps!

8 0
3 years ago
What sort of negative outcomes are possible for this type of risk?
Harlamova29_29 [7]
More details please?
6 0
3 years ago
Read 2 more answers
What led to the reduction in size of the modern day computer system?
Hunter-Best [27]
Transistors , as in the past vacuum tubes were used which took much larger space.

Now with transistor you can create very complicated logical circuits in very limited space. 
7 0
3 years ago
Other questions:
  • Slack space most commonly contains visible data. True or false?
    15·1 answer
  • Write a C++ program that determines if a given string is a palindrome. A palindrome is a word or phrase that reads the same back
    6·1 answer
  • Mary wants to create 3D shapes, refraction, and cloud patterns in an image. Which filter should Mary use?
    5·1 answer
  • Can some one help me on 4&5
    6·1 answer
  • In Java please.
    13·1 answer
  • Suction cup-type headlamp aiming equipment may be used on:
    11·1 answer
  • Im new what are points
    6·2 answers
  • Katla is a project manager. One of the programmers on her team comes to her and says that he permanently deleted some code mista
    5·1 answer
  • Instructions
    15·1 answer
  • 3. Encode these sentences in ASCII: a. "Stop!" Cheryl shouted. b. Does 2 + 3 = 5?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!