Question: I need help with this. I need it in java please. I provided a pic of what it should look like. Write a sub -

I need help with this. I need it in java please. I provided a pic of what it should look like.
Write a sub-netting utility program.
Based on the CIDR slash notation (e.g. a.b.c.d/n) learned in class, write a sub-netting utility program which
will allow an end user to enter a CIDR address (e.g.,1.1.1.1/23 or 2.2.2.2/7) and your program will display
the following information (refer to the Remarks-a):
1. The number of different IP addresses [5pts]
2. The beginning IP address (or called network-id or network-address) of the IP address block [10pts]
a. For example, if your IP address block is 10.1.1.0 to 10.1.1.255, the beginning IP or the first IP will be 10.1.1.0
3. The ending IP address (or called broadcast address) of the IP address block [10pts]
a. For example, if your IP address block is 10.1.1.0 to 10.1.1.255, the beginning IP or the first IP will be 10.1.1.255
4. The network mask information in dotted-decimal format. [10pts]
What do you need to do and to submit?
1. Write the program by using one of programming languages (C, C++, Java, Python, or VB.Net).
2. Verify the correctness of your program.
a. Please be aware that the network prefix length can range from 0 to 32(inclusive).
Enter the slash notation (e.g.,1.1.1.1/23) of your network: 1.1.1.1/23
The number of addresses is:
The beginning IP address is:
The ending IP address is:
Do you want to try again (y=yes, n=no)? y
Enter the slash notation (e.g.,1.1.1.1/23) of your network: 2.2.2.2/24
The number of addresses is:
The beginning IP address is:
The ending IP address is:
The network mask with prefix //24 is: 25.25.255.255.0
Do you want to try again (y=yes, n=no)? y
Enter the slash notation (e.g.,1.1.1.1/23) of your network: 3.3.3.3/18
The number of addresses is:
The beginning IP address is:
The ending IP address is:
The network mask with prefix 118 is: {:["3.3.0.63.255"],["255.255.192.0"]:}
Do you want to try again (y=yes, n=no)? n
www created by Ming-Shan Su www
Press any key to continue ...
I need help with this. I need it in java please.

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 Programming Questions!