Ex. 1 ------ Write a program that will evaluate simple expressions such as 17 + 3 and 3.14159 * 4.7. The expressions are to be typed in by the user. The input always consists of a number, followed by an operator, followed by another number. The operators that are allowed are +, -, *, and /. You can read the numbers with readDouble() and the operator with readChar(). Your program should read an expression, print its value, read another expression, print its value, and so on. The program should end when the user enters 0 as the first number on the line. Example: >Enter the first number: 16.2 > Enter the operator: + >Enter the second number: 4 > The result is 20.2 >Enter the first number: 0 > The program is terminated. Bye Ex. 2 ------ Similar to Ex. 1, but now numbers are 1-digit integers (from 0 to 9) and the expression should be read as a whole, and print out the result. Example: >Enter an arithmetic expression: 3*7 > The result is 21 >Enter an arithmetic expression: 8/2 > The result is 4 >Enter an arithmetic expression: 0 > The program is terminated. Bye Ex. 3 ------ Similar to Ex. 2, but now numbers are any digit integers (for instance 256) and the expression should be read as a whole, and print out the result. Hint: Character.isDigit(char) tests if a char is one of the chars '0', '1', .. '9'. Integer.parseInt(string) converts a string to an int. >Enter an arithmetic expression: 31+44 > The result is 75 >Enter an arithmetic expression: 21-1 > The result is 20 >Enter an arithmetic expression: 0 > The program is terminated. Bye Ex. 4 ------ Using if statements, else if, and else statements, write a program that displays a different message depending on the age given. You can follow this template: Age Message less than 16 "You can't drive." 16 to 17 "You can drive but not vote." 18 to 24 "You can vote but not rent a car." 25 or older "You can do pretty much anything." Ex. 5 ----- Write an interactive quiz. It should ask the user three multiple-choice or true/false questions about something. It must keep track of how many they get right, and print out a "score" at the end. Example: Are you ready for a quiz? Y Okay, here it comes! Q1) What is the capital of Albania? 1) Sofia 2) Tirana 3) Budapest > 2 That's right! Q2) Can you store the value "dog" in a variable of type int? 1) yes 2) no > 1 Sorry, "dog" is a string. ints can only store numbers. Q3) What is the result of 6+4/2? 1) 5 2) 8 3) 4 > 2 That's correct! Overall, you got 2 out of 3 correct. Thanks for playing! Ex. 6 ----- Write a program that asks the user for a string and returns the the number of vowels in that string. Hint. You may want to use the method: s.indexOf(c) which returns -1 if character c is not in string s Example: > Enter a string: Musard >The string "Musard" contains 2 vowels. Ex. 7 ----- Write a program that asks for a positive integer until the uses enters one, and calculates the binary representation of that integer. Hint: Use the modulo operator % Example: > Enter a positive integer: -3 > Enter a positive integer: -88 > Enter a positive integer: -8 > The binary representation of 8 is 1000 Ex. 8 ----- Write a subroutine (function) that given an input string and returns true or false depending on whether or not that string is a palindrome. A palindrome is a sequence of characters which reads the same backward or forward. For instance, "abba" and "bob" are palindromes, while "aab" is not. Use the subroutine in the main method to check the words above. Ex. 9 ----- Use subroutines to administer the quiz from Ex. 5. There should be 3 subroutines to print out the questions and 3 subroutines to check the correctness of answers. Then use the subroutines in the main to implement the quiz.