Project #41932 - Java homework

TWO SMALL PROBLEMS

#1.

Palindrome emordnilaP

Objective:  Write a program that accepts a string and then determines whether or not it is a palindrome.

1. A palindrome is the a word or phrase that can be spelled both forwards and backwards
2. Racecar
3. Warts n straw
5. Taco cat
2. It ignores spaces
3. Letter are treated the same whether they are upper or lower cased.

Example Dialog:

Enter a word or phrase and I’ll tell you if it’s a palindrome.

Taco cat

Taco cat is a palindrome!

Done!

#2.

Odd Problem

it’s not matrix multiplication

Objective:

Write a program that creates a random two dimensional array of integers of size specified by the user.  Count the number of odd values in the array then determine the percentage of odd numbers compared to the entire array.  If most of them are odd say it’s an odd matrix otherwise it is not odd.

• First prompt the user to enter the matrix size
• Populate the matrix with random numbers from 0-9
• Go through and count the number of odd numbers in the matrix
• We will assume 0 is even
• Calculate the ratio of odd numbers to the entire matrix, and if it is above 50% then it is an odd matrix.  Otherwise it is not an odd matrix
• Print the matrix and whether or not it is odd or not

Example Dialog:

Let’s determine if a random matrix is odd or not

Enter in the length of that matrix

4

Enter in the width of the matrix

3

The matrix

3 1 4

5 4 3

7 2 0

9 9 4

Is mostly odd

Done!

 Subject Computer Due By (Pacific Time) 10/01/2014 11:30 pm
TutorRating
pallavi

Chat Now!

out of 1971 reviews
amosmm

Chat Now!

out of 766 reviews
PhyzKyd

Chat Now!

out of 1164 reviews
rajdeep77

Chat Now!

out of 721 reviews
sctys

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews
topnotcher

Chat Now!

out of 766 reviews
XXXIAO

Chat Now!

out of 680 reviews