Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

************NEEDS TO BE IN JAVA 1.4.2!!! NO SCANNER OR PRINTF PLEASE!!!!!!!*****

ID: 3584262 • Letter: #

Question

************NEEDS TO BE IN JAVA 1.4.2!!! NO SCANNER OR PRINTF PLEASE!!!!!!!********************* ****************WILL RATE 5 STARS FOR WORKING PROGRAM********************** It's time for the Java Olympics, the biggest java extravaganza in Java Town, with not 1, but 2 Java events! Who will win gold? It could be you! Event 1: Math Functions Write a program that simulates the tossing of two dice. Toss the die, display what each dice displays and display the total of the two die. Have this program continue until a 7 or 11 is the total roll. Event 2: String Functions Ask the user to input two strings. Display the strings in alphabetical order. Calculate and display the number of characters in the two words. Next convert the first string to all uppercase and the second string to all lowercase. Display the resulting strings. ***The Bonus Event: Ask the user to input a sentence. Count the number of spaces in the sentence to determine the number of words entered. Output the number of characters in the sentence, the number of words in the sentence and the average number of characters per word.

Explanation / Answer

Yes i will win