Please Help! (Language= Java) Beginners Comp. Science
Assignment Details=

Create a class called Palindromes, which will determine if a user’s entry is a palindrome. A
palindrome is a word or phrase that reads the same backwards or forwards. See the examples.
A Santa at NASA My gym taco cat kayak NOW I WON race car
Your program will ignore spaces and ignore case when determining if a string is a palindrome.
Use the String method replace to remove the spaces. If it is a palindrome, output
PALINDROME, or else output NOT PALINDROME.
Additional requirements:
 Add an infinite loop with a sentinel-trigger break test (allowing them to input multiple
attempts). You may decide on its command word or exit-condition.
 As below, make sure a spacer line exists between each run of the program
Here are two sample runs of the program.
Enter a word or phrase: Noon
PALINDROME
Enter a word or phrase: bookkeeper
NOT PALINDROME

Answers

Answer 1

Answer:

import java.util.Scanner;

class Main {

 public static void main(String[] args) {

   test("A Santa at NASA");

   test("My gym");

   test("taco cat");

   test("kayak");

   test("NOW I WON");

   test("race car");

   test("bookkeeper");

   Scanner scanner = new Scanner(System.in);

   

   while(true) {

     System.out.print("Enter a word or phrase: ");

     String line = scanner.nextLine();

     if (line.equals("exit")) break;

     if (Palindromes.isPalindrome(line)) {

       System.out.println("PALINDROME");

     } else {

       System.out.println("NOT PALINDROME");

     }

   }

   scanner.close();

 }

 public static void test(String s) {

   System.out.printf("'%s' is %sa palindrome\n", s, Palindromes.isPalindrome(s) ? "" : "not ");

 }

}

class Palindromes {

 static boolean isPalindrome(String s) {

   s = s.replaceAll("\\s","").toLowerCase();

   return s.equals(reverseString(s));

 }

   public static String reverseString(String str){  

     StringBuilder sb = new StringBuilder(str);  

     sb.reverse();  

     return sb.toString();  

 }  

}

Explanation:

I chose to use a string reverse routine. This is slightly less efficient than iterating the string from both ends, but performance is less important than readability here.

The stop word is exit.


Related Questions

Make the correct match.
1. Supports multiple coding of raw data
AVI
2. Standard audio format supported by Windows PCs
RA
3. Standard audio format used by Sun, Unix, and Java
WAV
4. Most popular format when downloading music
MP3
5. Real audio
AU
6. Standard audio file for Macs
AIFF

Answers

Answer:

1. AVI

2. WAV

3. AU

4. MP3

5. RA

6. AIFF

Explanation:

A file type can be defined as the standard used to store digital data such as pictures, texts, videos, and audios. They all have unique file extension which determines the type of software program (application) to be used for opening a particular file and accessing its data e.g pictures (jpeg, png), texts (txt, docx, rtf), videos (mp4, 3gp, avi), audios (mp3, acc).

Sometimes, computer users make the mistake of opening files with the wrong software application or program, this often leads to an error due to the incompatibility of the software application with the particular file.

For audio file types, these are some of the commonly used file extensions;

1. AVI: Supports multiple coding of raw data. AVI is an acronym for audio video interleave and it was developed by Microsoft Inc.

2. WAV: Standard audio format supported by Windows PCs. It is an acronym for Waveform Audio File Format developed by Microsoft inc. and IBM.

3. AU: Standard audio format used by Sun, Unix, and Java.

4. MP3: Most popular format when downloading music.

5. RA: Real audio.

6. AIFF: Standard audio file for Macs

Discuss the core technologies and provide examples of where they exist in society. Discuss how the core technologies are part of a larger system

Answers

Answer:

Part A

The core technologies are the technologies which make other technologies work or perform their desired tasks

Examples of core technologies and where they exist are;

Thermal technology, which is the technology involving the work production, storage, and transfer using heat energy, exists in our refrigerators, heat engine, and boilers

Electronic technology is the technology that involves the control of the flow of electrons in a circuit through rectification and amplification provided by active devices. Electronic technology can be located in a radio receiver, printed circuit boards (PCB), and mobile phone

Fluid technology is the use of fluid to transmit a force, provide mechanical advantage, and generate power. Fluid technologies can be found in brakes, automatic transmission systems, landing gears, servomechanisms, and pneumatic tools such as syringes

Part B

The core technologies are the subsystems within the larger systems that make the larger systems to work

The thermal technology in a refrigerator makes use of the transfer of heat from a cold region, inside the fridge, to region of higher temperature, by the  use of heat exchange and the properties of the coolant when subjected to different amount of compression and expansion

The electronic technologies make it possible to make portable electronic devises such as the mobile phones by the use miniaturized circuit boards that perform several functions and are integrated into a small piece of semiconductor material

Fluid technologies in landing gears provide reliable activation of the undercarriage at all times in almost all conditions such that the landing gears can be activated mechanically without the need for other source of energy

Explanation:

Core technologies includes biotechnology, electrical, electronics, fluid, material, mechanical, and others.

What are core technologies?

Core Technologies are known to be the framework of technology systems. The major Core Technologies includes:

Mechanical StructuralMaterials, etc.

They are also called "building blocks" of all technology system as without time, technology would not be existing today.

Learn more about Core technologies from

https://brainly.com/question/14595106

13. Place where names, addresses and email information
is stored

Answers

Answer in ur email

Explanation:

The company generates a lot of revenue and is rapidly growing. They're expecting to hire hundreds of new employees in the next year or so, and you may not be able to scale your operations at the pace you're working.

Answers

Answer:

The most appropriate way to deal with the situation presented above is to acquire more space at the current office site at additional rent beforehand.

Explanation:

The Scaling of a revenue-generating business is a crucial task in which a lot of pre-planning and thinking is required.

In order to scale the business in the next year, the planning of it is to be carried out at the moment and proper necessary arrangements are ensured. These steps could be one from:

Looking for bigger spaces for renting for a full shift of the operationsLooking for a site office for an additional officeAcquiring more space in the current office site.

This process would result in acquiring a bigger place beforehand but in order to mitigate the risk, try to keep the place in view by providing them a bare minimum advance for the additional units.

GUYS!
YOU GOTTA HELP ME CAUSE IM FLIPPIN OUT

OK SO EARLIER TODAY MY LAPTOP WASNT WORKING SO MY DAD SAID I COULD USE HIS

I HAD TO LOG INTO MY WORD ACC TO DO WORK

AND IT WOULDNT LET ME IN HIS SO I USED MINE

MY MOM HAS SAFTEY SETTINGS ON MY OUTLOOK ACCS

BUT I DIDNT KNOW IT WOULD LOG INTO EVERYTHING I THOUGHT IT WOULD ONLY LOG INTO WORD

S O O IM TRYING TO LOG OUT OF MY ACC

BECAUSE MY DAD IS VV PARTICULAR ABOUT HIS COMPUTER

HES GONNA BE MAD

SO

MY QUESTION IS

DOES ANYONE KNOW HOW TO LOG OUT OF LIKE MICROSOFT ACCS

Answers

Attached is the answer, please look.

Select the correct answer.
Which principle of animation is prominent in this picture?
A.staging
B.arcs
C.anticipation
D. timing

Answers

The principle of animation reflected in the image is the arcs principle.

What is animation?

Animation refers to the action of recreating actions and movements by using drawings or models.

What are the principles of animation?Animation is regulated by specific principles, some of them include:Anticipation: Showing the movement or position that anticipates an action.Timing: Making an action fast or slow by using a specific number of frames.Staging: Using specific elements to stage one action and avoiding unnecessary elements.Arcs: Showing the natural movement of a specific action.

Based on this, the principle used in the image is the arcs because it emphasizes the natural curve or natural movement of someone playing golf.

Learn more about draw in: https://brainly.com/question/4853831

Answer:

B. arcs

Explanation:

differentiate between tabular and column form layout​

Answers

In tabular form the data is displayed in a table layout following a continuous series of records. In this almost all the records are displayed in a single layout. While in columnar form the data is displayed one record at a time.

What is strFirst? def username (strFirst, strLast): return strFirst + strLast[0] answer = username ('Joann', 'Doe') print (answer) strFirst is a A. Parameter B. Return value C. Function

Answers

The answer is B as in Boy

One of the disadvantages of cable technology is that: while it works well for television signals, it is ineffective for data transmissions required by the Internet. while it works well for television signals, it is ineffective for data transmissions required by the Internet. none of the available options are true. none of the available options are true. it is incompatible with most modern communication systems. it is incompatible with most modern communication systems. systems used by many providers require customers to share bandwidth with neighbors. systems used by many providers require customers to share bandwidth with neighbors.

Answers

Answer:

systems used by many providers require customers to share bandwidth with neighbors

Explanation:

One of the disadvantages of cable technology is that systems used by many providers require customers to share bandwidth with neighbors. This ultimately causes many problems since cables would need to be extended to reach every single user that will be sharing the bandwidth. This would mean cables all over the place. Also, it is very difficult to limit the bandwidth per person, meaning that if anyone is using up all of the bandwidth through the cable, the rest of the individuals connected would not have the bandwidth that they need or are paying for.

1. What is used to change the appearance of a cell's value based on parameters set by the user?

Answers

conditional formatting

You should contact your references _____ a job interview.


only if the interviewer asks for your references

before and after

before

after

Answers

Answer:

My research suggests that it is before and after.

You should contact your references before and after a job interview.

What is Interview?

A planned interaction in which one party asks questions and the other responds is known as an interview. A one-on-one chat between an interviewer and an interviewee is referred to as a "interview" in everyday speech.

The interviewee answers the interviewer's questions by typically supplying information. Other audiences may utilize or receive that information right away or later.

This characteristic is common to many different types of interviews; even though there may not be any other people present during a job interview or an interview with a witness to an occurrence, the answers will still be given to other people later on in the hiring or investigative process.

Therefore, You should contact your references before and after a job interview.

To learn more about Interview, refer to the link:

https://brainly.com/question/13073622

#SPJ2

what does XML do with a data wrapped in the tags?

XML is a hardware- and software-independent tool used to carry information and developed to describe (BLANK)
______________
This isn't a multiple choice question, so I have no clue what the answer would even be. Please help if you can and if you don't know please don't give false information.​

Answers

XML is a hardware- and software-independent tool used to carry information and developed to describe how XML Simplifies Things.

What does XML Simplifies Things about?

XML  is known to be a thing that helps one to stores data in plain text format. This is said to give  a kind of software- and hardware-independent way of storing, transporting, and sharing data in a network.

XML is known to also makes it easy for a person to widen or upgrade to a kind of new operating systems, new applications, etc., without the person losing their data.

Learn more about XML  from

https://brainly.com/question/11605816

Answer: data

Explanation:trust me, I do proper tutorials.

what is the main reason for adding somebody into the BCC list for an email?​

Answers

Answer:

protecting email address privacy

Explanation:

for securing and privacy reasons and it is for the best

hello everyone! can anybody help me? i need help with computing.
what is a pseucode?
please answer me ​

Answers

Answer:

a pseu code is a is an artificial and informal language that helps programmers develop algorithms.

Explanation:

2. Which of the following is not one of the guidelines for using instant messaging?A.You can use in place of all face-to-face communication.
B.Keep messages short.
C.Never text or send an instant message when you are angry.
D.Use it for casual conversations.​

Answers

Answer:

A. You can use in place of all face-to-face communication.

Explanation:

Hope this helps

Note that common skills are listed toward the top and less common skills are listed toward the bottom. According to O*NET, what are some common skills needed by Accountants? Select four options

mathematics
reading comprehension
equipment maintenance
quality control analysis
active listening
writing

Answers

Answer:

I. Mathematics.

II. Reading comprehension

III. Active listening

IV. Writing

Explanation:

O*NET is the short for Occupational Information Network and it is a comprehensive online database that is uniquely designed to provide information about job requirements, staff competencies, work styles, abilities, skills and other resources. Thus, O*NET is the primary source of occupational information for the private and public sector of the United States of America. Also, it helps to identify and develop the work styles, skills, activities and abilities of various occupations of the American workforce.

According to O*NET, some common skills needed by Accountants include the following;

I. Mathematics: an accountant is required to have a good knowledge of different mathematical concepts such as arithmetic, calculus, algebra, statistics, etc., as well as their application to the field of accounting.

II. Reading comprehension: he or she should be able to read and understand the informations contained in all work-related documents.

III. Active listening: accountants are required to pay adequate attention to the informations that are given by the customers without interjections.

IV. Writing: they should be able to compose well-written and clear textual informations about work-related activities.

Answer:

I. Mathematics.

II. Reading comprehension

III. Active listening

IV. Writing

Explanation:

In this class, it is very common for your computer screen to look like this. What is this?​

Answers

theres no Picture???

Explain what Fahd did wrong in the scenario below. Fahd is running ten programs at once on his laptop when it suddenly freezes up. To fix this problem, Fahd buys a new battery for his laptop.

Answers

Answer:

Well first off. if the laptop froze that doesn't mean the battery is dead to the point where a simple rest of the laptop wouldn't work out.

Your aunt owns a store and hired you to analyze the customers. You recorded the estimated ages of customers who shopped in the store and whether they made a purchase. Some of your data values are followed. What types of analysis could you do with this data? Select 4 options.

Answers

Answer:

-percentage of customers who made a purchase

-minimum age

-average age

-maximum age

Percentage of customers who made a purchase, minimum age, average age and maximum age are the types of analysis could you do with this data. Hence, option A, B, C and E are correct.

What is data values?

A data value is the material that fills the space of a record. For instance, one of the database's numerous data fields might contain a number that indicates the weight of a certain integer.

Data, such as statistics, phone numbers, or inventory counts, are undoubtedly pieces of information that a person would understand as numbers.

Data provides useful information that enhances business decisions. This information is the result of an effective data analytics strategy. Businesses may create a data culture far more easily because of the monetary worth of data.

Thus, option A, B, C and E are correct.

For more information about data values, click here:

https://brainly.com/question/16612044

#SPJ2

I’ll mark brainliest, thanks

Answers

Answer:

if that is a tutorial, than just hit submit, the teacher doesn't see it.

Explanation:

i do online schooling on the same website

\Yeah man, what the last guy said. On that website, teachers can't see tutorials so you can just submit it blank if you want. :)

2ND LAST QUESTION

the purpose of the ___________ element is to group together a set of one or more [h1] element so that theyre treated as a single heading

a. header
b. hgroup
c. h1group
d. group

Answers

Answer:

B

Explanation:

I GOT A 65% LAST TIME AND IM DOING RETAKE! PLEASE DONT FAIL ME THIS TIME

which information will help you figure out how often your website should be updated

a. cost of updates
b. time for updates
c. visitor frequency
d. resources to update it

Answers

Answer:

Explanation: c vecause am pro

I say I’m between B and D

What should I watch on Netflix (shows for a 14 year old) ?

Answers

Answer:

The flash

Explanation:

Answer:

Im not a big horse fan but loved this show its called free rein

Explanation:

loved itttttt!

list the first prime minister of St Vincent and the grenadines​

Answers

Robert Milton Cato (June 3rd, 1915 - February 10, 1997)

What do fair use and copyright laws help you understand ?

Answers

Explanation:

we can understand about the systematic laws and surely we can be aware of such things also it promotes the correct use of our technology and innovations.

In its most general sense, a fair use is any copying of copyrighted material done for a limited and “transformative” purpose, such as to comment upon, criticize, or parody a copyrighted work. ... In other words, fair use is a defense against a claim of copyright infringement.

A company has a popular gaming platform running on AWS. The application is sensitive to latency because latency can impact the user experience and introduce unfair advantages to some players. The application is deployed in every AWS Region it runs on Amazon EC2 instances that are part of Auto Scaling groups configured behind Application Load Balancers (ALBs) A solutions architect needs to implement a mechanism to monitor the health of the application and redirect traffic to healthy endpoints.
Which solution meets these requirements?
A . Configure an accelerator in AWS Global Accelerator Add a listener for the port that the application listens on. and attach it to a Regional endpoint in each Region Add the ALB as the endpoint
B . Create an Amazon CloudFront distribution and specify the ALB as the origin server. Configure the cache behavior to use origin cache headers Use AWS Lambda functions to optimize the traffic
C . Create an Amazon CloudFront distribution and specify Amazon S3 as the origin server. Configure the cache behavior to use origin cache headers. Use AWS Lambda functions to optimize the traffic
D . Configure an Amazon DynamoDB database to serve as the data store for the application Create a DynamoDB Accelerator (DAX) cluster to act as the in-memory cache for DynamoDB hosting the application data.

Answers

Yetwywywywywywyyw would

HELPPPPPPPP


what helps users focus on the key messages that draw peoples attention to key areas of a site

a. site content
b. visual hierarchy
c. wireframe
d. group block

Answers

The answer is visual hierarchy :)
I believe the answer is B

Write a program that accepts an integer value called multiplier as user input. Create an array of integers with ARRAY_SIZE elements. This constant has been declared for you in main, and you should leave it in main. Set each array element to the value i*multiplier, where i is the element's index. Next create two functions, called PrintForward() and PrintBackward(), that each accept two parameters: (a) the array to print, (b) the size of the array. The PrintForward() function should print each integer in the array, beginning with index 0. The PrintBackward() function should print the array in reverse order, beginning with the last element in the array and concluding with the element at index 0. (Hint: for help passing an array as a function parameter, see zybooks section 6.23) As output, print the array once forward and once backward.

Answers

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

void PrintForward(int myarray[], int size){

   for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }

}

void PrintBackward(int myarray[], int size){

   for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }

}

int main(){

   const int ARRAY_SIZE = 12;

   int multiplier;

   cout<<"Multiplier: ";

   cin>>multiplier;

   int myarray [ARRAY_SIZE];

   for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }

   PrintForward(myarray,ARRAY_SIZE);

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

Explanation:

The PrintForward function begins here

void PrintForward(int myarray[], int size){

This iterates through the array in ascending order and print each array element

   for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }

}

The PrintBackward function begins here

void PrintBackward(int myarray[], int size){

This iterates through the array in descending order and print each array element

   for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }

}

The main begins here

int main(){

This declares and initializes the array size

   const int ARRAY_SIZE = 12;

This declares the multiplier as an integer

   int multiplier;

This gets input for the multiplier

   cout<<"Multiplier: ";    cin>>multiplier;

This declares the array

   int myarray [ARRAY_SIZE];

This iterates through the array and populate the array by i * multiplier

   for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }

This calls the PrintForward method

   PrintForward(myarray,ARRAY_SIZE);

This calls the PrintBackward method

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

In order to multitask, a computer must have two or more processors. True or False

Answers

Answer:

False

Explanation:

:) brainliest pls

Answer:

True

Explanation:

Which of the following is not an example of a source of information that contributes to the accumulation of big data

Answers

Answer:

Law enforcement officials request the driver's license history for a suspect they recently apprehended.

Explanation:

The option that doesn't cause accumulation of big data is that Law enforcement officials request the driver's license history for a suspect they recently apprehended.

What causes accumulation of data?

Data is an information that is processed by a computer and can be stored in the computer for future use or reference purposes.

The quantity of data processed by a computer depends on the volume of the raw data that is collected and prepared before processing takes place.

From the given options;

Law enforcement officials request the driver's license history for a suspect they recently apprehended. This is just the data of a single individual which can not cause big data accumulation.

Receivers in cell phones request position information from nearby cell phone towers, and this location information is communicated to cell phone companies. This involves more that one cell phone company therefore can cause accumulation of big data.

Search engine providers store all search terms entered by users. This can cause accumulation of data.

Hundreds of satellites stationed above the earth capture images of the earth’s surface. This can cause accumulation of data.

Therefore data from a single source cannot cause accumulation of big data.

Learn more about data processing here:

https://brainly.com/question/26642156

Other Questions
im not feeling to great today and i have to get done so can you help me out "Market Equilibrium" is...A. The quantity where no more buyers want to buy stockB. The price range where the quantity supplied equals the quantity demandedC. What happens when there are the same number of buyers and sellersD. Where the most trades are made What is the diameter of a circle if the circumference is approximately 47.12 ft? FREE POINTSS Find the equation of the line thatis parallel to y = 2x + 5 andcontains the point (2, -4).y = 2x + [?] A 14B 8C 11D 20I'm pose to simplify it to rent a certain meeting room, a college charges a reservation fee of $18 and an additional fee of $6 per hour. The chemistry club wants to spend at most $72 on renting the room. what are the possible numbers of hours the cemetery club could rent the meeting room? use t for the number of hours. write your answer as an inequality solved for t. Decide whether the integral is improper. [infinity] ln(x3) dx 0 Which of the following might you infer from this painting by Winslow Homer? Maria goes for a hike inside a cave. What types of rocks will she most likely see? I have the answer for this geometry question just how to I solve it. Quickest and correct and semi-long explanation gets brainliest and 100 points. HURRY PLEASE!!! is a negative number to the seventh power negative Hi I really need help Deena works at a customer service call center. She fields an average of 5 calls per hour. Employees are encouraged to field morethan 200 calls per week Deena has already fielded 75 calls this week.How many more hours, x, does Deena need to work this week to reach the weekly goal of fielded calls if she continutes to field anaverage of 5 calls per hour? Select the inequality that includes the fewest number of hours Deena can work this week and stillreach the weekly goal. The following information pertains to Sandhill Company. 1. Cash balance per books, August 31, $7,374. 2. Cash balance per bank, August 31, $7,338. 3. Outstanding checks, August 31, $708. 4. August bank service charge not recorded by the depositor $60. 5. Deposits in transit, August 31, $3,710. In addition, $3,026 collected for Sandhill Company in August by the bank through electronic funds transfer. The accounts receivable collection has not been recorded Sandhill Company.1. Prepare a bank reconciliation at August 31, 2022. (List items that increase balance as per bank & books first.) CULLUMBER COMPANY Bank Reconciliation 2. Journalize the adjusting entries at August 31 on the books of Cullumber Company. (Credit account titles are automatically indented when amount is entered. Do not indent manually.) Date Account Titles and Explanation Debit Credit July 31 (To record electronic funds transfer received by bank) July 31 (To record bank service charge) Which of the following is a limitation of the map of Hispanic population percentage?(A) The small size of urban counties in the eastern United States masks the significance of the Hispanicpopulation in most eastern cities.(B) Larger county sizes in the western United States mask the significance of the Hispanic population in mostwestem counties.(C) States with the largest total populations mask the significance of the Hispanic population in those states.(D) States with the smallest total populations mask the significance of the Hispanic population in those states.(E) The pattem shown is not different than the pattern of early Hispanic settlement during the en ofcolonization. Joshua created the following sequence. This sequence grows at a constant rate. Fill in the blanks with the missing terms of the sequence.13,A, 65,B Jemma is disillusioned because she worked really hard to make the fundraiser a success. She spent a lot of time on her own making decorations and selling tickets, even though she was only part-time. After the fundraiser, she found out that Elaine got the full-time job opening even though Jemma knows that Elaine didn't work nearly as hard as she did. Jemma vowed to find a new job and until then, not put in one extra minute that she wasn't getting paid for. Jemma's motivated by the _____ theory. What part of the plant is responsible for the way in which these nutrients are transported? if p and q vary inversely and p is 17 when q is 15, determine q when p is equal to 5 No scams. Show your work. write answer as a percent and round the nearest whole number if needed.