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

Consider the following recursive method: public int someFun(int n) { if (n <= 0) return 2; else return someFun(n-1) * someFun

(n-1); } (a) When the program calls someFun(5), how many times will someFun(3) be called? (b) What does this method calculate when the input parameter n is a non-negative integer?
Computers and Technology
1 answer:
Stella [2.4K]3 years ago
3 0

Answer:

(a) someFunc(3) will be called 4 times.

(b) For non negative number n someFunc method calculates 2^2^n.

Explanation:

When you call someFunc(5) it will call someFunc(4) two time.

So now we have two someFunc(4) now each someFunc(4) will call someFunc(3) two times.Hence the call to someFun(3) is 4 times.

someFunc(n) calculates someFunc(n-1) two times and calculates it's product.

someFunc(n) = someFunc(n-1)^2..........(1)

someFunc(n-1)=someFunc(n-2)^2..........(2)

substituting the value form eq2 to eq 1.

someFunc(n)=someFunc(n-2)^2^2

       .

       .

       .

       .

= someFunc(n-n)^2^n.

=2^2^n

2 raised to the power 2 raised to the power n.

You might be interested in
Hiding/masking personal identifiers from a data set, so that the data set can never identify an individual, even if it is correl
Anettt [7]

Hiding/masking personal identifiers from a data set, so that the data set can never identify an individual, even if it is correlated with other data sets is known as anonymization.

<h3>What is anonymization?</h3>

The term anonymization is known as data masking and it is the standard solution in the case of data pseudonymisation. It is generally recognised by using masking and data is de- sensitised also that privacy could be maintained and private information remains safe for the support.

Data is generally identified by using masking and data is de- sensitised also that privacy could be maintained and private information remains safe for the support.

Therefore, Hiding/masking personal identifiers from a data set, so that the data set can never identify an individual, even if it is correlated with other data sets is known as anonymization.

Learn more about anonymization here:

brainly.com/question/4268168

#SPJ4

5 0
2 years ago
What are the two ways to print a document?
guajiro [1.7K]

Answer:

ctrl+p or find the print button on the page

5 0
3 years ago
The byte that
qwelly [4]
The decimal value 15 would be A. 00001111
4 0
2 years ago
which of the following is required to establish a new network switch and configure its IP address for the first time
dlinn [17]

Out-of-band management is required to establish a new network switch and configure its IP address for the first time.

<h3>What is Out-of-Band management?</h3>

Out-of-Band management is known to be a form of services that makes sure that a tech do not require to be sent onsite and it is one where remediation can be done in a remote place.

Hence,  Out-of-band management is required to establish a new network switch and configure its IP address for the first time.

See full question below

Which of the following is required to establish a new network switch and configure its IP address for the first time?

A. Client-to-site VPN

B. Site-to-site VPN

C. Out-of-band management

D. In-band management

Learn more about IP address from

brainly.com/question/24930846

#SPJ1

6 0
2 years ago
Steeler corporation is planning to sell 100,000 units for 2.00 per unit and will break even at this level of sales fixed expense
olga_2 [115]

Answer:

1.25 per unit

Explanation:

Number of units to sell = 100,000

Price per unit = 2

Fixed expense = 75000

At break even point :

Revenue = total expenses

Total expenses = fixed cost + variable cost

Let variable cost = x

Revenue = units to sell * price per unit

Revenue = 100,000 * 2 = 200,000

Hence,

Fixed cost + variable cost = Revenue

75000 + x = 200,000

x = 200, 000 - 75000

x = 125,000

Variable cost = 125,000

The variable expense per unit is thus :

Variable expense / number of units

125,000 / 100,000 = 1.25 per unit

7 0
3 years ago
Other questions:
  • You can apply several different worksheet themes from which tab?
    11·2 answers
  • Design a Geometry class with the following methods: A static method that accepts the radius of a circle and returns the area of
    15·1 answer
  • Which of the following is used by credit card companies to determine APR?
    10·2 answers
  • Which word processing file that contains text and other
    13·2 answers
  • When troubleshooting firewalls, you should never attempt to repeat the problem because you could do more damage. T/F
    6·1 answer
  • Which information purpose uses video from a security camera?
    15·1 answer
  • Setting up a desktop computer for anAutoCADspecialist who needs a minimum of 125 GBram which operating system would be the best
    5·1 answer
  • How many passes will it take to find 30 using a binary search?
    6·1 answer
  • A _____ is an Access database object that allows you to arrange the fields of a record in any layout so you can enter, edit, and
    6·1 answer
  • What are the total number of rows and columns on a worksheet?.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!