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
Evgesh-ka [11]
4 years ago
12

Consider the following partial class definitions: public class A1 { public int x; private int y; protected int z; ... } public c

lass A2 extends A1 { protected int a; private int b; ... } public class A3 extends A2 { private int q; ... } Which of the following is true regarding the use of instance data y of class A1?
Computers and Technology
1 answer:
kaheart [24]4 years ago
6 0

Answer:

The answer to the given question is "It's only accessible in A1".  

Explanation:

  • In the given class definition question there are three classes defines that are A1, A2, and A3 and all the class uses the public access modifier that means it is access able every where in the program.  
  • In class A1 we define a three-variable that is "x, y, and z" in which variable x is used public access modifier, variable y is used private access modifier, and variable z is use protected access modifier.
  • The public access modifier is access able every wherein the program and the protected access modifier is access able in the same class and the class which inherits it. but the private access modifier can not be access able outside the class.

That's why the answer "It's only accessible in A1" is correct.    

You might be interested in
If u had a virus and u didn’t know how must damage will there be and how long will it take for you to notice?
Dimas [21]

<u>The Virus:</u>

A virus can be defined as a malicious program, that breaks into the computer without the consent of the user and sometimes even without the knowledge of the user. Viruses are also of different types and categories.

There are certain kinds of malware and spyware that enter a computer and start encrypting the user's data. Generally, a user gets to know about the existence of a virus when the computer programs begin to misbehave. Some files get corrupted and the user can't access them anymore.

Some files and programs may also get deleted as if they weren't even present on the system. But in case someone has installed good anti-virus software, they will get a notification as soon as some file containing some kind of virus enters the computer.

7 0
3 years ago
In a large organization, how do you typically request permission to perform a network change?
kherson [118]

<em>Network change in larger organization follows hierarchy of approval. </em>

<em>Hierarchy of approval will start from the lowest department. The lowest department must prepare a written proposal, stating that there is a need for the network upgrade. Attachments such as proposed price list for the new equipments to buy also comes up with the proposal. Once that all documents are prepared, signatures from approval departments must be gathered. Each signature should be present and complete. </em>

<em> </em>

<em />

3 0
3 years ago
7.6 LAB: Checker for integer string Forms often allow a user to enter an integer. Write a program that takes in a string represe
Evgen [1.6K]

Answer:

Following are the program in the Python Programming Language:

def check(num): #define function

 if(num.isdigit()): #set if statement

   return "yes"; #return yes if condition is true

 else:  

   return "no";# return no if condition is false

string=input("Enter the numbers 0-9: ") #get input from the user

print(check(string)) #print and call the function

Output:

Enter the numbers 0-9: 1995

yes

Enter the numbers 0-9: 42,000

no

Explanation:

Here, we define a function "check()" and pass an argument in its parameter "num" inside the function.

  • we set if-else conditional statement and check the value stored in the variable "num" is the digit by using built in function "isdigit()" then return "yes".
  • Then, otherwise it return "no".

Finally, we get the input from the user in the variable "string" then, we call the function through "print()" function.

7 0
4 years ago
When the atmosphere has too much carbon dioxide in it, the oceans absorb some of it to achieve a new balance. This is an example
horsena [70]
The answer is B. 
A geochemical cycle. 
8 0
4 years ago
Read 2 more answers
Write the function prototype for a function called showSquare. The function should have a single parameter variable of the int d
xeze [42]

Answer:

void showSquare(int param){

}

Explanation:

In C++ programing language, this is how a function prototype is defined.

The function's return type (In this case Void)

The function's name (showSquare in this case)

The function's argument list (A single integer parameter in this case)

In the open and closing braces following we can define the function's before for example we may want the function to display the square of the integer parameter; then a complete program to accomplish this in C++ will go like this:

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>void showSquare(int param);</em>

<em>int main()</em>

<em>{</em>

<em>    showSquare(5);</em>

<em>    return 0;</em>

<em>}</em>

<em>void showSquare(int param){</em>

<em>int square = param*param;</em>

<em>cout<<"The Square of the number is:"<<endl;</em>

<em>cout<<square;</em>

<em>}</em>

8 0
4 years ago
Other questions:
  • Write an overloaded constructor for the Table class that will take a single argument for the color of the table Write a set meth
    13·1 answer
  • PowerPoint’s _____ feature can assist you in finding answers to questions such as “How can I specify which slides to print?” a.
    6·1 answer
  • I have two questions: 1: how do you credit only 5 points on brainl? (mine is only letting me give 10) and 2. How do I get a bria
    6·2 answers
  • Write a function named remove_duplicates that takes a list (of numeric and/or string values) and returns a new list with only th
    9·1 answer
  • Verify (valid or not valid) using resolution the following reasoning: "Every student in the SCIS is a CS student or an IT studen
    15·1 answer
  • The character you control enters the Mystic Palace. Once inside, you find that the game’s world turns upside down. Standing on t
    9·2 answers
  • Create a program that receives the age of a user and determine whether he/she can vote or not. Assume the voting age to be 20. C
    14·1 answer
  • I'm pretty sure most of you know squid game, right? Well, are the actors really dying? or is it just CGI or effects? Because it'
    5·2 answers
  • Create a function called sphereVolume that determines the volume of a sphere with a given radius and prints the result to the sc
    9·1 answer
  • Say true or false. a)ICT in education is used as teaching learning aid
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!