answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Crazy boy [7]
1 year ago
8

In Java please:

Computers and Technology
1 answer:
Nana76 [90]1 year ago
6 0

Answer:

See explaination

Explanation:

public class PalindromeChange {

public static void main(String[] args) {

System.out.println("mom to non palindrom word is: "+changTONonPalindrom("mom"));

System.out.println("mom to non palindrom word is: "+changTONonPalindrom("aaabbaaa"));

}

private static String changTONonPalindrom(String str)

{

int mid=str.length()/2;

boolean found=false;

char character=' ';

int i;

for(i=mid-1;i>=0;i--)

{

character = str.charAt(i);

if(character!='a')

{

found=true;

break;

}

}

if(!found)

{

for(i=mid+1;i<str.length();i++)

{

character = str.charAt(i);

if(character!='a')

{

found=true;

break;

}

}

}

// This gives the character 'a'

int ascii = (int) character;

ascii-=1;

str = str.substring(0, i) + (char)ascii+ str.substring(i + 1);

return str;

}

}

You might be interested in
Peter took a selfie in his room. He was a wearing a light blue shirt. But he failed to realize that that shirt would clash in co
Leto [7]

Answer:

A wand tool is to do that in an editing software.

7 0
1 year ago
Read 2 more answers
Sarah works in a coffee house where she is responsible for keying in customer orders. A customer orders snacks and coffee, but l
Maru [420]

Answer:

Stack

Explanation:

Stack is a linear data structure that follows a particular order in the way an operation is done or sequence a job is completed.

It uses either LIFO ( Last In, First Out) which is also known as first come first served sequence or FILO (First In, Last Out) sequence.

There are several real life examples of which we can use the example of replacing the snack items Sarah brought for the customer.

If Sarah used the LIFO method, it means she replaced the snack items first ontop of the already existing snack items that's why there is a mismatch.

5 0
1 year ago
Read 2 more answers
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the arr
Mashutka [201]

Answer:

weights = []

total = 0

max = 0

for i in range(5):

   weight = float(input("Enter weight " + str(i+1) + ": "))

   weights.append(weight)

   total += weights[i]

   if weights[i] > max:

       max = weights[i]

average = total / 5

print("Your entered: " + str(weights))

print("Total weight: " + str(total))

print("Average weight: " + str(average))

print("Max weight: " + str(max))

Explanation:

Initialize the variables

Create a for loop that iterates 5 times

Get the values from the user

Put them inside the array

Calculate the total by adding each value to the total

Calculate the max value by comparing each value

When the loop is done, find the average - divide the total by 5

Print the results

6 0
2 years ago
Another solution to minimize resonance is to ________ the bridge.
lakkis [162]
I believe the answer is d
7 0
2 years ago
Which of the following corresponds to the computer interface technology that uses icon, etc?
Aleksandr [31]

Answer:

D) GUI

Explanation:

GUI an acronym for Graphical user interface, is a type of user interface where a user interacts with a computer or an electronic device through the use of graphics. These graphics include icons, images, navigation bars etc.

GUIs use a combination of technologies and devices to create a layout that users can interact with and perform tasks on. This makes it easier for users who do have basic computer skills to utilize.

The most common combination of these elements is the windows, icons, menus and pointer paradigm (WIMP) . GUIs are used in mobile devices, gaming devices, smartphones, MP3 players etc.

6 0
1 year ago
Other questions:
  • how do you make a circuit so 1 switch will turn on/off all the lights(3 lights) and a second switch will change the lights from
    14·2 answers
  • The memory allocated for a float value is ____ bytes.
    9·1 answer
  • During which phase of web publishing would you use a text editor to enter codes that instruct the browser how to display webpage
    5·1 answer
  • The blue bar across the top of the screen informs you of the Screen Title, or what step you are on.
    5·1 answer
  • A company requires an Ethernet connection from the north end of its office building to the south end. The distance between conne
    8·1 answer
  • 14.28. Consider the relation R, which has attributes that hold schedules of courses and sections at a university; R = {Course_no
    7·1 answer
  • Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
    8·1 answer
  • Write a flowchart and C code for a program that does the following: Within main(), it asks for the user's annual income. Within
    12·1 answer
  • A laptop gets replaced if there's a hardware issue. Which stage of the hardware lifecycle does this scenario belong to?
    5·1 answer
  • Java Programming home &gt; 1.14: zylab training: Interleaved input/output Н zyBooks catalog Try submitting it for grading (click
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!