Consider the following code.

public void printNumbers(int x, int y) {
if (x < 5) {
System.out.println("x: " + x);
}
if (y > 5) {
System.out.println("y: " + y);
}
int a = (int)(Math.random() * 10);
int b = (int)(Math.random() * 10);
if (x != y) printNumbers(a, b);
}

Which of the following conditions will cause recursion to stop with certainty?
A. x < 5
B. x < 5 or y > 5
C. x != y
D. x == y


Consider the following code.

public static int recur3(int n) {
if (n == 0) return 0;
if (n == 1) return 1;
if (n == 2) return 2;
return recur3(n - 1) + recur3(n - 2) + recur3(n - 3);
}

What value would be returned if this method were called and passed a value of 5?
A. 3
B. 9
C. 11
D. 16

Which of the following methods correctly calculates the value of a number x raised to the power of n using recursion?
A.
public static int pow(int x, int n) {
if (x == 0) return 1;
return x * pow(x, n);
}
B.
public static int pow(int x, int n) {
if (x == 0) return 1;
return x * pow(x, n - 1);
}
C.
public static int pow(int x, int n) {
if (n == 0) return 1;
return x * pow(x, n);
}
D.
public static int pow(int x, int n) {
if (n == 0) return 1;
return x * pow(x, n - 1);
}

Which of the following methods correctly calculates and returns the sum of all the digits in an integer using recursion?
A.
public int addDigits(int a) {
if (a == 0) return 0;
return a % 10 + addDigits(a / 10);
}
B.
public int addDigits(int a) {
if (a == 0) return 0;
return a / 10 + addDigits(a % 10);
}
C.
public int addDigits(int a) {
return a % 10 + addDigits(a / 10);
}
D.
public int addDigits(int a) {
return a / 10 + addDigits(a % 10);}

The intent of the following method is to find and return the index of the first ‘x’ character in a string. If this character is not found, -1 is returned.

public int findX(String s) {
return findX(s, 0);
}

Which of the following methods would make the best recursive helper method for this task?
A.
private int findX(String s) {
if (index >= s.length()) return -1;
else if (s.charAt(index) == 'x') return index;
else return findX(s);
}
B.
private int findX(String s, int index) {
if (index >= s.length()) return -1;
else return s.charAt(index);
}
C.
private int findX(String s, int index) {
if (index >= s.length()) return -1;
else if (s.charAt(index) == 'x') return index;
else return findX(s, index);
}
D.
private int findX(String s, int index) {
if (index >= s.length()) return -1;
else if (s.charAt(index) == 'x') return index;
else return findX(s, index + 1);
}

Answers

Answer 1
i think the answer is C
Answer 2

Is this for a grade?


Related Questions

Kevin is scanning old images from his college library. He might use these scanned images in the college magazine. He might also use them on the college website. What is the best practice for Kevin to follow when scanning the images?
A.
scan the images with 72 DPI
B.
scan only the images that are ideal for a website
C.
scan the images with 150 DPI
D.
scan the images with 600 DPI
E.
scan the images that are ideal for a magazine

Answers

Answer: D. Scan the images with 600 DPI

Explanation:

Answer: D. Scan the images with 600 DPI

Explanation: Correct for Plato/Edmentum

write examples of hacking in internet?​

Answers

Answer:

Although hacking is very bad, it can be found everywhere and anywhere.

Examples: Phishing, password checking, and keyloggers

Explanation:

Explanation:

Hacking is an attempt to exploit a computer system or a private network inside a computer. Simply put, it is the unauthorised access to or control over computer network security systems for some illicit purpose.

To better describe hacking, one needs to first understand hackers. One can easily assume them to be intelligent and highly skilled in computers. In fact, breaking a security system requires more intelligence and expertise than actually creating one. There are no hard and fast rules whereby we can categorize hackers into neat compartments. However, in general computer parlance, we call them white hats, black hats and grey hats. White hat professionals hack to check their own security systems to make it more hack-proof. In most cases, they are part of the same organisation. Black hat hackers hack to take control over the system for personal gains. They can destroy, steal or even prevent authorized users from accessing the system. They do this by finding loopholes and weaknesses in the system. Some computer experts call them crackers instead of hackers. Grey hat hackers comprise curious people who have just about enough computer language skills to enable them to hack a system to locate potential loopholes in the network security system. Grey hats differ from black hats in the sense that the former notify the admin of the network system about the weaknesses discovered in the system, whereas the latter is only looking for personal gains. All kinds of hacking are considered illegal barring the work done by white hat hackers.

Plz help:(!!!!

Type the correct answer in the box. Spell all words correctly.

Claire wants to use a filter to ensure quality in the software development process and product. What can Claire use for this purpose?

Claire should use_________
as a filter to ensure quality in the software development process and product.

Answers

Answer:

Defect filters

Explanation:

Answer:

"a quality gate" is the correct answer :D

Explanation:

You have created a group policy that prevents users in the accounting department from accessing records in a database that has confidential information. The group policy is configured to disable the search function for all users in the Accounting OU no matter which workstation is being used. After you configure and test the policy, you learn that several people in the Accounting OU have valid reasons for using the search function. These users are part of a security group named Managers. What can you do to prevent the Group Policy object (GPO) that you have configured from applying to members of the Managers group

Answers

Answer: Add the Managers group to the GPO's discretionary access control list (DACL).

Deny the apply Group Policy and read permissions to the Managers group.

Explanation:

To prevent the Group Policy object (GPO) which had been configured from applying to the members of the Managers group, the Managers group should be added to the GPO's discretionary access control list (DACL).

Likewise, the apply Group Policy can be denied and read permissions to the Managers group. This will further help in the prevention of users.

can you help me with my homework what should i do

Answers

Answer:

what is matter and two examples

What programs are always running when your computer is turned on? Enter the names of the programs in the space provided. Click the Submit button when you are finished to view the suggested response.

Answers

Answer:

open your task manager

Explanation

right click the toolbar below and click on task manager and you will see what programs are running on your pc

Answer:

Items commonly found in the system tray include antivirus settings; battery status; and volume. Sometimes e-mail programs, printers, or faxes are also present. Your computer may have other items in the system tray too.

Explanation:

I just took  a test on edguenity and that was the correct answer hope this helps

which feature of project management includes monetary compensation for the employees

Answers

Answer:

Extrinsic compensation

Explanation:

The feature of project management that includes monetary compensation for employees is the Extrinsic compensation.

Extrinsic compensation is reward ( tangible ) given to workers/employees by the management of a project for the speedy completion of a task or for the completion of a specific task . It can in the form of monetary compensation or non-monetary compensation.

example of Non-monetary compensation includes certificate of honor, medical insurance .

example of monetary compensation includes : work Bonuses , salaries

Identify the characteristics of syntax errors. Choose all that apply.
programmer did not follow the program language conventions
may be highlighted while writing the program
can be caused by mistyping or misspelling while writing the program
does not cause an error message

Answers

Answer:

Explanation:

Identify the characteristics of syntax errors. Choose all that apply.

programmer did not follow the program language conventions

may be highlighted while writing the program

can be caused by mistyping or misspelling while writing the program

Answer:

Its A B C i got it right

Explanation:

This isn't academic, but what do I do if HI-REZ won't let me sign into an existing account. “Something went wrong” keeps popping up when I type in the correct info

Answers

Answer:

contact their support

Explanation:

technically a coding question utilizing python how would one calculate a square root

Answers

Answer:

import math

math.sqrt( x )

Explanation:

The basic code that can be written to calculate the square root of a number is as follows

import math

math.sqrt( x )

What is the purpose of using a tripod when filming?

Answers

Answer:

It helps with the camera  movement to get different angles and directions. Sometimes to keep it safe from falling out of grasp.

Explanation:

Answer:

it steadys the camera and can hold it in place for accurate shots.

Explanation:

Which of these is a discipline?

software manager

customer service specialist

help desk technician

software engineering

Answers

Answer:

Option D

Explanation:

Discipline here refers to any educational course in which a person studies.

software manager , customer service specialist  and help desk technician are basically the job designations and not discipline in which one can pursue study.

However, software engineering is a discipline as one can educate himself/herself in this discipline and become a software engineer.

Hence, option D is correct

True or False

Operating systems control the loading of software applications onto a computer

All OSs offer user preferences allowing you to customize your computer

Answers

I used this from a other.

False

Software is the collection of large program or instruction of codes, which is used to perform some task. It is of two types of system software and application software.

The system software is used as a container for the application software and it is used to handle all other software it is used to operate the system.

Application software is used to perform any operation. This type of software can be used by the user if it is installed on the local machine on any system software

The operating system is also the part of the system software because it is used to operate the system and it is also the soul of the computer system which is also the function of the system software but the above question states that the operating system is not the part of the system software which is not correct. Hence false is the correct answer to the above question.

HELPPP ME PLEASEEE!!

Answers

It’s the last one! The key to an effective persuasion is to know what you want and be clear about your response.

Complete the sentence.
You might create algorithms and flowcharts during the ______ phase of software development.

Release

Planning

Design

Coding

Answers

You might create algorithms and flowcharts during the Design phase of software development.

What is the algorithms  about?

In software development, the Design phase is a crucial step in which the developers plan and determine how the software will be built. This involves breaking down the requirements and specifications into smaller, manageable components and then figuring out how these components will work together.

Therefore, to accomplish this, developers often create diagrams, such as flowcharts or algorithms, to help visualize the software's logic and structure. These diagrams can then be used to guide the development of the software, ensuring that all parts of the project are aligned and working towards the same goals.

Learn more about algorithms from

https://brainly.com/question/20543449

#SPJ1

What is the web page path on the web server for the URL:
http://www.mydomain.com/main/index.html?
O http://
O www.mydomain
O main/index.html
O index.html

Answers

Answer:

C: main/index.html

Explanation:

(WEB DESIGN FINAL QUESTION) PLEASE HELP
what is a trademark?

Answers

Answer:

a trade mark is something where someone owns the rights to something in a specific country

Select the correct answer from each drop-down menu.
Complete the following sentences.

_________ effort is an important and necessary factor for the success of any project. In software development projects,
_______team members carry out several tasks to ensure the quality of the process and the final product.

Options for the first box are: managers, A teams, an individuals

Options for the second box are:internal, specific, external

Answers

Answer:

First, A teams, Second ,Specific

Explanation:

select all the correct answers
which two programming languages are most commonly used to write web based software programs?
1. Python
2. C
3. PHP
3. Ada

Answers

Answer:

PythonPHP

Explanation:

Plato Correct!

The two programming languages most commonly used to create software for websites are Python and PHP.

We have,

Python is known for being easy to understand and read, which makes it popular for building web applications.

It has tools and frameworks that help developers create websites quickly.

PHP is a language specifically designed for web development.

It is used to write code that runs on the server and helps create interactive websites.

Many popular websites and content management systems, like WordPress, are built with PHP.

While the C language can also be used for web development, it is not as commonly used as Python and PHP in this context.

Ada is a programming language mainly used in specialized industries like aerospace and defense.

It is not commonly used for creating websites.

Thus,

The two programming languages most commonly used to create software for websites are Python and PHP.

Learn more about programming languages here:

https://brainly.com/question/23959041

#SPJ4

Telecommunications, outsourcing, flextime, teamwork, and diversity are workplace trends adopted to
O True
O False

Answers

Answer:

False

Explanation:

Outsourcing and telecommuting are the trends related to presence of growing technology within the economy allowing various services to be outsourced to people who are more of an expert when it comes to handling those procedures.

You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is getting a discount, which is determined by the age of the youngest person in the group. You need to create a program that takes the ages of all 5 people as input and outputs the total price of the tickets. Sample input: 55 28 15 38 63 sample output: 42.5 the youngest age is 15, so the group gets a 15% discount from the total price, which is $50 - 15% = $42.5

Answers

Answer:

Explanation:

The following program is written in Java. It takes 5 inputs of int values for the ages of each member in the group. Then it loops through all of the ages and chooses the youngest age. Finally, it applies that age as a discount to the final price which would be $50, outputting the final discounted price. The output for the test case provided can be seen in the attached picture below in red.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int[] person = new int[5];

       System.out.println("Enter age of individual 1: ");

       person[0] = in.nextInt();

       System.out.println("Enter age of individual 2: ");

       person[1] = in.nextInt();

       System.out.println("Enter age of individual 3: ");

       person[2] = in.nextInt();

       System.out.println("Enter age of individual 4: ");

       person[3] = in.nextInt();

       System.out.println("Enter age of individual 5: ");

       person[4] = in.nextInt();

       int youngest = person[0];

       for (int x = 0; x < person.length; x++) {

           if (person[x] < youngest) {

               youngest = person[x];

           }

       }

       double discount = 1 - (((double)youngest) / 100);

       double output = 50 * discount;

       System.out.println("Total Price: " + output + " the youngest is " + youngest);

   }

}

Choose the expression that belongs in the blank in order to have the output shown.

>>> a = 5
>>> print(_____)
The value is5

"The value is " + str(a)

"The value is" , str(a)

"The value is " , str(a)

"The value is" + str(a)

Answers

Answer:

Option B

Explanation:

Given

a = 5

and if the value allotted to variable a is to be printed, the following command will be used

print "The values is", str(a)

Hence, option B is correct

one day when rahul went to his computer lab and saw that all the computers were connected to a single printer and whoever is giving a command to print, the print out comes from that printer. can you name the concept of communication? class 8 computer one word answer..​

Answers

Explanation:

you can connect multiple PCs to the wireless printer and print your documents from each one of them as long as the printer can be connected to the same network . You need the disc that came with the wireless printer to install the correct drivers on your computers and laptops.

hope it helps ( brainleist please )

Rob is planning his housewarming party. He wants to design an invitation and personalize it for each invitee. He needs to create a list of invitees, design the card, and personalize the card. How should he complete the tasks? a. Use mail merge for steps 1 and 2 and a word processor for step 3. b. Use a graphics software for step 1, mail merge for step 2, and a word processor for step 3. c. Use a word processor for steps 1 and 2 and a graphics software for step 3. d. Use a word processor for step 1, graphics software for step 2, and a mail merge for step 3.

Answers

Answer:

1: Word Processor

2: Graphics Software

3: Mail Merge

Explanation:

Given

1. Create a list of invitees

2. Design an invitation card

3. Personalize the card

Creating a list of invitees is a task that requires basic activities such as typing, using of numbers and bullets; these activities can be achieved using word processing software programs such as Microsoft Word, WordPerfect, amongst others.

So task 1 requires a word processor

An invitation card is a piece of graphics that can be perfectly handled by graphics software programs such as CorelDraw, Adobe Photoshop, etc.

So task 1 requires a graphics software

Task 3 can be achieved using mail merge and this is because mail merge can be used either to print or to mail recipients. While mailing the recipients, one can easily personalize each letter (or in this case, an invitation card) to suit the recipient it is being directed to.

adassadad saflalfaklfajfklajfalkfjalkfjalkfalkf

Answers

Answer:

this belongs on r/ihadastroke

Explanation:

Answer: ok

Explanation:

HELPPPP KOKICHI IS OUT TO KILL ME

Answers

Oh my- good luck with that-

Answer:

rest in piece :(

Explanation:

Many applications ask, "Why did you leave your previous position?" Choose the best answer out of the examples below.

Answers

We can't see the examples therefore we can't help you try asking the question again with a picture of the examples

Which of the following images illustrates safe driving?

Answers

Answer:

bottom left

Explanation:

Answer:

keep your eyes on the road!!!!

A chain of coffee servers is sending a spreadsheet of projected costs and profits to some of its investors. When, Kyle, the administrator making the spreadsheet, adds an image of his company’s logo, he realizes it would fit and look best if turned to read sideways.

How can Kyle change the image to make it fit in such a way?

He can select the image and hold down on the green handle above it while sliding the mouse.
He can select the image and hold down Control while sliding the scroll bar to the right.
He can press the PivotTable button and select “Rotate 90 degrees” and then click OK.
He can click on the Pictures Tool tab and select press Artistic Effects to access the rotate option

Answers

Answer:

On a spreadsheet application including MS Excel;

He can select the image and hold down the rotation handle above it while sliding the mouse

Explanation:

Manual rotation of a picture or a text box can be performed by selecting the image or text box in MS Word or a spreadsheet application such as MS Excel. With the mouse select the rotation handle of the picture and drag in the direction desired, left or right.

So as to limit the rotation to 15 degrees hold down the shift button while dragging the rotation handle by clicking on it with a mouse and dragging in the desired direction

What would be the result after the following code is executed? int[] numbers = {40, 3, 5, 7, 8, 12, 10}; int value = numbers[0]; for (int i = 1; i < numbers.length; i++) { if (numbers[i] < value) value = numbers[i]; } The value variable will contain the highest value in the numbers array. The value variable will contain the sum of all the values in the numbers array. The value variable will contain the average of all the values in the numbers array. The value variable will contain the lowest value in the numbers array.

Answers

Answer:

The value variable will contain the lowest value in the numbers array.

Explanation:

Given

The given code segment

Required

The result of the code when executed

The illustration of the code is to determine the smallest of the array.

This is shown below

First, the value variable is initialized to the first index element

int value = numbers[0];

This iterates through the elements of the array starting from the second

 for (int i = 1; i < numbers.length; i++) {

This checks if current element is less than value.

     if (numbers[i] < value)

If yes, value is set to numbers[i]; which is smaller than value

value = numbers[i];

Hence, the end result will save the smallest in value

Other Questions
5. In the regular decagon shown, what is the measure of angle 1? *1 pointOne Exterior Angle of a REGULAR PolygonOneEx 4 = 360(18 degreesO36 degrees72 degrees0180 degrees Which of the following phrases best describes the meaning of suburban decay? A. the loss of diversity as suburban areas lose culture B. the decline of suburban populations as residents move to new locations C. the decline in ethics and morality in suburbs D. the loss of cultural awareness as people move from the city to the suburbsTHE ANSWER IS B What is the present value of 4360 to be received at the beginning of each of 30 periods discounted at 5% compound interest Question:1. If you were Michael, where would you buy?2. Why would you buy there? Forsyth County charges a 7% sales tax. If you bought a new printer form $3250.00, what is the total cost for the printer? Find the area of the kite below. The elements neon and argon are not reactive HELPPPP KOKICHI IS OUT TO KILL ME Help please with this math ;-; I beg of you giving brainliest! (100pts if you answer correctly!) How would you interpret the lesson of King Midas for a modern-day world. What do you think the message of the story is? Do you think King Midas is a relevant story for a modern world? Why or why not? (At least 8 sentences!) Steven has 17 baseball caps. He has 2 blue caps and he has 3 more green caps than blue ones. The rest of his caps are black.How many black caps does Steven have? HELP ME ASAP! bbbbbb Use the equation below to find c, if a = 43 and b = 49. c=180-a-) ? WILL GIVE BRAINLILESTIn your speech you MUST explain what happened at Pearl Harbor, the situation in Europe, and the current economic situation in America. Your speech must be at least 6 sentences long PLEASE ANSWERR ASAP I WILL GIVE BRAINLYEST AND REPORT (science) I KNOW 1, 2 AND 5 I NEED 3 4 AND 6 Median of 93 87, 81, 80, 78, 95, 83, 81, 76, 74, 88, 86, 85, 76, 60, What parts of the government made this headline happen?a) Senate and Presidentb) Supreme Court and Presidentc) House of Representativesd) Supreme Court and House of RepresentativesPlease answer if you are sure and DO NOT SEND LINKS A suffix is a word part attached to_ a the beginning of a root word b the middle of a root word c the end of root word Find the measure of the angle indicated I dont get how they added to get the amount of money earned, I need help if you can explain how I can find the amount of money earned for 40 hours.