answer.
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
maksim [4K]
2 years ago
4

Public class A1 { public int x; private int y; protected int z; ... } public class A2 extends A1 { protected int a; private int

b; ... } public class A3 extends A2 { private int q; ... } Which of the following lists of instance data are accessible in class A2?
1. a, b
2. x, y, z, a, b
3. x, z, a, b
4. x, y, z, a
5. z, a, b
Mathematics
1 answer:
bija089 [108]2 years ago
6 0

Answer:

The correct option is option 3.

Step-by-step explanation:

The public variable is accessible to all the classes

A private variable is accessible to only the class in which it is defined

A protected variable is accessible in the defining and derived classes

Now as the class A2 is under consideration, so the two variables which are defined in A2 are both accessible by A2 which are the protected int a and the private int b.

Now for the other variables, public int x is accessible to all the classes as it is a public variable.

Private int y is defined in class A1 so it is not accessible to class A2.

Protected int z is defined in class A1 but A2 is derived from A1 thus this is also accessible by A2.

Private int q is defined in class A3 so it is not accessible to class A2.

Thus a,b,x and z are the four variables accessible by the class A2 sso option 3 is the correct option.

You might be interested in
You earn 13.76/hr part-time and work 10hrs/wk. your deductions are FICA(7.65%), federal tax withholding (9.8%) and state tax wit
PSYCHO15rus [73]
$137.60    (gross pay)
$10.53      (FICA)
$13.18      (Federal Tax)
$9.81        (State Tax)
---------------------------------
$103.78    (Net Pay)
$77.84      (Deposit)
---------------------------------
$25.94      (To You)
$38.92      (To Savings)

4 0
2 years ago
Read 2 more answers
Hasan plans to choose a book from a section of the store where everything is 25% off. he writes the expression d−0.25d to find t
Korvikt [17]
Given:
discount of 25%

Hasan's equation:  d - 0.25d
Bella's equation: 0.75d

d represents the original price.
0.25d represents the discount.
0.75d represents the discounted price.

Example: 1,000 is the price. d = 1,000
0.25d = 0.25(1000) = 250 this is the discount
0.75d = 0.75(1000) = 750 this is the discounted price

Hassan: d - 0.25d =  1000 - 250 = 750
Bella: 0.75d = 0.75(1000) = 750

6 0
2 years ago
Read 2 more answers
On her way to work, Mrs. Larsen gets a green light at a certain traffic light only 30% of the time. She wants to find the probab
kirza4 [7]
A random table is used by picking out values one at a time while closing your eyes. The 5 numbers selected are
99470
10152
09747
45400
72767

Since the values needed are percentage, we will only take the first four digits.
99.47%
10.15%
9.74%
45.40%
72.76%

The average of these values is
47.50%
5 0
2 years ago
If you apply the changes below to the quadratic parent function, f(x) = x2, what is the equation of the new function?
nikklg [1K]
Please use "^" to denote exponentiation.

Start with f(x) = x^2.  Shifting the graph of f(x) 1 unit to the left results in

g(x) = (x+1)^2.

Vertically stretching the graph of g(x) by a factor of 3 results in
h(x) = 3(x+1)^2.

Reflecting h(x) over the x-axis results in k(x) = -3(x+1)^2

3 0
2 years ago
Read 2 more answers
15. A manufacturer of electronic calculators is interested in estimating the fraction of defective units produced. A random samp
Alina [70]

Answer:

a

   The Null hypothesis is  H_o  : p =  0.01

   The defect did not exceed 0.01

b

   The  95%  confidence interval is   0.004801 <  p  <  0.020199

   Yes the CI agrees with the result in a  because the value 0.01 fall within the CI

Step-by-step explanation:

From the question we are told that

     The sample size is  n = 800

      The number of defective calculators is  k =  10

       The population is  p  = 0.01

The Null hypothesis is  H_o  : p =  0.01

The Alternative hypothesis is  H_a :  P>  0.01

Generally the proportion of defective calculators is mathematically represented as

         \r  p  =  \frac{k}{n}

substituting values

          \r  p  =  \frac{10}{800}

          \r  p  =  0.0125

Next is to obtain the critical value of  \alpha from the z-table.The  value is  

          Z_{\alpha } =  1.645

Now the test statistics is mathematically evaluated as

        t  =  \frac{\r p  -  p  }{ \sqrt{ \frac{p (1- p )}{n} } }

substituting values

          t  =  \frac{ 0.0125 -  0.01  }{ \sqrt{ \frac{0.01 (1- 0.01 )}{800} } }

           t  =  0.71067

Now comparing the values of  t to the value of Z_{\alpha } we see that t  <  Z_{\alpha } hence we fail to reject the null hypothesis

Generally the margin of error is mathematically represented as  

       E  =  Z_{\frac{\alpha }{2} } *  \sqrt{\frac{\r  p (1-\r p )}{n} }

where  Z_{\frac{\alpha }{2} } is the critical value of  \frac{\alpha }{2} which is obtained from the z-table.The  value is

              Z_{\frac{\alpha }{2} } =  Z_{\frac{0.05 }{2} }  =  1.96

The reason we are obtaining critical value of    \frac{\alpha }{2}  instead of    \alpha is because    \alpha

represents the area under the normal curve where the confidence level interval (   1- \alpha ) did not cover which include both the left and right tail while  

 \frac{\alpha }{2}  is just the area of one tail which what we required to calculate the margin of error .

NOTE: We can also obtain the value using critical value calculator (math dot armstrong dot edu)

So

      E  =  1.96 *  \sqrt{\frac{ 0.0125 (1-0.0125 )}{800} }

     E  =  0.007699

The  95%  confidence interval is mathematically represented as

       \r p  -  E  <  p  <  \r p  -  E

substituting values

      0.0125 -  0.007699 <  p  <  0.0125 + 0.007699

      0.004801 <  p  <  0.020199

Now given the p = 0.01 is within this interval then the CI  agrees with answer gotten in a

7 0
2 years ago
Other questions:
  • What is the 185th digit in the following pattern 12345678910111213141516...?
    15·1 answer
  • David drives 168 miles a week for work. He fills his gas tank twice a week. Each fill up is for 12 gallons. Assuming he uses all
    10·2 answers
  • Triangle EFG has vertices E(–3, 4), F(–5, –1), and G(1, 1). The triangle is translated so that the coordinates of the image are
    7·2 answers
  • Find the values of x for which f(x)=g(x).<br><br> a. f(x) = x^2, g(x) = x + 2
    7·1 answer
  • A scuba diver used the expression below to describe his position in relation to sea level.
    10·2 answers
  • Nevin made tables of values to approximate the solution to a system of equations. First he found that the x-value of the solutio
    12·2 answers
  • Jia Inc., has an odd dividend policy. The company has just paid a dividend of $4 per share and has announced that it will increa
    10·2 answers
  • if the total precipitation (rainfall and snow) for the year at a mountain town is expected to be 37.9 and it has already rained
    14·1 answer
  • Raymond just got done jumping at Super Bounce Trampoline Center. The total cost of his session was \$43.25$43.25dollar sign, 43,
    15·2 answers
  • Show that the three points whose position vectors are 7j+ 10k,-i + 6j+6k and - 4i + +9j + 6k form an isosceles right
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!