Write an application that asks the user to enter the course numbers (e.g. 210) and course titles (e.g. Introduction to Computer Programming) of up to 5 courses. Continue to prompt the user for course numbers and course titles until the user enters the sentinel value 666 for a course number or has entered 5 course numbers, whichever comes first. When the user is finished entering course numbers and titles, produce a count of how many course numbers were entered, and then display the course numbers in one line with 2 spaces in-between.

And, in a loop, this program continuously asks the user to enter a course numbers. If the course number is one of the previously entered ones then and the program displays the corresponding course title. Otherwise an error message is returned. The loop continues until the user enters 666.

The use of arrays is required. Save the application as Nightmares.java. Proper coding style as taught in class is required.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.