1) Write a guessing game program with just a simple main class. - Input an integer n from the user - Generate a random int between 1 and n - Input a guess, and print whether it's too low, too high, or correct - Repeat until the guess is correct 2) Write a main method that produces a triangle of numbers. - Input an integer n from the user. - Use a nested loop to print a pattern like the one below (which would be for n=5) 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 3) Write a main method that checks a sentence for two identical words in a row, the way Microsoft Word's (annoying) grammar check function does. - Input the number of words in the sentence - Input each word, one at a time, concatenating them into one big String - If a word matches the previous one, don't concatenate it, and don't count it in the sentence length. (So if I say there are 3 words and I type 2 identical words at first, I should have to type 2 more distinct words before the program ends.) - At the end, print the whole sentence out. 4) The following flow chart is an excellent example of a conditional diagram. Write a program that simulates this logic. Try to make it as clean as you possibly can (i.e. short, without repeated code, and easy to follow). If you come up with one that matches or outdoes mine, I'll buy you ice cream. YES ============================= NO +-----------|| Does the darn thing work? ||-----------+ | ============================= | V V +----------+ +---------+ +---------+ | DON'T | NO | Does | +--------+ YES | Did you | | MESS | +---| anyone |<------| YOU |<--------| mess | | WITH IT! | | | know? | | MORON! | | with it?| +----------+ | +---------+ +--------+ +---------+ | V | YES | NO | +------+ +-----------+ | | | HIDE | V V | | IT! | +--------+ +-----------+ | +------+ | YOU | YES | Will they | | | +------->| POOR |<------------| catch you?| | | | |BASTARD!| +-----------+ | | | |________| | NO | | | | | | | | V V | | | +---------------+ +-----------+ | | | NO | Can you blame | |DESTROY THE| | | +------| someone else? | | EVIDENCE! | | | +---------------+ +-----------+ | | | YES | | | v | | | ============================ | | +----> || N O || <---------+ +------------> || P R O B L E M || ============================