Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An Internet Service Provider ( ISP ) must, as part of its service to customers, provide a Domain Name Server ( DNS ) . A

An Internet Service Provider (ISP) must, as part of its service to customers, provide a Domain Name Server (DNS).
A DNS is a server that maintains a database of domain names, such as www.griffith.edu.au, and their corresponding Internet Protocol Addresses (IPA), such as 132.234.243.22. A domain name has only one IPA, but an IPA may have many domain names. 88.88.0.0
Define a class that simulates a DNS. It must have:
a method for updating the DNS with a new domain name and its IPA;
a method for returning the IPA for a domain name, or None if it does not exist; and
whatever private attributes are required to support the methods.
Write a test program that allows the user to test the class, by typing in fake domain names and IPAs to update the DNS, and domain names to look up. An example of the output from the test program is like this:
? u www.google.com 8.8.8.8
? u www.amazon.com 2.2.2.2
? u www.cnn.com
Bad command.
? l www.google.com
8.8.8.8
? l www.amazon.com
2.2.2.2
? l www.cnn.com
None
? q
where:
u DNS IPA updates the DNS with a new domain name and its IPA;
l DNS returns the IPA for a domain name, or None if it does not exist; and
q ends the test program.
Bad inputs are to be reported and ignored.

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

More Books

Students also viewed these Databases questions

Question

Influences on Nonverbal Communication?

Answered: 1 week ago