A student wants an algorithm to find the hardest spelling word in a list of vocabulary. They define hardest by the longest word.

Implement the findLongest method to return the longest String stored in the parameter array of Strings named words (you may assume that words is not empty). If several Strings have the same length it should print the first String in list with the longest length.

For example, if the following array were declared:

String[] spellingList = {"high", "every", "nearing", "checking", "food ", "stand", "value", "best", "energy", "add", "grand", "notation", "abducted", "food ", "stand"};
The method call findLongest(spellingList) would return the String "checking".

Use the runner class to test this method: do not add a main method to your code in the U6_L3_Activity_One.java file or it will not be scored correctly.

Hint - this algorithm is very similar to the algorithms you have seen to find maximum/minimum values in unit 4. You need a variable which will keep track of the longest word in the array (either directly or as the array index of that word). Start this variable off with a sensible value, update it whenever a longer word is found, then return the longest word at the end.

Answers

Answer 1

Answer:

Initialize the “longest word” by an empty string and update it when a longer word is found

Explanation:

import java.util.stream.Stream;

public static String findLongest(String[] spellingList) {

   return Stream.of(spellingList).reduce("", (longestWord, word) -> (

       longestWord.length() < word.length() ? word : longestWord

   ));

}


Related Questions

Taking these steps will help to improve the delivery of your presentation.
Be familiar with the place the presentation will be given.
Practice your presentation.
Move away from your computer frequently while speaking and return to it to advance slides.
Read from your slides so you don't forget your content.

Answers

Taking any/all of these steps will help to improve the delivery of your presentation:

==> Be familiar with the place the presentation will be given.

==> Practice your presentation.

==> Move away from your computer frequently while speaking, and return to it to advance slides.

==> Use your conversation words and voice.  Don't read it from a paper (unless you can write in conversational words and phrases, but this is really hard to do).

==> Look around the audience while you're talking.  Make eye-contact with people.

==> Let your hands move normally while you talk.  Smile.

-- Read from your slides so you don't forget your content.   ==> No. This is considered one of the signs of a poor presentation, and an inadequately prepared presenter.  

You're not there to read the slides to your audience.  They can read the slides just as well as you can.  You're there to explain, embellish, enhance, and enlarge the material on the slides.  If you don't have any more to tell them except what's on the slides, then you don't even need to drag yourself or the audience through the agony of the presentation. Just print the slides onto a handout, hand it out, dismiss the audience, and take the rest of the day off.  

Also, you're expected to know your subject well enough so that you don't need to read your slides to know what you're talking about, and to be well enough prepared to remember what comes next.

Answer:

C. Move away from your computer frequently while speaking and return to it to advance slides.

Explanation:

Which is the hanging indent on the rulern

Answers

Answer:

indent is a space between the red line.

Explanation:

Becca is working on a program that will store data. The program will need quick access to data and data persistence is not

important. Where should the data be stored?


In memory

In a database

In flash memory

In a flat file

Answers

Answer:

in memory

Explanation:

A database refers to a collection of data that is organized and stored in a computer system.

Flash memory is a non-volatile memory chip that helps to transfer data from a personal computer (PC) to a digital device.

A flat file comprises a single table of data.

Becca is working on a program that will store data such that the program will need quick access to data and data persistence is not  important.

Therefore,

data should be stored in memory.

On what aspect of digital media do people often focus on at the expense of the important supporting roles?

creation

distribution

sales

development

Answers

Answer:

the answer would be creation

Answer:

creation

Explanation:

Which portion of the Outlook interface contains commonly accessed commands that a user will require frequently
and is able to be customized by the user based on their particular needs?
Quick Access toolbar
ribbon and ribbon tabs
Tell me box
Title bar

Answers

Answer:

A

Explanation:

on edge 2021

a flow chart is the _______ representation of the sequence of steps required of steps required to solve a particular problem​. I know answer I want how is it the answer

Answers

Answer:

A flowchart is simply a graphical representation of steps. It shows steps in sequential order and is widely used in presenting the flow of algorithms, workflow or processes. Typically, a flowchart shows the steps as boxes of various kinds, and their order by connecting them with arrows.

it refers to the ability of different parts of a computer to work together as one. please answer this​

Answers

Multiseat o multipuesto,

Question
1. Who was the first to use an abacus

Answers

Answer:

The Chinese

Explanation:

is willingness to be held accountable for your actions

Answers

Answer:

Responsibility.

Explanation:

Responsibility is the willingness to be held accountable for your actions.

A responsible person would always take measured and careful step or engage in well-thought-out actions that will add value to their lives and positively impact their immediate environment.

This ultimately implies that, responsibility is an individual characteristic which typically involves acting in a positive manner and owning up to any of your actions.

In a nutshell, responsibility requires that an individual does the right thing, the right way, at all times.

So I'm a teen computer programmer, and I've built a couple of projects, but I'm looking for an idea to make me big money. So fellow brainliacs or brainlists, what everyday problems do you face and wish you had an app for?

Answers

I hate lag and glitch and so many adds

Match the word to its definition:

1. Smart phone

2. Super computer

3. Tablet

4. Mainframes

5. Notebook

6. Desktop


7. Program

8. Computer

a. A small portable computer, such as a netbook

b. A type of computer used by many people at the same time to allow access to the same secure data

c. A device that includes, text, and data capabilities
d. An individual’s personal computer that resides on a desk or table

e. A computer that combines the features of a graphic tablet with the functions of a personal computer; sometimes called a tablet PC

f. A large and powerful scientific computer that can process large amounts of data quickly

g. The coded instructions that tell a computer what to do; also to write the code for a program

h. Is a machine that changes information from one form into another by performing four basic actions

Answers

Answer :

All these are a type of computers and is used for processing data.

Explanation:

a. A small portable computer, such as a netbook -- 3. Tablet

b. A type of computer used by many people at the same time to allow access to the same secure data -- 4. Mainframes

c. A device that includes, text, and data capabilities -- 1. Smart phone

d. An individual’s personal computer that resides on a desk or table -- 6. Desktop

e. A computer that combines the features of a graphic tablet with the functions of a personal computer; sometimes called a tablet PC -- 5. Notebook

f. A large and powerful scientific computer that can process large amounts of data quickly -- 2. Super computer  

g. The coded instructions that tell a computer what to do; also to write the code for a program -- 7. Program

h. Is a machine that changes information from one form into another by performing four basic actions -- 8. Computer

Based on the knowledge of computer and computing devices, the definition which matches the phrases in the question are ;

Small portable computer, such as a netbook, they are usually bigger than a smartphone, they are called Tablets.

A type of computer used by many people at the same time to allow access to the same secure data, They represent a central data access location. They are called Mainframes

A device that includes, text, and data capabilities, they enable on-the-go access to the internet due to their Portability. They are called Smart phones.

An individual’s personal computer that resides on a desk or table. They are common in offices and comprises of different units such as monitor and CPU, thus they cannot be carried around. They are called Desktop.

A computer that combines the features of a graphic tablet with the functions of a personal computer; sometimes called a tablet PC. They differ from desktop because they are handy. They are called Notebooks.

A large and powerful scientific computer that can process large amounts of data quickly. They posses larger storage and faster processing capability. They are called Super computer.

The coded instructions that tell a computer what to do; also to write the code for a program. They could be written in different languages. They are called Program

Is a machine that changes information from one form into another by performing four basic actions are called Computers.

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

What is the output?
str = 'abcdef
print(str[2:50)

Answers

Answer:

What is the output of print str if str = 'Hello World!'? A - Hello World! ... Q 18 - What is the output of print list[1:3] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?.

Explanation:

Answer:

What is the output of print str if str = 'Hello World!'? A - Hello World! ... Q 18 - What is the output of print list[1:3] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?.

Explanation:

Can someone plz explain me what this button does and I’m scared to click it
It’s like a square and it’s window 10

Answers

Answer:

if i remember correctly that button is used to short cut tabs or do something with the current page

yes or no let attractive visuals cover half of your ad space​

Answers

Answer:

Yes it covers half of my ad space

Study the original and changed passages.

Original passage:

One way to make a document more readable is by controlling the space between paragraphs, which can be done by adding space between and after a paragraph.
Another way to make a document more readable is by keeping the paragraph on one page, which can be done by changing the spaces between the lines in the paragraph.

Answers

Answer:b

Explanation:

Answer:

It's B, The space between the lines of both paragraphs decreased.

Explanation:

On Edge 2021

What is binary ????????

Answers

Binary (or base-2) a numeric system that only uses two digits — 0 and 1. Computers operate in binary, meaning they store data and perform calculations using only zeros and ones. A single binary digit can only represent True (1) or False (0) in boolean logic.1. Binary is a base-2 number system invented by Gottfried Leibniz that is made up of only two numbers: 0 and 1. This number system is the basis for all binary code, which is used to write data such as the computer processor instructions used every day.

Answer:

it is a numeric system that only uses two digits 1 and 0, computers can operate using binary meaning they store data and perform calculations only using 0 and 1

Who requests services and who facilitates services to a client.​

Answers

Answer:

The client-server model is the relationship between two computers in which one, the client, makes a service request from another, the server. The key point about a client-server model is that the client is dependent on the server to provide and manage the information. For example, websites are stored on web servers .

How would our lives be different without computers at social?

Answers

Answer:

We'll spend more time with our family like vacations, gatherings and any type of family activities. Always having fun like telling stories and maybe spending more time outside with nature. Hanging out with friends and family.

Answer:

Life without computers would be so pathetic. It would be so difficult to spend a life without computers. We would not be aware of technology or what things are being discovered.

Explanation:

Thank You Have A Good Day or Night <3

Can anyone help answer this question please

Answers

Answer:

on premise or in the cloud

Explanation:

on premise would be more reliable because it would still work if internet connection fails.

cloud would be safer if you fear the stored footage can be destroyed, by e.g., fire or someone who doesn't want it exposed

how should tools be stored

Answers

You should store tools in a storage or tool box

Which of the following bit value represent -5 in two's complement notation?
10000101
11111010
00000101
11111011

Answers

Answer:

11111011

Explanation:

BJP4 Self-Check 7.21: swapPairs

Write a method named swapPairs that accepts an array of strings as a parameter and switches the order of values in a pairwise fashion. Your method should switch the order of the first two values, then switch the order of the next two, switch the order of the next two, and so on.

PLEASE HELP DUE AT 11:59

Answers

Answer:

public static void swapPairs(ArrayList strList)

{

 for(int i = 0; i < strList.size() - 1; i += 2)

 {

  String temp1 = strList.get(i);

  String temp2 = strList.get(i + 1);

  strList.set(i, temp2);

  strList.set(i + 1, temp1);

 }

}

Explanation:

Buying the newest phone as soon as it is released when your current phone works perfectly is not a good idea for all but which of the following reasons?

Answers

Answer:

You are gonna waste money and it might not be the best idea

Explanation:

Answer:

waste money

Explanation:

What is a working model used to test a design called?

Answers

A working model used to test a design is a prototype.

Answer:

mockup is the working model

Draw a flowchart to find the average grade in 3 subjects

Answers

Answer:

See attachment for flowchart

Explanation:

The flowchart is as follows:

Step1: Start

This begins the flowchart

Step 2: Input Score1, Score2, Score3

This gets user input for the three subjects

Step 3: Average = (Score1 + Score2 + Score3)/3

This calculates the average of the three subjects

Step 4: Print Average

This displays the calculated average

Step 5: Stop

This signals the end of the flowchart

Select the correct category of cybersecurity described.

It prevents intruders from accessing, misusing, destroying, adapting, or improperly disclosing networks, network infrastructure, or the information contained within networks.

network security

information security

operational security

infrastructure security

Answers

Answer:

Network security

Explanation:

Network security is a category of cybersecurity that is related to the protection of the infrastructure of the computer network from unauthorized access and intrusion that may be from intended attack or from an expedient  program which may result in the modification, malfunctioning, misuse or unacceptable disclosure of the network and the contents of the network

The category of cybersecurity that 'prevents intruders from accessing, misusing, destroying, adapting, or improperly disclosing networks, network infrastructure, or the information contained within networks' is network security.

Answer:

network security

Explanation:

Theresa is not sure how nondestructive editing can be helpful in her project. Which of these is accurate about nondestructive editing? Theresa is not sure how nondestructive editing can be helpful in her project. Which of these is accurate about nondestructive editing?

A.

The original data is preserved with no changes, and you can always retrieve it for edits.

B.

The original data is changed slightly, and you cannot always retrieve it for edits.

C.

The original data is preserved with no changes, but you cannot retrieve it for edits.

D.

The original data is changed significantly, but you can always retrieve it for edits.

Answers

a. the original data is preserved with no changes, and you can always retrieve it for edits.

i think lol

The original data is preserved with no changes, and you can always retrieve it for edits of these is accurate nondestructive editing. Thus option A is correct.

What is the project?

A project is a collection of tasks that can only be finished in order to achieve a particular goal. A project may alternatively be described as a collection of inputs and results necessary to accomplish a specific objective. Projects can be administered by one worker or one hundred, and they can be simple or complex.

Nondestructive editing enables you to modify a photograph by erasing the initial image information, which is still accessible in the event that you need to go back to it. Since nondestructive editing is does not destroy data from that of an image, the grade of the edited image remains unchanged.Therefore, option A is the correct option.

Learn more about the project, Here:

https://brainly.com/question/29564005

#SPJ2

 

Stacy plans to print her contacts and would like to choose an option that will print select information for each contact in a business card format. Which option should she choose?

Small Booklet style
Medium Booklet style
Memo style
Card style

Answers

Answer:

D

Explanation:

did the quiz

Answer:

D: card style

Explanation:

just took the unit test on edge and made a 100%

I need so much help, can anyone please help me?

Answers

Answer:

I'm not sure about it, but it's something similar.

Explanation:

array name[3]

array marks[3,5]

Total←0

Average Mark←0

For Count ←1 To 3

WRITE "Input name"

INPUT array name[3]

NEXT

FOR Count ← 1 TO 5

WRITE "Enter Mark"

INPUT ←array mark[3,5]

Total ← Total+Mark

NEXT

avg ←Total/5

WRITE “Total of 5 Marks is:”, Total

WRITE “Average of 5 Marks is:”, avg

What is pseudo code?

Answers

Answer:

a notation resembling a simplified programming language, used in program design.

Explanation:

Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is a "text-based" detail (algorithmic) design tool. The rules of Pseudocode are reasonably straightforward. All statements showing "dependency" are to be indented. These include while, do, for, if, switch.
Other Questions
Which of the following best replaces the underlined word in the sentence? The car sales man pitched the newest model to me with a little too much fervor. What kind of transformation on a coordinate grid does each statement describe?b) The vertex at (x, y) moves to (x + 5, y + 3).c) The vertex at (x, y) moves to (y, x).d) The vertex at (x, y) moves to (y, x). What did Louisianas wealthy plantation owners experience regarding their social status as a result of the Civil War?They lost their high social status as their plantations crumbled and wealth declined.Their social status lessened because slavery was outlawed and they were now considered criminals.Their social status increased because, despite the war against slavery, they managed to make money.They kept their social status because they bought protection and continued operating. New Technology Leads to Bigger CitiesIn the 1800s, the United States was still a very young nation, trying to solidify its identity. The Industrial Revolution began in Great Britain, a fast development of society following the introduction of machines. The United States was slower than Great Britain to fully embrace the changes. Yet key technological developments caused a rapid growth in American urban areas.Better farming methods and tools in the 1800s increased food production. Americans were able to grow enough food for their families as well as to sell. The abundance caused food prices to fall.The expansion of cotton and the growth of textile factories in northern states helped produce the first wave of American industry. More people turned to work in northern factories as a way to support their families. Thousands of immigrants to the United States also settled in or near port cities, looking for work. Even today, the need for work is a common reason people move to urban areas.As a result, cities grew in numbers of people and physical space. As more people and businesses moved in, they needed buildings for living and working. They needed ways to move around the city. We call this process urbanization.In 1820, the United States had only a few cities of 10,000 residents or more. About seven percent of U.S. residents lived in urban areas. The number of cities with more than 10,000 people grew quickly over the next 40 years, especially in the Northeast and Midwest. By 1860, about 20 percent lived in cities. Philadelphia and New York City were the most populated cities in 1860 and would soon reach one million residents.The urbanization of the United States quickened due to technology improvements. Without innovations in food production, the factories could not have grown so quickly. The trend quickened after 1860 and continued throughout the 21st century as well. By 2007, more Americans lived in or near cities than they did in rural areas.Which sentence from the conclusion paragraph best rephrases the author's thesis? (5 points)A. By 2007, more Americans lived in or near cities than they did in rural areas.B. Without innovations in food production, the factories could not have grown so quickly.C. The trend quickened after 1860 and continued throughout the 21st century as well.D. The urbanization of the United States quickened due to technology improvements. ANSWER FAST PLEASEWhat did John Quincy Adams gain from the railroad industry? Given right triangle ABCABC with altitude \overline{BD} BD drawn to hypotenuse ACAC. If AC=16AC=16 and DC=3,DC=3, what is the length of \overline{BC} BC in simplest radical form? What is the Range of100, 75, 40, 90, 80, 100,92, 88, 80, 84, 81? Explain how are major and minor triads described in test and why? Online recommendation engines typically are based on how is the temporary hardness of water removed by boiling method explain in brief Does anyone know this? Need it ASAP. Plates slide past each other at a. convergent plate boundaries. b. divergent plate boundaries. c. transform plate boundjes. d. stable plate boundaries. 2squared minus 4squared plus 1 plus 7 squared can you find the answer Criminal Minds Or Ncis // easypoints If a DNA molecule is 24% Thymine, which one of these is correct? A. Adenine is also 24%, Cytosine is 26%B. Cytosine and Guanine have a total of 48%C.Guanine is 26% and Cytosine is 24%D. A and B are correct Plz help ASAP question is on picture :( Plz help me !!!!!!!!! Determine whether each statement is true or false:a. Adding a multiple of one column of a square matrix to another column changes only the sign of the determinant.b. Two matrices are column-equivalent when one matrix can be obtained by performing elementary column operations on the other.c. If one row of a square matrix is a multiple of another row, then the determinant is 0. What are reparations? WW1 One of the fastest pitches ever thrown in Major League Baseball was by Aroldis Chapman and had a velocity of 105.1 miles/hour. How many seconds did it take this pitch to travel the 60 feet and 6 inches from the pitcher's mound to home plate