50 POINTS
in Java
A palindrome is a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.

In this program, ask the user to input some text and print out whether or not that text is a palindrome.

Create the Boolean method isPalindrome which determines if a String is a palindrome, which means it is the same forwards and backwards. It should return a boolean of whether or not it was a palindrome.

Create the method reverse which reverses a String and returns a new reversed String to be checked by isPalindrome.

Both methods should have the signature shown in the starter code.

Sample output:

Type in your text:
madam
Your word is a palindrome!
OR

Type in your text:
hello
Not a palindrome :(

Answers

Answer 1

import java.util.Scanner;

public class JavaApplication52 {

   public static String reverse(String word){

       String newWord = "";

       for (int i = (word.length()-1); i >= 0; i--){

           newWord += word.charAt(i);

       }

       return newWord;

   }

   public static boolean isPalindrome(String word){

       if (word.equals(reverse(word))){

           return true;

       }

       else{

           return false;

       }

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Type in your text:");

       String text = scan.nextLine();

       if (isPalindrome(text) == true){

           System.out.println("Your word is a palindrome!");

       }

       else{

           System.out.println("Not a palindrome :(");

       }

   }

   

}

I hope this works!


Related Questions

Which are characteristics of interpreters? Select
all that apply.
translate high-level programming language
into binary computer machine language
offer a program run-time that is faster than
when a compiler is used for the translation
make it possible to change the source
program while the program is running
offer a program run-time that is slower than
when a compiler is used for the translation

Answers

Answer:

translation is used for interpretation

I am timed and it needs to be in program C PLEASE help !!


Declare an array of doubles of size 170 called examBonus and initialize all the elements in the array to 5.5 (HINT: use a loop)

Answers

Answer:

Following are the declaration to this question:

double examBonus[] = new double[170]; // declaring the double array examBonus that holds 170 size value  

int x1;//defining an integer variable x1

for (x1=0;x1<170;x1++)//defining a for loop that initialize value in array

{

examBonus[x1] = 5.5;//assign value in array

}

Explanation:

In the above-given java program code, a double type array "examBonus" is declared, that holds a given size value, which is already defined in the question.

In the next step, an integer variable "x1" is defined which is used in the for loop that starts from 0 and ends when its value less than 170, and it assigns the value "5.5" in the above-given array.

A town government is designing a new bus system and are deciding where to put the different bus stops. They want to pick the collection of locations that minimizes the distance anyone needs to walk in order to get to at least one bus stop. What term best defines the kind of problem?

An optimization problem

An undecidable problem

An efficiency problem

A decision problem

Answers

Answer:

Optimisation Problem

Explanation:

Optimisation Problem is a mathematical economics, computer science problem - which finds the best solution from all feasible solutions (based on constraints & other aspects).

The problem might be in form of maximisation or minimisation. The bus system designing is based on minimizing walking distance. Thus is an optimisation problem.

The term which best defines this kind of problem is: A. An optimization problem.

A problem can be defined as an issue or challenge encountered by an individual, which typically requires a solution.

Basically, a problem is considered to either be simple or complex, depending on the individual, parameters, and factors that are involved.

Generally, there are four (4) main kinds of problem and these include:

An undecidable problem.A decision problem.An efficiency problem.An optimization problem.

An optimization problem determines the best solution to a problem, from a list of feasible solutions.

Hence, an optimization problem can be used to pick a collection of locations that are likely to minimize the distance anyone needs to walk, so as to get to at least one bus stop.

Read more: https://brainly.com/question/22828534

The image shows a sample group contract.

This group contract is important because it:

A) holds everyone accountable for their part in the project

B) summarizes expectations for the conduct of the group

C) discusses how adjustments to the schedule can be
made

D) assigns a time frame for each step to be completed

Answers

Answer: c

Explanation:I done this before;DDD

Answer:

Its A

Explanation:

Sorry the other guy is wrong

what aspects of your life are most influenced by media and technology​

Answers

Answer:

Everyday life

Explanation:

Television

office work (computers )

Music

video games

ware house work uses technology

work from home jobs use technology

cellular towers

What can you do with python on a Chromebook

I am on a Chromebook and lately I have been leaning python on my PC at home, I had saw a video on how you could make python bots but that was on window OS and i am just asking if there is any thing cool i could be doing on my Chromebook and if possible only need a google chrome tab to work..

Answers

A Chromebook runs ChromeOS as its operating system and historically running anything other than a web app–such as Python–was challenging. However, that is no longer the case! You can now run Linux apps on ChromeOS which opens the door to using MiniConda to install Python 3.

Which of the following is a category of authentication tools. A something you have B something u see c something you hear d something you want

Answers

Answer:

Explanation:

Something you have.

Answer:

something you have

Explanation:

Let's review. What can be stored in a
variable? Why is using a meaningful
name for the variable important?

Answers

Answer:

In this lesson students work with partners to investigate several versions of the "Thermostat App" to understand how variables store and update information. To begin, students examine a version of the app where the temperature displayed changes each time a button is clicked. The next two versions of the app demonstrate how variables can store strings. Students learn about the patterns they are observing, specifically "Counter Pattern with Event" and "Variables with String Concatenation Pattern". To conclude the lesson, students review and discuss the programming patterns that they will make use of in the programs they write.

Explanation:

basta isagot mo

PLEASE HELP ASAP!!!!!!!!

Which option describes wearable technology? A. the incorporation of technology into objects we use regularly B. rugged technology that can withstand the elements without much damage C. computing systems that derive energy from the user's biological processes D. mobile technology that is extremely portable E. extremely small and powerful computing systems

Answers

Answer:

A

Explanation:

Things such as watches and clothes are common items which technology is incorporated to. This includes things implanted in the body. These are all wearble technologies.

An array is another name for a list.

True or false. With explanation.

Answers

Answer:

True

Explanation:

An array could state a particular or indefinite number of items in order. The word is also synonymous to list

Answer:

True

Explanation:

What should a web page designer consider when choosing between fixed positioning and absolute positioning?

Answers

Answer:

The answer is C I think.

Explanation:

What a web page designer should consider when choosing between fixed positioning and absolute positioning is that ;

the web page designer should know if the page can be found easily.

Since fixed positioning is relative to the browser window and  absolute positioning on the other hand  is been placed on specific place on a web page, then the web page designer should know if the page can be found easily.

Therefore, fixed positioning is relative to the browser window.

Learn more about positioning at;

https://brainly.com/question/15683939

Which computers were the first PCs with a GUI
MS-DOS
Linux
Windows
Mac

Answers

Answer:

The first computer with a GUI were linux, microsoft and apple.

Explanation:

I think this is right. Hope it helped <3

Answer:

I think it's "Mac"

Explanation:

Sorry if it was wrong

A secure website has https instead of http in web address true or false

Answers

Answer:

True

Explanation:

Beacuse security is s

The answer to the question is true

While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change.

Which feature should Angela use?

Track Changes
email
Comments
Save File

Answers

Answer:

i think it's comments

Not too sure

While Angela is making modifications to Katie’s Word document, the feature that Katie should use is comments. The correct option is c.

What is a Word document?

Microsoft Office is thought of as including Microsoft Word. Word, PowerPoint, Excel, Outlook, and a number of other programs are included in the Office suite of Microsoft tools.

These may be used on Windows or macOS and are suitable for both personal and professional use. They are not the same thing; Microsoft Word is merely one of such app.

A comment is a section or tool that can be used by the editor of the Word document. Comments can be added to correct the document and to give information that can be specified, and comments can be removed.

Therefore, the correct option is c. Comments.

To learn more about Word documents, refer to the below link:

https://brainly.com/question/26695071

#SPJ5

Which team member on a project typically has a skill for creating visual interest?

Designer
Engineer
Programmer
Writer

Answers

Answer:

designer

Explanation:i took it and got it right

Which statement will remove 12:'uno' from the dictionary?

games = {8:'scrabble', 10:'xbox', 12:'uno'}

games.remove()

games.pop(12)

games.pop()

games.remove(12)

Answers

Answer: games.pop(12)

Explanation:

In a dictionary sequence, .pop() alone does not work as the variable needs to be defined. Adding 12 allows Python to identify this variable. .remove() does not work with or without a variable.

Answer:

games.pop(12)

Explanation:

Question # 6
Multiple Choice
The of a variable is determined by which parts of a program can view and change its value.
O influence
O magnitude
O scope
Orange

Answers

Answer:

Scope.

Explanation:

In programming, the scope could be static, private or public and in those, defines the scope of a specific variable.

Ex.

public int x = 0; // Can be seen when called within a whole class and outside of a class/ function.

private int y = 0; // Can be seen only within the class its defined in.

static pub/priv int z = 0; // Uncangeable variable that can be defined in both class and external class, depending on the two prior scopes defined after.

int aa = 0; // Defaults to private.

Answer:

the answer is scope, for me it's D but they tend to change.

Explanation:

WILL GIVE BRAINLIEST!!!!!
This law of Sir Isaac Newton is what allows the spacecraft to lift off.

First Law

Second Law

Third Law

Answers

Third law :) Hope this helped you

Answer:

Third law

Explanation:

Third law allows the spacecraft to lift off.

Please Help. Which of the following statements about wide area networks are true? Select 3 options.


A. typically uses Eethernet and wireless routers to connect devices

B. connects devices in a large geographic area

C. is usually managed by a single business

D. may be controlled by multiple entities

E. connections usually occur through a public network

Answers

Answer:

B, D, E

Explanation:

The public Internet is largest WAN in the world.

A LAN (Local Area Network) typically uses Ethernet and Wireless Routers to connect devices.

A single business would not usually manage a WAN because this would create a monopoly, which is why competition is intentionally created between Internet Service Providers (ISPs), though sometimes a single business could manage a WAN via MPLS, etc.

Answer:

- connects devices in a large geographic area

- may be controlled by multiple entities

- connections usually occur through a public network

Explanation:

A wide area network (WAN) connects devices across a broader area like a city. It can provide connections across multiple countries. A wide area network may be managed and controlled by multiple entities. LANs connect to WANs to create a network of networks. The internet is considered the largest WAN.

(Confirmed on EDGE)

I hope this helped!

Good luck <3

Daniel is writing about emergency steps to take if a fire breaks out in school. Which organizational aid would be
most useful?
O a sequence chart
O a timeline
a Venn diagram
O a web diagram

Answers

Answer:

sequence chart

Explanation:

Answer:

a sequence chart

Explanation:

i took the test

Write a program to find the product of 3 numbers

Answers

Answer:

#include<iostream>

using namespace std;

int main()

{

   int a,b,c;

   cout<<"enter the value of a:";

   cin>>a;

   cout<<"enter the value of b:";

   cin>>b;

   cout<<"enter the value of c:";

   cin>>c;

   cout<<"product is:"<<(a*b*c);

   return 0;

}

Explanation:

The following codes have been written using Python.

x = int(input("Enter a number: "))

y = int(input("Enter a number: "))

z = int(input("Enter a number: "))

p = x*y*z

print(p, "is the product of", x, y, "and", str(z)+ ".")

Hope it helps. :)

mha ship what yo fave

Answers

Answer:

umm the first one I think..? lol

Answer:

both of them are my fav

Explanation:

Write a function called min that returns the minimum of the two numbers passed in as parameters.

Note: Be sure to include comments for all functions that you use or create.

For example, if you made a call like

x = min(10, 14)
x should have the value 10.

For your program, you need to define the function and call it and print out the result like this:

x = min(10, 14)
print("The min is " + str(x))

min(1,2);
min(9000,9001);

it is in python

Answers

def min(x,y):

   smallest = x

   if y < smallest:

       smallest = y

   return smallest

x = min(2,1)

print("The min is "+str(x))

Although I wouldn't recommend using the name min for a function because min is the name of an existing function. Best of luck.

The function is an illustration of conditional statements.

Conditional statements are statements whose execution depends on their truth values.

The function in Python, where comments are used to explain each line is as follows:

#This defines the function

def min(num1,num2):

#This initializes minVal

  minVal = num2

#If num1 is less than num2, then

  if num1 < num2:

#minVal equals num1

      minVal = num1

#This returns the smaller value

  return minVal

At the end of the program, the smaller value is returned to the main

Read more about similar programs at:

https://brainly.com/question/6973180

Catherine purchased dried herbs from the grocery store. Which structure would she use if wanted to create a mixture of powdered herbs by pounding them repeatedly using a mortar and pestle?

A.

looping structure

B.

selection structure

C.

sequence structure

D.

conditional structure

Answers

Answer: C. sequence structure

Explanation:

Catherine would use the sequence structure to achieve her results of powdered herb after pounding the herbs.

In a sequence structure, an action, or event, tends to lead to the next action in an order which has been predetermined. The sequence can contain any number of actions, but no actions can or must be skipped in the sequence.

This means she has to go through the pounding process to achieve the powdered state.

Answer:

A. Looping structure

Explanation:

I just took the test

2. List at least three signal words the professor uses in the video. How did he use the signal

words?

Answers

Answer:

cherry

van

red

George

gold

what is the output of this program ? Assume the user enters 3,6 and 11​

Answers

Answer:

C++

Explanation:

C++ Standards

C++ is standardized as ISO/IEC 14882. Currently, there are two versions:

C++98 (ISO/IEC 14882:1998): First standard version of C++.

C++03 (ISO/IEC 14882:2003): minor "bug-fix" to C++98 with no change to the language. Commonly refer to as C++98/C++03 or First C++ standard.

C++11 (ISO/IEC 14882:2011): Second standard version of C++. Informally called C++0x, as it was expected to finalize in 200x but was not released until 2011. It adds some new features to the language; more significantly, it greatly extends the C++ standard library and standard template library (STL).

C++14: Infomally called C++1y, is a small extension to C++11, with bug fixes and small improvement.

C++17: informally called C++1z.

C++2a: the next planned standard in 2020.

C++ Features

C++ is C. C++ supports (almost) all the features of C. Like C, C++ allows programmers to manage the memory directly, so as to develop efficient programs.

C++ is OO. C++ enhances the procedural-oriented C language with the object-oriented extension. The OO extension facilitates design, reuse and maintenance for complex software.

Template C++. C++ introduces generic programming, via the so-called template. You can apply the same algorithm to different data types.

STL. C++ provides a huge set of reusable standard libraries, in particular, the Standard Template Library (STL).

C++ Strength and Pitfall

C++ is a powerful language for high-performance applications, including writing operating systems and their subsystems, games and animation. C++ is also a complex and difficult programming language, which is really not meant for dummies. For example, to effectively use the C++ Standard Template Library (STL), you need to understand these difficult concepts: pointers, references, operator overloading and template, on top of the object-oriented programming concepts such as classes and objects, inheritance and polymorphism; and the traditional constructs such as decision and loop. C++ is performance centric. The C++ compiler does not issue warning/error message for many obvious programming mistakes, undefined and unspecified behaviors, such as array index out of range, using an uninitialized variable, etc, due to the focus on performance and efficiency rather than the ease of use - it assumes that those who choose to program in C++ are not dummies.

HELP ME PLSSSS
Why are peripherals added to computers????
15 points!

Answers

A piece of computer hardware that is added to a computer in order to expand its abilities. ... Subsystem that transfers data between computer components inside a computer or between computers. Unlike a point-to-point connection, it can logically connect several peripherals over the same set of wires.

Answer:

Expand their capabilities

Explanation:

Create a program that draws a rectangle whenever you click the mouse. The rectangle should have a width of 30 and a height of 50 and be centered at the place where the user clicks. Remember, the position of a rectangle is the top left corner. To place the rectangle at the center of the click, you will need to adjust the position.

Answers

Answer:

RECT_HEIGHT = 50

RECT_WIDTH = 30

rect = Rectangle(50,30)

       

# random.choice returns a random value from the COLORS

# function will draw a rectangle at x, y

def draw_rect(x, y):

   rectangle = Rect(50, 30)

   rect.set_position(x, y)

   rect.set_color(Color.green)

   add(rect)

# Link to the mouse click event

   add_mouse_click_handler(draw_rect)

Explanation: Hope this works for you.

ASAP in the middle of this quiz Which of the following arguments might convince a local school board of the need to train upper elementary school students in IT practices?


A As technology continues to advance rapidly, the need for IT professionals grows, providing more opportunities for employment of individuals skilled and experienced in the field of IT.

B Brain research shows that elementary students are better able to understand complex procedures; therefore, upper elementary students are more likely to understand the principles of IT than high school or college students.

C School computers break down often because of student use; therefore, the students should be responsible for fixing them.

D Computers are the wave of the future; therefore, elementary students should have a complete understanding of how they function.

Answers

Answer:

A.

Explanation:

Answer D seems too simplistic, and the question specifically mentions IT practices.

Question B doesn't seem right - college and high school students would likely be able to understand the principles as much.

Question C wouldn't be a good argument for a school board, and there's not a lot of evidence that backs it up.

Therefore, A seems to be the best choice here.

Hope this helps!

The binary number represented by the voltage graph below is

Answers

Answer:

4

Explanation:

Answer: 11010100

here ya go :)

Other Questions
free brainlyiWhich of the following is true? (1 point)1) |6| < 52) |6| < |5|3) |5| < |6|4) |5| < 6 The variables x and y are related proportionally. When x = 2,y = 5. Find y when x = 26.When x = 10 , y = The highest temperature in Fairbanks Alaska was 15.7 degrees Fahrenheit one day that night the temperature fell 38.4 degrees what was the lowest temperature for the night? I give you some points if you answer my question The trunk of a elephant may extend up to 2.2 m. It acts much like an organ pipe only open at one end when the elephant blows air through it. 1) Calculate the fundamental frequency of the sound the elephant can create with its trunk.2) If the elephant blows even harder, the next harmonic may be sounded. What is the frequency of the first overtone? Suppose the spark plug on a heat engine is not functioning properly which statement best explains how this will affect the engine? All of the following are characteristics of a hero or heroine except:Special or dangerous upbringingMakes a significant journeyOvercomes great dangerMaster of all weapons I WILL MARK YOU BRAINLIEST IF YOU EXPLAIN TO ME HOW TO DO IT List two reasons why Mansa Musa traveled to Mecca. What excuses/reasons for being absent for 3 days straights in school ( I dont wanna go bcs we have presentation I havent done it what to do) Write the HTML for a paragraph that uses inline styles to configure the background color of green and the text color of white. Estimate 0.00001377 as the product of a single digit number times a power of 10. Read this sententence from Selena's draft. What type of word is missing?Next we saw some sculptures and some ______.A. verbB. adjectiveC. nounD. conjunction A group of people within a community that the campaign is specifically trying to get to vote for their candidate is known as a __________ group.A.fundraisingB.nominationC.volunteerD.target So I already have the answer and people said it was c and b but I did the edjunity and it was d I need help answering this question Read the excerpt from Birches by Robert Frost.When I see birches bend to left and right Across the line of straighter darker trees, I like to think some boys been swinging them. But swinging doesnt bend them down to stay. Ice-storms do that. Often you must have seen themLoaded with ice a sunny winter morning After a rain. They click upon themselves As the breeze rises, and turn many-colored As the stir cracks and crazes their enamel. Soon the suns warmth makes them shed crystal shells Shattering and avalanching on the snow-crust Such heaps of broken glass to sweep away Youd think the inner dome of heaven had fallen.What is the best description of the theme of this excerpt?The sun is more powerful than ice and snow.Birches are destroyed by both people and nature.The sun has a wondrous effect on icy birch branches.Ice storms are natures most powerful force. Consider the reflexive response a child might have to touching a hot stove-pullingtheir hand away from it before they even have time to understand that touching itis hurting them. Describe this reflex arc in terms of how it processes along the path.Your description should cover the following concepts: Afferent neuronInterneuron Efferent neuron Effector Stimulus Receptor neurotransmitterAlso explain why it's sometimes important to have a reflex pathway like this asopposed to a more intellectual measured process. The sum of three consecutive intgers is 72 find the smallest integer What do you call the set of points after you apply the transformation? Which line is parallel to the graph of the line y=23x5?