Question: Programming Prompt: The following programming prompt should test your problem-solving skills and your programming abilities. All prompts can be completed by using the Java constructs

 Programming Prompt: The following programming prompt should test your problem-solving skills

Programming Prompt: The following programming prompt should test your problem-solving skills and your programming abilities. All prompts can be completed by using the Java constructs that have been discussed in class. All code should be demonstrated to the instructor/GA. Write a program that reads in a predetermined number of facts from the file random_facts.txt. The content should be stored in an array named factArray. Prompt the user with the question, "Would you like to see an additional fact? (y)". Upon entering an n for no, the program should end with "Goodbye!" WELCOME TO THE RANDOM FACT GENERATOR! Here is your first fact: 1. The king of hearts is the only king without a moustache. Would you like to see an additional fact? (y) y The newspaper serving Frostbite Falls, Minnesota, the home of Rocky and Bullwinkle, is the Picayune Intellegence. Would you like to see an additional fact? (y)y It took Leo Tolstoy six years to write "War & Peace". Would you like to see an additional fact? (y) y Police dogs are trained to react to commands in a foreign language; commonly German but more recently Hungarian. use a olo while l Would you like to see an additional fact? (y) n Goodbye! Demonstration

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem lets write a Java program that accomplishes the task described in the prompt This program will read facts from a file store them ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!