IP address. 4. [after §7.8-easy] IP Address: very computer on the Internet has a
ID: 3874955 • Letter: I
Question
IP address. 4. [after §7.8-easy] IP Address: very computer on the Internet has a unique identifying number, called an Internet protocol (IP) address. To contact a computer on the Internet, you send a message to the computer's IP address. Here are some typical IP addresses: 216.27.6.136 224.0.118.62 There are different formats for displaying IP addresses, but the most common format is the dotted decimal format. The above two IP addresses use the dotted-decimal format dots are used to split up the big IP address number into four smaller numbers. It's called "decimal" because decimal numbers are used (as opposed to binary) for the four smaller numbers. . It's called "dotted" because 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any nrr This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or partExplanation / Answer
class IpAddress{
String ipAdd;
public IpAdrees(String ipAdd){
this.ipAdd=ipAdd;
}
public string getDottedDecimal(){
return ipAdd;
}
public String getOctet(int position){
String[] parts =ipAdd.split(".");
}//class
public class CalculateIpInDifferentFormat{
public static void main(String[] args){
IpAddress ip=new IpAddress("216.27.6.136");
System.out.println(ip.getDottedDecimal());
System.out.println(ip.getOctet(4));
System.out.println(ip.getOctet(1));
System.out.println(ip.getOctet(3));
System.out.println(ip.getOctet(2));
}
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.