Netbeans coding

5. Write a program that reads several strings from the keyboard and determines which is the longest. 6. A person starts out standing on the equator. They flip a coin. If it is heads, they move one meter to the north. If it is tails, they move one meter to the south. They keep doing this until they are one kilometer from the equator. Write a program that simulates this and determines how many flips they make before stopping. If you want to impress me, determine the average number of coin flips they need to go a kilometer. 7.Create a class that holds a list of names. This class should be able to read the names from a file and write them to a file. The class should have methods that get the size of the list and access a name at a given index. 8. Add a method to the name list class that returns the index of a given name and write another method that sorts the list. 9. Write a program that does something interesting or useful with arrays.