Stu has written the following Java recursive method. In which line is recursion occuring?

Stu Has Written The Following Java Recursive Method. In Which Line Is Recursion Occuring?

Answers

Answer 1

Answer:

int result = n * factorial(n-1);

Explanation:

I took the test on PLATO


Related Questions

Which is faster, CL3 memory or CL5 memory?

Answers

Answer:

CL3. When dealing with CL or RL ratings, the lower the better.

Explanation:

I hope this helps!

If ADD = 81, BAD = 49, and CAD = 64, then what is the value of ACA?

Answers

Answer:

its 72

Explanation:

i know it because i did it and thats how i know it

Fun with Characters
Complete the checkCharacter() method which has 2 parameters: A String, and a specified index (int). The method checks the character at the specified index of the String parameter and returns a String based on the type of character at that location indicating if the character is a letter, digit, whitespace, or unknown character.

Ex: The method calls below with the given arguments will return the following Strings:
checkCharacter("happy birthday", 2) returns "Character 'p' is a letter"
checkCharacter("happy birthday", 5) returns "Character ' ' is a white space"
checkCharacter("happy birthday 2 you", 15) returns "Character '2' is a digit"
checkCharacter("happy birthday!", 14) returns "Character '!' is unknown"


CODE:
public class LabProgram {
public static String checkCharacter(String inputString, int index){
/* Type your code here. */
}

public static void main(String[] args) {
System.out.println(checkCharacter("happy birthday", 2));
System.out.println(checkCharacter("happy birthday", 5));
System.out.println(checkCharacter("happy birthday 2 you", 15));
System.out.println(checkCharacter("happy birthday!", 14));
}
}

Answers

The program is an illustration of conditional statements.

Conditional statements are statements whose execution is dependent on the truth value of the condition.

The checkCharacter() method in Java, where comments are used to explain each line is as follows:

//This defines the checkCharacter() method

public static String checkCharacter(String inputString, int index){

  //This checks if the character at the index, is a digit

  if(Character.isDigit(inputString.charAt(index))){

      //If yes, it returns "Digit"  

      return "Character "+inputString.charAt(index)+" is a digit";

  }

  //This checks if the character at the index, is a letter

  else if(Character.isLetter(inputString.charAt(index))){

      //If yes, it returns "letter"

      return "Character "+inputString.charAt(index)+" is a Letter";

  }

  //This checks if the character at the index, is a white space

  else if(inputString.charAt(index) ==' '){

      //If yes, it returns "white space"

      return "Character "+inputString.charAt(index)+" is a white space";

  }

  #If all the above conditions are false

   else{

      //If yes, it returns "unknown character"

      return "Character "+inputString.charAt(index)+" is an unknown character";

  }

}

The string to return depends on the character at the index.

Read more about similar programs at:

https://brainly.com/question/25127567

limitations of systems analysis and design​

Answers

Answer:

Explanation:

Although System analysis offers an extensive range of benefits it might also have some disadvantages. One of the main disadvantages which is mostly overlooked is the risk of too much analysing which may be costly and time consuming. It is therefore part of the analyst's job to find the right balance.

list and explain at least six circumstances in which written communication is essential​

Answers

Answer:

To be exact in writing communication is essential to getting across accurately. Written communication allows one to think thoroughly and refer back to it whenever required. This means record maintenance in Business.

Explanation:

dk if that helps

Động cơ đốt trong có mấy loại

Answers

động có xăng, động cơ diesel và động cơ gas còn gọi là động cơ chạy khí

Write a string that contains your name and address on separate lines using embedded newline characters. Then write the same string literal without the newline characters.

Answers

Answer:

"john doe\n1234 fake st."

"john doe, 1234 fake st."

In this exercise we have to use the knowledge of the python language to write the code, so we have to:

The code is in the attached photo.

knowing what string is:

String is a collection of alphabets, words or other characters. It is one of the primitive data structures and are the building blocks for data manipulation.

So to make it easier the code can be found at:

my_string = 'Hello'

print(my_string)

my_string = "Hello"

print(my_string)

my_string = '''Hello'''

print(my_string)

# triple quotes string can extend multiple lines

my_string = """Hello, welcome to

          the world of Python"""

print(my_string)

See more about python at brainly.com/question/26104476

Your worksheet contains a price in cell A5 and many formulas refer to that price how would you refer to that price in the formula

Answers

Answer:

$A$5

Explanation:

The A$5 would allow the row part of the reference to stay in place but would allow the column to change.

What does '$' mean in Excel formula?

An absolute reference in Excel exists as a cell address with the dollar symbol ($) in the row or column coordinates, like $A$1. The dollar sign specifies the connection to a given cell so that it stays unchanged no matter where the formula moves.

The A$5 would permit the row position of the authority to remain in place but would permit the column to modify. The location of the $ before either the row or column or both exists what specifies what component stands frozen. Therefore, the correct answer is option b) $A$5.

Complete question:

Your worksheet contains a price in cell A5, and many formulas refer to that price. How would you refer to that price in the formulas?

a. A5

b. $A$5

c. $A5

d. A$5

To learn more about Excel formula

https://brainly.com/question/26276255

#SPJ2

A color image uses 16bits to represent a pixel. What is the maximum number of different colors that can be represented?

Answers

Answer: A color image uses 16 bits to represent a pixel. What is the maximum number of different colors that can be represented? With 16 bits, we can represent up to 2^16 different colors. Assume six devices are arranged in a mesh topology.

Explanation:

The terms 16-bit picture, high color image, and 32K color image are all used to describe images that have 16 bits per pixel.

What is a pixel?

The smallest addressable element in a raster image or the smallest point in an all points addressable display device is known as a pixel (abbreviated as px), pel, or picture element in digital imaging.

The smallest component in most digital display systems that can be changed by software are pixels.

Photos with 16 bits per pixel are referred to as 16-bit pictures, high color images, and 32K color images.

The number of distinct colors that can be represented by 16 bits, where there are 5 bits for each of the red, green, and blue values and the 16th bit can be the alpha bit, is around 32 thousand.

Thus, the maximum number of different colors that can be represented is 32 thousand.

For more details regarding pixel, visit:

https://brainly.com/question/15189307

#SPJ2

How do I get fix the code to make it input 3 values and get the correct output
-------------------------------------------------------------
12.20 LAB: Driving costs - functions

Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles.

Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('{:.2f}'.format(your_value))

Ex: If the input is:

20.0
3.1599

the output is:

1.58
7.90
63.20

Your program must define and call the following driving_cost() function. Given input parameters driven_miles, miles_per_gallon, and dollars_per_gallon, the function returns the dollar cost to drive those miles.

Ex: If the function is called with:

50 20.0 3.1599

the function returns:

7.89975

def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon)

Your program should call the function three times to determine the gas cost for 10 miles, 50 miles, and 400 miles.
---------------------------------------------------
I need help for this part
Ex: If the function is called with:

50 20.0 3.1599

how do I get it to input the three to get the output of 7.89975?
-------------------------------------
My code:

# Define your function here.
def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon):
return (driven_miles/miles_per_gallon) * dollars_per_gallon

if __name__ == '__main__':
# Type your code here.

# Miles per gallon from input
miles_per_gallon = float(input())

#Dollars per gallon from input
dollars_per_gallon = float(input())


# Display the results as output

print('{:.2f}'.format(driving_cost(10, miles_per_gallon,dollars_per_gallon)))
print('{:.2f}'.format(driving_cost(50, miles_per_gallon,dollars_per_gallon)))
print('{:.2f}'.format(driving_cost(400, miles_per_gallon,dollars_per_gallon)))

Answers

Answer:Change your logic to:

for (int i = 0; i < 4; i++) {

System.out.println("Please input a number between zero to 3");

// use input and don't advance the scanner every time

int input = sc.nextInt();

if (input == 0) {

System.out.println("You have selected " + right);

}

if (input == 1) {

System.out.println("You have selected " + left);

}

// so on and so forth

}

By using sc.nextInt() four times, you are looking for the next token of the input which isn't there. So fetch the input for each run of the for-loop and it will work as expected.

Explanation:

Eric is working for an ad firm. He is responsible for storyboarding. Help him specify the different types of audio in the storyboard.
(Match top 3 with bottom 3)

1. primary audio
2. secondary audio
3. background audio

1. He can make a note of scenes where surrounding noise is required.
2. He can make a note of external microphone to record audio simultaneously while
recording video.
3. He can make a note of additional music that he wants to add while editing.

Answers

Answer:

He can make a note of scenes where surrounding noise is required. Secondary

He can make a note of external microphone to record audio simultaneously while recording video. Primary

He can make a note of additional music that he wants to add while editing. Background

Explanation:

Answer:here are the correct answers

Explanation:

Which two sizes are common for laptop drives?

Answers

2.5 - inch and 3.5 - inch

#happylearning

essay on computer memory and how is it related to computer?​

Answers

Answer:

grvty f th rthnng fr t nd srch

Explanation:

ts bcs y dnt hv brn

Computer memory is where all systems and files are stored including the OS. memory is a key part of any computer because without it a computer would not be able to store any information including its root file systems and basic functions ie; package manager, boot loader, and file systems. Not an essay but maybe a helpful start, good luck homie

In cell B17, enter a formula that uses the IF function and tests whether the total sales for January is greater than or equal to 200000?

Answers

An if statement in excel is written in the form:

=if(statement/test, value if true, value if false)

When calculating if a value is greater or equal to, the sign that can be used is:

>=

So putting this into a formula:

=(if B17 >= 200000, "Yes", "No")

Hope this helps!

Does media contribute to the mental wellness of society?​

Answers

Answer:

However, multiple studies have found a strong link between heavy social media and an increased risk for depression, anxiety, loneliness, self-harm, and even suicidal thoughts. Social media may promote negative experiences such as: Inadequacy about your life or appearance.

How ever multiple studies show that

Given the following code, what logic would you need to include to print all even values stored within the array:

int[] myArray = {1,2,38,4,54,6,7,8,9,10};

for (int i = 0; i < myArray.length; i++) {
//your code goes here
}
NOTE: Your response should be just the missing logic--not the entire problem set.

Answers

The missing logic whigh would allow all the even numbers stored within the array to be printed is if(myArray[i]%2 == 0)

Even numbers are divisible by 2, and hence, will leave no remainder when divided by 2.

Using the modulo operator, each iterated value in the array should be checked if it has a remainder of 0, when divided by 2.

Hence, if the remainder is 0, then the value is even and the value should be printed.

Learn more : https://brainly.com/question/17330574

Q4. In what phase(s) of flight do most accidents occur? Why?

Answers

Answer:

Boeing research shows that takeoff and landing are statistically more dangerous than any other part of a flight. 49% of all fatal accidents happen during the final descent and landing phases of the average flight, while 14% of all fatal accidents happen during takeoff and initial climb.

Explanation:

hope it helps you

Encryption is an effective strategy to prevent which of the following?
O eavesdropping
O jamming
O destruction of data
O tapping

Answers

First one - eavesdropping

Traffic cop in cloud computing

Answers

Answer:

ufydtgzdfgfghkugyfjghjkhkgfj,hd,fhgjhgh

Explanation:

gufykgjhkjhjglhkcgjhvjbhkjlk;ljkhjghfgjhkjl,/..mnbjvhbmn,mnbv

ARREGLAR ESTE CODIGO PARA QUE FUNCIONE CORRECTAMENTE EN BORLAND C++
(se busca sacar el promedio de 4 calificaciones)

FIX THIS CODE TO MAKE IT WORK CORRECTLY IN BORLAND C++
(its supossed to give the averageof 4 ratings)

#include
#include
#include
main()
{
int cal1,cal2,cal3,cal4,sum,prom;
cout<<”Ingrese la primer calificacion”< >cal1;
cout<<”Ingrese la segunda calificacion”< >cal2;
cout<<”Ingrese la tercera calificacion”< >calif3;
cout<<”Ingrese la cuarta calificacion”endl< sum=cal1+cal2+cal3+cal4;
cout<<”La suma de : ”< prom=sum/4;
cout<<”El promedio de:”< getch();
}

Answers

The magnitude of the algorithm goes massively large and questionably why

9. In a program with 25% loads, 10% stores, 11% branches, 2% jumps, 52% R-type. The standard CPI for each instruction type is 2 cycles loads, 2 cycles stores, 1 cycle branches, 2 cycles jumps, 1 cycle R-type. The branches have a misprediction penalty of an additional 2 cycles when it misses, which happens 30% of the time. Loads create a RAW hazard 20% of the time adding in an extra cycle to the execution time. What is the average CPI for this program on this processor

Answers

Answer:

2.6

Explanation:

the diffrence between relational data base system (RDBMS) and HDFS

Answers

Answer:

The key difference between RDBMS and Hadoop is that the RDBMS stores structured data while the Hadoop stores structured, semi-structured, and unstructured data. The RDBMS is a database management system based on the relational model

What is the major difference between categories and tags?

Categories are external and tags are internal.
Tags use URLs and categories do not.
Categories use URLs and tags do not.
Categories are internal and tags are external.

Answers

Answer:

tags use url's and categories do not

Explanation:

sorry it took to long but i found something, hope this helps

Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2000, the program should display that February 2000 has 29

Answers

Answer:

5

Explanation:

becauss it is impossible to actually di

communication is an endless process . Explain

Answers

in the process of communication it's easy to understand each other

Uhaul general mechanical questions 2021
Not a question. But the answers.

1) The PRIMARY purpose of the dual rear tires on this truck is to: (A) Reduce the chance of a blowout. (B) Withstand a heavier load and add greater stability. (C) Add more weight to the rear of the truck.
B
2) Which of these tools should be used on a Phillips-head screw?
B
3) Which arrow points to the alternator?
C
4) With the truck backing up and the front tires turned as shown, which way will the rear of the truck swing?
A
5) Above are four tools. Three of the tools have a similar function while one is different. Which tool performs the most different function of the four tools?
D
6) Which scaffolding above could probably hold more weight?
B
7) Which refrigerator will be easier to roll over uneven ground?
A
8) Assuming the pick-up trucks, trailers and road conditions are exactly the same, which vehicle will take a longer distance to stop?
B
9) What is the proper battery cable connection when jumping two automotive batteries? (A) Negative to Negative / Positive to Positive (B) Negative to Positive / Negative to Positive (C) It doesn't matter on 12-volt automotive batteries
A
10) Which of these filters is associated with airflow?
A
11) If a box of clothes weighing 10 lbs (4.5 kg) and a box of books weighing 10 lbs (4.5 kg) were placed on a scale, what is most likely to occur?
C
12) Which area will get the smoothest ride?
B
13) Which trailer has more downward pressure where it attaches to the car?
A
14) Which direction will wheel three rotate?
B
15) The tire above has a recommended tire pressure of 35 PSI, however, its current pressure is only 26 PSI. Which of the following could occur if driven on? (A) A tire blowout. (B) Unstable handling of the vehicle. (C) Both A & B.
C
16) Which is the proper position of the adjustable wrench for tightening a nut?
A
17) Which tire has more tread? (A) Image A (B) Image B (C) Cannot be determined
B
18) Which picture best illustrates the correct location for loading ONLY the washer in this trailer?
B
19) Which is the MOST LIKELY use for the following object? (A) Checking for a vacuum source. (B) Checking for the proper voltage at the battery. (C) Checking for electrical current traveling through a wire.
C
20) If this truck backs up with the front tires turned as shown, which way will the rear of the trailer swing?
B
21) Which illustration best demonstrates the safest ladder for this person to use?
A
22) Which method requires the least amount of effort to move the refrigerator?
A
23) With the side gears turning in the direction shown, in which direction will the top gear turn?
B
24) In order for the Hitch ball to be secured properly, what should be the last part assembled? (A) Nut (B) Shank (C) Cotter Pin
C
25) As the truck backs up, which way should the front tires be turned in order to make the trailer follow the road?
B

Answers

Moving or transportation tools, equipment and methods provides guidance

on the safe an efficient ways to move items.

The correct responses are;

1) (B); 2) B; 3) C; 4) A; 5) D; 6) B; 7) A; 8) B; 9) (A); 10) A; 11) C; 12) B; 13) A; 14) A; 15) B; 16) A; 17) B; 18) A; 19) (C); 20) B; 21) B; 22) A; 23) B; 24) (C); 25) B

Reasons:

1) The correct option is; (B) Withstand a heavier load and add greater stability

By sing two wheels on the rear of a truck, heavy loads can be hauled, and transported around corners, and bumpy roads, reducing the possibility of the load tipping the truck over, thereby keeping the truck stable.

2) The correct option is; B

The Phillips-head screw is cross shaped, and required a cross shaped screwdriver, which is option B)

3) The correct option is; C

The alternator converts mechanical rotational energy into electrical energy, and usually has a compact electrical coil and magnets within its enclosure. The alternator is option C

4) The correct option is; A

The rear of a truck moves in the direction the front tires are turned

5) The correct option is; D

Option A  and B are pliers, while option B is a spanner, all of which are used to fasten and loosen bolts and nuts. Option D is a screwdriver used to fasten and loosen screws.

6) The correct option is; B

The working platform on scaffold B has extra support from the diagonal braces.

7) The correct option is; A

The large size tires in refrigerator A increases the contact surface with the road to prevent entering into small holes

8) The correct option is; B

Due to the heavier load in the trailer of pick-up truck B, more force is required, to stop the truck according to Newton's Laws of motion, and therefore, a longer distance will be taken to stop by the truck, given similar conditions (magnitude) stopping force available

9) The correct option is; (A)

Jumping two batteries to start an automotive with a dead battery requires a Negative to Negative / Positive to Positive  connection, which is option (A)

10) The correct option is; A

The air filter will have a open outer rim for the free passage of air.

11) The correct option is; C

The scale measures the difference in weight, and the weight depends on the mass of the item. Given that the mass are equal, both weights would be equal, and therefore, the scale would be level.

12) The correct option is; B

The smoothest ride is closest to the most weight of the vehicle, which is located in the front, therefore, the area that gets the smoothest ride is option B

13) The correct option is; A

The downward pressure is given by the location of the load relative to the wheel on the trailer, that gives either a clockwise or downward moment of force when in position of option A or a counterclockwise or upward moment at B

14) The correct option is; A

Gear connected by belt or chain move in the same direction, therefore, the direction of wheel 3 is option A

15) The correct option is; B

A tire blowout will not occur because, the pressure is below the recommended pressure. However, the motion of the car will be unstable

16) The correct option is; A

When tightening a nut with an adjustable wrench, the direction of turning the wrench is towards the movable jaw, therefore, the option A is correct

17) The correct option is; B

The difference between the threads of the given tires is the depth of their grooves, therefore, the tire in option B has more thread.

18) The correct option is; A

When loading items on a trailer, the majority of the load should be located in the front, therefore, the correct location for loading only the washer is illustrated by the picture A.

19) The correct option is; (C)

The object has a lead, an insulated handle, and a electrical bulb that lights up when there is electricity, therefore, it is used for (C) Checking for electrical current travelling through a wire.

20) The correct option is; B

The trailer swings in the opposite direction to the truck.

21) The correct option is; B

The ladder in picture B is safer because it spreads more at the base

22) The correct option is; A

Most of the weight of the refrigerator act on the wheel in picture A than in picture B

23) The correct option is; B

The gear turns towards the screen on the left and away from the screen on the right, which is a direction from left to right.

24) The correct option is; (C)

The cotter pin is assembled last to hold the bolt in place, and cannot be assembled before the other parts as it will restrict their movement

25) The correct option is; B

The front tire should be turned in the opposite direction to the intended direction of the trailer.

Learn more here:

https://brainly.com/question/69628

beth chooses fresh vegetables every time she does marketing. she pares and cuts right away these vegetable considering that they are fresh. the moment she serves the appetizer, she washes the plate and uses it without drying. what statement best describes the situation inside teh box

Answers

Answer:

spell correctly "teh=the

Explanation:

beth chooses fresh vegetables every time she does marketing. she pares and cuts right away these vegetable considering that they are fresh. the moment she serves the appetizer, she washes the plate and uses it without drying. what statement best describes the situation inside teh box

______ is defined as the level of power and control that an individual has over their learning.

A.
Student agency

B.
E-Learning

C.
Educational agency

D.
Independence

Answers

Answer:

B, E-Learning

Explanation:

Write a program that prompt the user to enter a bank balance. The balance entered by the user is read into a variable named balance. The program then prompts the user to enter the amount to be deposited. The amount entered by the user is read into a variable named deposit. The program that calculates the new balance, which is the present balance plus the deposit. The program then displays the new balance.

Answers

Answer:

ertyuiopoijuhgfdsa hiyoufun tresdfghytrefgytredfg

Explanation:

look for the words

Which of the following is a document view you can select using Button on the status bar?
a. share view
b, web layout view

Answers

Answer:

la b

Explanation:

The web layout view is the document view that can be selected using the buttons on the status bar. Thus, option b. is correct.

What is web layout view?

The web layout view is the feature of Microsoft word, that helps the user to view their document in the form as it could be seen in the webpage if the document is published.

The status bar of the Microsoft word allows the user to view their document in the web layout view simply by clicking a button on the status bar.

Therefore, option b. is correct.

Learn more about web layout view, here:

https://brainly.com/question/1327497

#SPJ2

Other Questions
Help asapppppppppp!!!! Help me answer! Question: Lola has 4 1/2 cups of rice. She uses 3/4 of the rice to make sushi rolls for dinner. She uses the rest of the rice to make rice pudding for dessert. How much rice does Lola use for the rice pudding? 1A line passes through the point (10, 4) and has a slope of1/2Write an equation in slope-intercept form for this line. PLS HELP THE QUESTION IS IN THE PIC!!!!I AM GIVING BRAINLIEST!!!!!!Select the correct answer.Which number best represents the slope of the graphed line?A. -5B.-1/5C. 1/5D. 5 2. Elements in a family have the same A. total number of electronsB. protons and neutronsC. number of valence electrons find the circumference of both circles Identify the slope and y-intercept of the line on the following graphs. Then, write the equation of the line in slope-intercept form. URGENT WILL GIVE BRAINLIEST! How is citizenship by descent different from citizenship of adoption? Reasoning This week, 963 people went to the beach. Last week, 1.197 people went to the beach. The number of people who went to the beach fell by what percent? Use pencil and paper Explain how you knowwhether the answer is greater than or less than 25%The number of people that went to the beach fell by about %(Round to the nearest tenth of a percent as needed) what tribes of indians were forced out of the south by Jackson? why do you add a daily limit im sueing One form of mo-cap is using - - - - - - - - - - - - -brainly notice: Don't use such phrases here, not cool! It hurts our feelings :( a 24 year old motorcycle driver would not be required to wear a helmet when riding in Florida help on this question please? 4. The rich peoplesome of the poor people. (1 point)hirekillfeedhate5. The poorest of the poor become ___? Prisoners.honest.the police.the teacher. Gene mapping is based on which of the following? Mendelian ratio of offspring frequency of crossing over physical distance of traits law of independent assortment A car travels 75 miles per hour, and a plane travels 15 miles per minute. How far (in miles) does the car travel while the plane travels 600 miles? Which features were most commonly used in Islamic art and architecture? minarets calligraphy writings human forms arches and arch patterns. Find the product of $$12\times5$$ Which document established an early form of self-government in the Plymouth Colony?