Question: Programming Language: JAVA Package name: exerl ----- Class name: Pexerl This class should solve the problem specified as follows: A host can be accessed using

 Programming Language: JAVA Package name: exerl ----- Class name: Pexerl This

Programming Language: JAVA Package name: exerl ----- Class name: Pexerl This class should solve the problem specified as follows: A host can be accessed using a dotted format such as (www.yahoo.com). Explore the InetAddress class within the java.net package. Some of the methods within this class are as follows: bytel getAddress String getHostAddress String getHostName() static InetAddress getLocalHosto static InetAddress getiByName(String hostname) static InetAddress I getAllByNamei(String hostname) Objectives: Create a program that will look up a variable number of hostnames: - The program will ask for the name of a host to search and then immediately display the host names and IP addresses associated to the host given by the user. The program will then ask the user if he/she wants to search another host (if yes, repeat the process above, otherwise, exit the program). Sample run of the program: Blue mark: input of user Host 1 - Type host name: yahoo.com Number of host(s)/IP(s): 6 Green mark: output of program Host name: yahoo.com IP address: 74.6.143.25 Host name: yahoo.com IP address: 98.137.11.163 Host name: yahoo.com IP address: 74.6.231.20 Host name: yahoo.com IP address: 98.137.11.164 Host name: yahoo.com IP address : 74.6.231.21 Host name: yahoo.com IP address: 74.6.143.26 Search another [Y/N]? y Host 2 - Type host name: csvu.edu.ph Number of host(s)/IP(s): 1 Host name: csvu.edu.ph IP address: 122.53.179.133 Search another [y/N]? n Process finished with exit code o

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!