For this assignment, it will consist of several parts that will give you the chance to create Lists, work with methods, and build loops.
You will create a program that will as the user to enter in and store as many vacation locations as they would like and then output this back to them.
Get the locations from the user
Greet the user and explain the purpose of the program. Create a List designed to hold user-entered locations. (It should start empty).
Ask the user to enter destinations they would like to visit. Validate the input for blank input and store user input into the list.
Ask if the user would like to enter another location with a "yes or no" question. Validate that the answer is not blank and that they entered in a Yes or No only. After you validate you will need another loop that runs as long as the user types in "yes" and within that loop, you will have to prompt the user for the next location. This should keep looping until the user enters "no." This will fill our list up with vacation locations.
You will then need to create a method to send this list to.
Create a method
Create a custom method that accepts the list through an argument/parameter. This method will output the total number of trips and list the locations. (It will output to the screen, no need to return anything from this method.)
Print out how many trips they want to take (assuming one for each destination) like so: "You will take X trips this year."
Then print the contents of the List passed in through the parameter and output the locations in a meaningful way. This loop should work for a list of any size.