Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java n Java Write a program that takes FOUR user inputs: IPv4 of machinel: Subnet mask of machine1: IPv4 of machine2: Subnet mask of

image text in transcribed
in java
n Java Write a program that takes FOUR user inputs: IPv4 of machinel: Subnet mask of machine1: IPv4 of machine2: Subnet mask of machine2: Your program should determine whether machines and machine2 are in the same subnet. If yes, your program should print "Yes these IP's are in the same subnet", and then your program prints the LAST IPv4 address in that subnet. If no.1 your program should print the last IPv4 address in machinel's subnet, and then print the last IPv4 address in machine2's subnet run #1: IPv4 of machine: 192.168.1.12 Subnet mask of machine1:255.255.255.0 IPv4 of machine2: 192.168.1.123 Subnet mask of machine2: 255.255.255.0 output: Yes these are in the same subnet and the last IPv4 address in that subnet is 192.168.1.255 IPv4 of machine: 192.168.1.12 Subnet mask of machinel: 255.255.255.0 IPv4 of machine2: 192.168.1.200 Subnet mask of machine2: 255.255.255.240 output No, these are not in the same subnet the last IPv4 address in subnet 1 is 192.168.1.255 the last IPv4 address in subnet 2 is 192.168.1.207 Assume user input address ad subnet masks are valid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions