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.