Saturday, 17 September 2016

                                   NETWORK COMPONENTS

Computer network requires the following devices (some of them are optional):-
• Network Interface Card (NIC)
• Hub
• Switches
• Cables and connectors
• Router
• Modem

1. Network Interface Card

Network adapter is a device that enables a computer to talk with other computer/network. Using unique hardware addresses (MAC address)encoded on the card chip, the data-link protocol employs these addresses to discover other systems on the network so that it can transfer data to the right destination.

There are two types of network cardswired and wireless. The wired NIC uses cables and connectors as a medium to transfer data, whereas in the wireless card, the connection is made using antenna that employs radio wave technology. All modern laptop computers incorporated wireless NIC in addition to the wired adapter.

Network Card Speed

Network Interface card, one of the main computer network components, comes with different speeds, 10Mbps, 100Mbps, and 1000Mbps, so on. Recent standard network cards built with Gigabit (1000Mbps) connection speed. It also supports to connect slower speeds such as 10Mbps and 100Mbps. However, the speed of the card depends on your LAN speed. For example, if you have a switch that supports up to 100Mbps, your NIC will also transfer a data with this same speed even though your computer NIC has still the capability to transfer data at 1000Mbps (1Gbps). In modern computers, network adapter is integrated with a computer motherboard. However if you want advanced and fast Ethernet card, you may buy and install on your computer using the PCI slot found on the motherboard (desktop) and ExpressCard slots on laptop .

2. Hub
Hub is a device that splits a network connection into multiple computers. It is like a distribution center. When a computer request information from a network or a specific computer, it sends the request to the hub through a cable. The hub will receive the request and transmit it to the entire network. Each computer in the network should then figure out whether the broadcast data is for them or not.
Currently Hubs are becoming obsolete and replaced by more advanced communication devices such as Switchs and Routers.

3. Switch
Switch is a telecommunication device grouped as one of computer network components. Switch is like a Hub but built in with advanced features. It usesphysical device addresses in each incoming messages so that it can deliver the message to the right destination or port. Like Hub, switch don’t broadcast the received message to entire network, rather before sending it checks to which system or port should the message be sent. In other words switch connects the source and destination directly which increases the speed of the network. Both switch and hub have common features: Multiple RJ-45 ports, power supply and connection lights.

4. Cables and connectors

Cable is one way of transmission media which can transmit communication signals. The wired network typology uses special type of cable to connect computers on a network.

There are a number of solid transmission Media types, which are listed below. - Twisted pair wire
It is classified as Category 1, 2, 3, 4, 5, 5E, 6 and 7. Category 5E, 6 and 7 are high-speed cables that can transmit 1Gbps or more. -
Coaxial cable
Coaxial cable more resembles like TV installation cable. It is more expensive than twisted-pair cable but provide high data transmission speed.
Fiber-optic cable
It is a high-speed cable which transmits data using light beams through a glass bound fibers. Fiber-optic cable is high data transmission cable comparing to the other cable types. But the cost of fiber optics is very expensive which can only be purchased and installed on governmental level.

5. Router

When we talk about computer network components, the other device that used to connect a LAN with an internet connection is called Router. When you have two distinct networks (LANs) or want to share a single internet connection to multiple computers, we use a Router. In most cases, recent routers also include a switch which in other words can be used as a switch. You don’t need to buy both switch and router, particularly if you are installing small business and home networks.
There are two types of Router: wired and wireless. The choice depends on your physical office/home setting, speed and cost.

6. Modems
A modem enables you to connect your computer to the available internet connection over the existing telephone line. Like NIC, Modem is not integrated with a computer motherboard. It comes as separate part which can be installed on the PCI slots found on motherboard. A modem is not necessary for LAN, but required for internet connection such as dial-up and DSL. There are some types of modems, which differs in speed and transmission rate. Standard PC modem or Dial-up modems (56Kb data transmission speed), Cellular modem (used in a laptop that enables to connect while on the go), cable modem (500 times faster than standard modem) and DSL Modems are the most popular.

                                                  What are protocols?

When two humans converse, they may have to use the same language but they generally understand each other without having to adhere to rigid rules of grammar or formal language frameworks. Computers, on the other hand, have to have everything explicitly defined and structured. If computers wish to communicate with one another, they have to know in advance exactly how information is to be exchanged and precisely what the format will be. Therefore, standard methods of transmitting and processing various kinds of information are used and these methods are called "protocols". Protocols are established by international agreement and ensure that computers everywhere can talk to one another. There are a variety of protocols for different kinds of information and functions. This article will discuss some of the common protocols that the average PC user is likely to encounter.

TCP/IP

TCP (Transmission Control Protocol) and IP (Internet Protocol) are two different procedures that are often linked together. The linking of several protocols is common since the functions of different protocols can be complementary so that together they carry out some complete task. The combination of several protocols to carry out a particular task is often called a "stack" because it has layers of operations. In fact, the term "TCP/IP" is normally used to refer to a whole suite of protocols, each with different functions. This suite of protocols is what carries out the basic operations of the Web. TCP/IP is also used on many local area networks. The details of how the Web works are beyond the scope of this article but I will briefly describe some of the basics of this very important group of protocols. More details can be found in the references in the last section.
When information is sent over the Internet, it is generally broken up into smaller pieces or "packets". The use of packets facilitates speedy transmission since different parts of a message can be sent by different routes and then reassembled at the destination. It is also a safety measure to minimize the chances of losing information in the transmission process. TCP is the means for creating the packets, putting them back together in the correct order at the end, and checking to make sure that no packets got lost in transmission. If necessary, TCP will request that a packet be resent.
Internet Protocol (IP) is the method used to route information to the proper address. Every computer on the Internet has to have its own unique address known as the IP address. Every packet sent will contain an IP address showing where it is supposed to go. A packet may go through a number of computer routers before arriving at its final destination and IP controls the process of getting everything to the designated computer. Note that IP does not make physical connections between computers but relies on TCP for this function. IP is also used in conjunction with other protocols that create connections.

UDP and ICMP

Another member of the TCP/IP suite is User Datagram Protocol (UDP). (A datagram is almost the same as a packet except that sometimes a packet will contain more than one datagram.) This protocol is used together with IP when small amounts of information are involved. It is simpler than TCP and lacks the flow-control and error-recovery functions of TCP. Thus, it uses fewer system resources.
A different type of protocol is Internet Control Message Protocol (ICMP) . It defines a small number of messages used for diagnostic and management purposes. 

Mail Protocols POP3 and SMTP

Email requires its own set of protocols and there are a variety, both for sending and for receiving mail. The most common protocol for sending mail is Simple Mail Transfer Protocol (SMTP). When configuring email clients, an Internet address for an SMTP server must be entered. The most common protocol used by PCs for receiving mail is Post Office Protocol(POP). It is now in version 3 so it is called POP3. Email clients require an address for a POP3 server before they can read mail. The SMTP and POP3 servers may or may not be the same address. Both SMTP and POP3 use TCP for managing the transmission and delivery of mail across the Internet.
A more powerful protocol for reading mail is Interactive Mail Access Protocol (IMAP). This protocol allows for the reading of individual mailboxes at a single account and is more common in business environments. IMAP also uses TCP to manage the actual transmission of mail.

Hypertext Transfer Protocol

Web pages are constructed according to a standard method called Hypertext Markup Language (HTML). An HTML page is transmitted over the Web in a standard way and format known as Hypertext Transfer Protocol (HTTP). This protocol uses TCP/IP to manage the Web transmission.
A related protocol is "Hypertext Transfer Protocol over Secure Socket Layer" (HTTPS), first introduced by Netscape. It provides for the transmission in encrypted form to provide security for sensitive data. A Web page using this protocol will have https: at the front of its URL.

File Transfer Protocol

File Transfer Protocol (FTP) lives up to its name and provides a method for copying files over a network from one computer to another. More generally, it provides for some simple file management on the contents of a remote computer. It is an old protocol and is used less than it was before the World Wide Web came along. Today, Its primary use is uploading files to a Web site. It can also be used for downloading from the Web but, more often than not, downloading is done via HTTP. Sites that have a lot of downloading (software sites, for example) will often have an FTP server to handle the traffic. If FTP is involved, the URL will have ftp: at the front.


                                                           C++ AND JAVA
C++ supports OOP, while Java is OOP out of the box.
C++ supports multiple class inheritance, while Java only gives you a single class inheritance, but solves the multiplicity via interfaces.
C++ has got a pointers, and can directly manipulate/violate the memory addresses.
Java is a type-safe language, and you have no availability of pointers in Java. They're present in the background, but not on the scene.
Generics in Java, and templates in C++
Java does not include structures or unions.
Java does not support destructors but adds a finalize() method.
All the code in Java program is encapsulated within classes therefore Java does not have global variables or functions.
C++ requires explicit memory management, while Java includes automatic garbage collection.

                            What is difference between C and C++ ?


  1. C++ is Multi-Paradigm ( not pure OOP, supports both procedural and object oriented) while C follows procedural style programming.
  2. In C data security is less, but in C++ you can use modifiers for your class members to make it inaccessible from outside.
  3. C follows top-down approach ( solution is created in step by step manner, like each step is processed into details as we proceed ) but C++ follows a bottom-up approach ( where base elements are established first and are linked to make complex solutions ).
  4. C++ supports function overloading while C does not support it.
  5. C++ allows use of functions in structures, but C does not permit that.
  6. C++ supports reference variables ( two variables can point to same memory location ). C does not support this.
  7. C does not have a built in exception handling framework, though we can emulate it with other mechanism. C++ directly supports exception handling, which makes life of developer easy.
                                                 OOPS CONCEPTS
Objects: Object is the basic unit of object-oriented programming.Objects are identified by its unique name. An objectrepresents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data.

An Object is a collection of data members and associated member functions also known as methods.

Classes: Classes are data types based on which objects are created.Objects with similar properties and methods are grouped together to form a Class. Thus a Class represent a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects becomes functions of the class and is referred to as Methods.

Example #1:

For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects.In this context each Car Object will have its own, Model,Year of Manufacture, Colour, Top Speed, Engine Power etc.,which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class.No memory is allocated when a class is created. Memory is
allocated only when an object is created, i.e., when an instance of a class is created.

Example #2:

An architect will have the blueprints for a house....those blueprints will be plans that explain exactly what properties the house will have and how they are all layed out.  However it is just the blueprint, you can't live in it.  Builders will look at the blueprints and use those blueprints to make a physical house.  They can use the same blueprint to make as many houses as they want....each house will have the same layout and properties.  Each house can accommodate it's own families...so one house might have the Smiths live in it, one house might have the Jones live in it.

The blueprint is the class...the house is the object.  The people living in the house are data stored in the object's properties.

Abstraction: Abstraction means showing essential features and hiding non-essential features to the user.

For Eg.  Yahoo Mail...

When you provide the user name and password and click on submit button..It will show Compose,Inbox,Outbox,Sentmails...so and so when you click on compose it will open...but user doesn't
know what are the actions performed internally....It just Opens....that is essential; User doesn't know internal actions ...that is non-essential things...

For Eg. Tv Remote..
Remote is a interface between user and tv..right. which has buttons like 0 to 10 ,on /of etc but we dont know circuits inside remote...User does not  need to know..Just he is using essential thing that is remote.
 

Encapsulation: Encapsulation means which binds the data and code (or) writing operations and methods in single unit (class).
 
For Example:
A car is having multiple parts..like steering,wheels,engine...etc..which binds together to form a single object that is car. So, Here multiple parts of cars encapsulates itself together to form a single object that is Car.

In real time we are using Encapsulation for security purpose...

Encapsulation = Abstraction + Data Hiding.


Inheritance: Deriving a new class from the existing class,is called Inheritance.
Derived(sub class) class is getting all the features from Existing (super class\base class) class and also incorporating some new features to the sub class.


Polymorphism :

Polymorphism means ability to take more than one form that an operation can exhibit different behavior at different instance depend upon the data passed in the operation.

1>We behave differently in front of elders, and friends. A single person is behaving differently at different time.

2> A software engineer can perform different task at different instance of time depending on the task assigned  to him .He can done coding , testing , analysis and designing depending on the task assign and the requirement.

3> Consider the stadium of common wealth games. Single stadium but it perform multiple task like swimming, lawn tennis etc.

4> If a girl is married and mother of 2 children doing teaching job then  she is a women first ,, teacher in a school when she is in school,,wife of someone at home,, mother of her children,, and obvious daughter of someone  means a woman plays diffent roles at different times dats the polymorphism (many forms).

Saturday, 3 September 2016