Question: 5 star to correct answer, thank you very much :) Task 1- Stars.java Write a Java program called Stars.java that, firstly, prompts (asks) the user

 5 star to correct answer, thank you very much :) Task1- Stars.java Write a Java program called Stars.java that, firstly, prompts (asks) 5 star to correct answer, thank you very much :)

Task 1- Stars.java Write a Java program called Stars.java that, firstly, prompts (asks) the user to enter an input file name. This is the name of a text file that can contain any number of records. A record in this file is a single line of text in the following format: Name Proper Name HR number HD number distance where Name is the common name of a star. This is a String (text) and may contain more than one word. This name is followed by a character, there are no spaces before or after the Proper Name is the proper name of a star. This is a String (text and may contain more than one word. This name is followed by a character, there are no spaces before or after the HR number is the HR classification number of the star. It is always the characters HR then a space and a number of digits, followed by a character there are no spaces before or after the HD number is the HD classification number of the star. It is always the characters HD then a space and a number of digits, followed by a character there are no spaces before or after the distance is the distance in light years from Earth. The format of this distance is always two digits after the decimal point, there may be between one and four digits to the left of the decimal point. An example of some of the lines of this file might be Acrux Alpha 1 Crucis HR 4730 HD 108248 320.00 Achird Eta Cassiopeiaen HR 219 HD 4614-19. 41 Ain Al Ramir Na 1 Sagittarii HR 7116- HD 174974 -1850.59 The input file may have 0 to any number of records. The format of the input file is guaranteed to be correct. Your program does not have to check the format Also, your program must work with any file name of the correct format. Do not hard code the file name.) Once this file has been opened, the user is then prompted for a proper star name. The program then reads through the file. If a matching proper star name is found in the file a all the information for that star is displayed to the screen. The order of display is shown in the example runs below. Proper star names are unique in the file, so there will be at most only one match User entered Proper star names must be case insensitive, that is, any combination of uppercase and lowercase letters must give the same result

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!