Answer:
Java Code given below with appropriate comments for better understanding
Explanation:
1.
public String whatAmI(E e) {
//.getClass() returns the runtime class of an object
//.equals() determines whether two objects are equivalent
//by calling a new static instance of a wrapper object we can analyze
//it's class type and compare it to the variable passed in
if(e.getClass().equals(new Integer(1).getClass())) {
return "Integer";
}
else if(e.getClass().equals(new String("1").getClass())) {
return "String";
}
else if(e.getClass().equals(new Double(1.0).getClass())) {
return "Double";
}
else {
return "Who knows!";
}
}
2.
public String reverseWord(String word) {
Stack<Character> stack = new Stack<Character>();
for (int i = 0; i < word.length(); i++) {
stack.push(word.charAt(i));
}
String result = "";
while (!stack.isEmpty()) {
result += stack.pop();
}
return result;
}
Answer:
The Datalink layer encapsulates each packet in a frame which contains the hardware address (MAC) of the source and destination computer (host) and the LLC information which identifies to which protocol in the prevoius layer (Network layer) the packet should be passed when it arrives to its destination.
Explanation:
Answer:
UTP is twisted pairs (usually four twisted pairs) vs Coaxial cable or coax, which is, well, coaxial with a center conductor and a surrounding insulator and then surrounded by a braided shield return.
Both are controlled impedance, the former by its geometry, insulation dielectric and thickness and the twists per inch. The latter by its geometry also, the insulator dielectric and thickness
Benefits or advantages of UTP:
It is easy to handle. These cables are used in most of the networking architecture. It is flexible which further makes installation easier. It is less expensive and less costly compare to other networking media types. and hence... UTP cables are more popular than coaxial cables in Networking
Explanation:
Go on to power point and go onto templates and then it will show templates
Answer:
An operating system is a software that allows a user to run other applications on a computing device. The applications generally are not designed to interface directly with hardware, almost all of the applications are written to run on an operating system, in order to become independent of the hardware design.
The main function of an operating system are:
- manage the hardware resources of a computer: central processing unit, memory, disk drives, and printers.
- establish a user interface to facilitate the interaction human-computer.
- execute and provide services for software applications.