Answer:
Auto-negotiation protocol is the modern technology in the networking. This protocol allow the ethernet equipment for automate different instillation steps. This type of protocol use by interconnecting various electronic devices for negotiating the speed of the link.
Advantages:
- The auto negotiation protocol features used to maximize the throughput of data link layer.
- This protocol are basically useful in the local area network (LAN), with multiple capability of connections.
- The auto negotiation protocol extremely useful in twisted pair which are based on ethernet.
Disadvantages:
- This type of protocol are not fixed data links and not used as backbone of the networks.
- Duplex mismatch occur then, it cause significant loss in the packets.
Answer:
Following are the code to the given question:
#include <iostream>//header file
using namespace std;
class Window //defining a class Window
{
private:
int width, height;//defining integer variable
public:
friend ostream& operator << (ostream& stm, Window& width)//defining a friend function that takes two parameters
{
return stm<<"a ("<<width.width<<" x "<<width.height<<") window"; //use return keyword that return its values
}
Window(int width, int height): width(width), height(height)//defining parameterized constructor that inherit width and height in its parameters
{}
};
int main() //Main method
{
Window w(80,90);//calling class constructor
cout<<w;//print object value
return 0;
}
Output:
a (80 x 90) window
Explanation:
In the above code, a class "Window" is defined that uses a friend function "ostream& operator" is declared that uses the "ostrea&" as a data type to hold two-variable "stm and w" in its parameter, and declared the parameterized constructor to hold value by inheriting width and height in its parameters.
Inside the main method, a class object is created that calls the constructor and uses the print method to print object value.
While the reader of a pie chart can clearly see which categories dominate, it can be difficult to see categories that occupy only a small percentage of the chart. This problem becomes worse if there are many small categories in the chart. Labeling the categories can also be difficult.
Answer:
# price of the carpet per square foot for each quality.
carpet_prices=[1,2,4]
def cal_cost(width,height,choice):
return width*height*carpet_prices[choice-1]
width=int(input("Enter Width : "))
height=int(input("Enter Height : "))
print("---Select Carpet Quality---")
print("1. Standard Quality")
print("2. Primium Quality")
print("3. Premium Plus Quality")
choice=int(input("Enter your choice : "))
print(f"Carpeting cost = {cal_cost(width,height,choice)}")
Explanation:
The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.
The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.
The program Nslookup, is available on all operating systems and provides all types of information from a DNS server and allows you to query all types of information from a DNS server and change how your system uses DNS.
The network administration command-line tool nslookup can be used to verify that your DNS servers can resolve external domain names.