Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java program that 1. first reads an input text file and stores the prime numbers in the file in a hash map; 2.
Write a Java program that
1. first reads an input text file and stores the prime numbers in the file in a hash map;
2. until the program is terminated, the program reads an input number from the user and checks if the number is a prime number stored in the hash map: if the answer is yes the program outputs "HIT", otherwise "MISS" to the console.
For the input file, use the provided input text file INPUT.txt attached. INPUT.txt contains one prime number per line. Your program should read the file from its current path
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started