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]
3 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]3 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
A. Write a program that asks the user to enter an integer, then prints a list of all positive integers that divide that number e
kobusy [5.1K]

Answer:

Following are the program in python language the name of the program is factors.py

num= int(input("Please enter a positive integer: "))#Read the number by user

print("The factors of ",num,"are:")

for k in range(2,num): #iterating over the loop

   if(num%k==0): #checking the condition

       print(k)#display the factor

Output:

Please enter a positive integer: 12

The factors of 12 are:

2

3

4

6      

Explanation:

Following are the description of the program

  • Read the number by user in the "num" variable
  • Iterating the for loop from k=2 to less then "num".
  • In the for loop checking the factor of "num"  variable by using % operator.
  • Finally display the factor by using print function
4 0
3 years ago
Which of the following describes a decision support system (DSS)?
levacccp [35]

Answer:

B.

Explanation:

8 0
2 years ago
Read 2 more answers
Write 'T' for true and 'F' for false statements.
asambeis [7]
1-F
2-T
3-F
4-F
5-F
6 T
7-T
3 0
2 years ago
Which of the following is the estimate of the minimum amount of time it would take to perform a task? (Points : 2) Minimal durat
kondor19780726 [428]

Answer:

Optimistic duration

Explanation:

The following three concepts are Project management concepts:

Optismitic duration: Estimation of the shortest duration of a task, taking into account the difficulty, etc.

Pessimistic duration: Estamation of the longest duration of a task, taking into account the difficulty, etc

Expected duration: Expected duration of a task, kind of a compromise between the optmistic duration and the pessimistic duration.

Which of the following is the estimate of the minimum amount of time it would take to perform a task?

The answer is Optimistic duration

7 0
3 years ago
The function below tries to create a list of integers by reading them from a file. The file is expected to have a single integer
Setler [38]

Answer:

Check the explanation

Explanation:

def get_list_of_integers_from_file(filename):

int_list=[]

for line in open(filename).readlines():

try:

int_list.append(int(line))

except:

continue

return int_list

print(get_list_of_integers_from_file('file.txt'))

 

File.txt:

Kindly check the output below.

4 0
3 years ago
Other questions:
  • write a pseudo code and flow chart that take a number as input and prints multiplication table up to 10
    9·1 answer
  • b. Suppose instead that Miller had written a routine to constantly change his assigned IP address to other addresses used by his
    8·1 answer
  • Create an Entity-Relationship Diagram with the following requirements.
    6·1 answer
  • A network router connects multiple computers together and allows them to send messages to each other. If two or more computers s
    7·1 answer
  • Which two actions allow the System Administrator to limit Chatter access during roll-out to a subset of Salesforce users?
    9·1 answer
  • All of the following are aspects of the search process except?
    6·2 answers
  • Who want followers on Instagram... gotta follow back
    5·2 answers
  • How much do you think it would cost to develop an app?
    14·2 answers
  • Write common ICT tools​
    5·1 answer
  • The _________________ creates international guiding principles for computer forensic examiners.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!