Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that asks the user for a sentence. Display the sentence backwards, letter by letter. Example: Enter a sentence: Mary had a

Write a program that asks the user for a sentence. Display the sentence backwards, letter by letter. Example: Write a program that creates an array of 5 strings (you can hard-code the string array or you can get the

Write a program that asks the user for a sentence. Display the sentence backwards, letter by letter. Example: Enter a sentence: Mary had a little lamb. Your sentence backwards: bmal elttila dah yraM Exercise 10.1.2 An array contains 5 strings. Write a program that creates the array (you can either hard-code the array or fill it with user inputs), then display the index of the String elements that contain the letter "e" in upper-case or lower-case. Exercise 10.1.3 A palindrome is a string that reads the same both forward and backward. Examples of palindromes are "radar", "31413", and "god a dog". Write a program that will evaluate a user-entered string and display whether or not the input was a palindrome. Write a program that creates an array of 5 strings (you can hard-code the string array or you can get the string values from user inputs). Write the code needed to determine if the array is sorted alphabetically or not, and display a message to the user telling them whether or not the array is sorted. Exercise 10.1.7 Write a program that asks the user to enter two strings representing an amount of time in the form hh:mm:ss. Then write the code that calculates the total number of seconds in that amount of time. Finally, calculate and display difference in seconds between the two times. For example: Enter a time in the form hh:mm:ss: 2:13:55 Enter another time in the form hh:mm:ss: 14:03:12 There is a difference of 42,557 seconds between 2:13:55 and 14:03:12 Exercise 10.1.8 Write a program that asks the user for a sentence, and then returns that string with the words backwards. For example: Enter a sentence: Mary had a little lamb. Your sentence backwards: lamb. little a had Mary

Step by Step Solution

3.38 Rating (160 Votes )

There are 3 Steps involved in it

Step: 1

class Employee all attributes of Employe... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java Concepts Late Objects

Authors: Cay S. Horstmann

3rd Edition

1119186714, 978-1119186717

More Books

Students also viewed these Programming questions