Tuesday, October 6, 2015

Intro to programming


         Programming helps you understand the computers.
A set of rules that provides a way of telling a computer what operations to perform is called a programming language.

program is a set of step-by-step instructions that directs the computer to do the tasks you want it to do and produce the results you want. Programmer’s job is to convert problem solutions into instructions for the computer.
Programmer prepares instructions of a computer program.
The programming Process
}Defining the problem
}Planning the solution
}Coding the program
}Testing the program
}Documenting the program
Symbol    Meaning
}==     Equals
}!=     Not Equal
}<     Less than
}<=     Less than or equal to
}  Greater than
}>=     Greater than or equal to
Programming as a Career
The Joys of the Field
What It Takes  
Open Doors 
Levels of Language 
}Machine language
}Assembly languages
}High-level languages
}Very high-level languages
}Natural languages
Flowchart
is a type of diagram that represents an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows.
a picture of the separate steps of a process in sequential order.
Flowchart Basic Procedure
}Define the process to be diagrammed. Write its title at the top of the work surface.
}Discuss and decide on the boundaries of your process: Where or when does the process start? Where or when does it end? Discuss and decide on the level of detail to be included in the diagram.
}Brainstorm the activities that take place. Write each on a card or sticky note. Sequence is not important at this point, although thinking in sequence may help people remember all the steps.
Algorithm
-a procedure or formula for solving a problem.
-a step-by-step procedure for solving a problem.
How does it work?
Start with input  > Do complex calculations > Stop when we find the answer 
Flowchart and Pseudocode
Write a program that reads two numbers and displays the numbers in decreasing order.

Variables and Data types


          Create a program that will let the user input its name and password, if input name and password is correct end the program. If Name and password is wrong end the program.
Variables in Java have a type.
The type defines what kinds of values a variable is allowed to store.
Integer Types:
int: Most numbers you’ll deal with.
long: Big integers; science, finance, computing.
short: Small integers. Legacy. Not very useful.
byte: Very small integers, useful for generic data.Floating Point (Decimal) Types:
float: Single-precision decimal numbers
double: Double-precision decimal numbers.
Other Types:
String: Text strings.
boolean: True or false.
char: Latin Alphanumeric Characters
Variable names (or identifiers) may be any length, but must start with:
A letter (a – z),
A dollar sign ($),
Or, an underscore ( _ ).
Identifiers cannot contain special operation symbols like +, -, *, /, &, %, ^, etc.
Certain reserved keywords in the Java language are illegal.
For example, “class”, “static”, “int”, etc.
Java is a case-sensitive - capitalization matters.
“Camel Case”: Start variable names with lower case and capitalize each word: “camelsHaveHumps”.
Data Type
Description
byte
Variables of this kind can have a value from:
-128 to +127 and occupy 8 bits in memory
short
Variables of this kind can have a value from:
-32768 to +32767 and occupy 16 bits in memory
int
Variables of this kind can have a value from:
-2147483648 to +2147483647 and occupy 32 bits in memory
long
Variables of this kind can have a value from:
-9223372036854775808 to +9223372036854775807 and occupy
 64 bits in memory

Introduction



                                        Computers


         Are used in so many fields in our daily life. From Engineers to Doctors, Students, Teachers, Government Organization they all use computers to perform specific tasks, for entertainment or just to finish office work. Computers have made our life easier. With greater precision and accuracy and less time taking computers can do a lot in short time while that task can take a lot of time while doing manually. Computers have taken industries and businesses to a whole new level. They are used at Home for work and entertainment purposes, at Office, In hospitals, in government organizations. introduction computers nowadays are a necessity...
        Information technology (IT) is the application of computers and telecommunications equipment to store, retrieve, transmit and manipulate data, often in the context of a business or other enterprise.
The term is commonly used as a synonym for computers and computer networks, but it also encompasses other information distribution technologies such as television and telephones. Several industries are associated with information technology, including computer hardwaresoftwareelectronicssemiconductorsinternettelecom equipmentengineeringhealthcaree-commerce and computer services.
Humans have been storing, retrieving, manipulating and communicating information.
         As an IT student I am very pleased to know and part of its everyday progress.Now I will show and tell you about our discussion for the whole Finals topic.

Internet


     The INTERNET is a network of computers, which links many different types of computers all over the world. 
Basic Services Of The INTERNET
§ Electronic Mail (E-Mail) –
Allow user to send a mail (message ) to another internet user in any part of the world in a near-real-time manner .
§ File Transfer Protocol (FTP) –
Allow user to move a file from one computer to another on the internet.
§ Telnet –
Allow a user to log into another computer somewhere on the internet . 
The World Wide Web (WWW)
§ World Wide Web or W3 is the most popular and promising method of organizing and accessing information on the INTERNET.
§ Hypertext is a new way of information storage and retrieval that enables authors to structure information in novel ways.
§ A properly designed hypertext document can help users to locate desired type of information rapidly.
§ Hypertext documents enable this by using a series of link.
§ A link is a special type of item in a hypertext document connecting the document to another document.
§ Hypertext documents on internet are known as Web Pages. 
Some important current strategic of the INTERNET are :  
q On-line communication
q Software sharing
q Exchange of views on topics of common interest
q Posting of information of general interest
q Organization promotion
q Product promotion and feedback about products
q Customer support service
q On-line journals, magazines, Encyclopedia, and dictionary
q On-line shopping

q World-wide conferencing

Programming with Java statements


 Understanding Assignment Statements
An assignment statement sets a value within a variable
All assignment are considered to be expression statements
Expressions in Java are anything that has a value

Typically, expressions evaluate to primitive types
Commonly known simply as assignment statements, are designed to assign values to variables and must be terminated with a semicolon
Variable = value;
On the left is the variable that will be associated with the memory and type necessary to store the value. On the right is a literal value.
The if conditional Statement
The if statement is designed to conditionally execute a statement or conditionally decide between a choice of statements.will execute only one statement upon the condition, unless braces are supplied. Braces allow for multiple enclosed statements to be executed. This group of statements is also known as a block,evaluate to a boolean value,The else clause is optional and may be omitted
The if-then conditional Statement
The if-then statement is used when multiple conditions need to flow through a decision-based scenario
The if-then-else conditional Statement
The main difference is that the code will fall through to the final stand-alone else when the expression fails to return true for any condition
The switch conditional Statement
It is used to match the value from a switch statement expression against a value associated with a case keyword. Once matched, the enclosed statements associated with the matching case value are executed, unless a break statement is encountered
. Understanding Iteration Statements
Iteration statements are used when there is a need to iterate through pieces of code
Iteration statements include for loop, enhanced for loop, and the while and do-while statements.
The for loop Iteration Statement
The expression within the for loop must be evaluated to a boolean value
The iteration, also known as the update part, provides the mechanism that will allow the iteration to occur
The enhanced for loop Iteration Statement
It is used to iterate through an array, a collection, or an object that implements the interface iterable.
It is also commonly known as the for each loop
The while Iteration Statement
This loop evaluates an expression and executes the loop body only if the expression evaluates to true
The do-while Iteration Statement
It is very similar to the while loop, except that it always executes the body at least once
4. Understanding Transfer of Control Statements
Transfer of control statements include the break, continue and return statements




HTML


To create a bulleted list you need to add a <ul> and a </ul> tag at the beginning and the end of the list. 
Numbered lists have <ol> tags instead of <ul> tags.

To separate single list items use <li> and </li> tags.

There are special settings that you can use to customize the lists on your page.

On the following two pages you can learn in detail about bulleted and numbered lists.
žWeb pages are text files containing HTML

žHTML – Hyper Text Markup Language
A notation for describing
document structure (semantic markup)
formatting (presentation markup)
Looks (looked?) like:
  A Microsoft Word document
žThe markup tags provide information about the page content structure
žAn HTML file must have an .htm or .html file extension
žHTML files can be created with text editors:
NotePad, NotePad ++, PSPad
Or HTML editors (WYSIWYG Editors):
Microsoft FrontPage
Macromedia Dreamweaver
Netscape Composer
Expression Web
žHTML is comprised of “elements” and “tags
Begins with <html> and ends with </html>
When writing XHTML, must define a namespace

žElements (tags) are nested one inside another:
žTags have attributes:
HTML describes structure using two main sections
       <head> and <body>
Now we are able to start learning about HTML tags. An HTML tag will always begin with a "less than" sign, like this: <. The tags will end with a "greater than" sign, like this: >. An example would be the tag used to underline text, <u>. You would place this before the text you want to underline. This is called an opening tag, which begins the operation you wish to perform. In order to end the underlining, you must use a closing tag. A closing tag will be the same as the opening tag, but will have a forward slash before the command, like this: </u>. So, if you would like to underline the phrase "HTML Rules!", you would write the following in your text editor:
<u>HTML Rules!</u>
The result of this would be:
HTML Rules!
In the past, not all tags would require a closing tag. An example would be the image tag, which places an image on the page. It looks like this:
<img src="myimage.gif">

computer networking

Computer Network Defined


computer network is a set of computers connected together for the purpose of sharing resources. The most common resource shared today is connection to the Internet. Other shared resources can include a printer or a file server.
A computer network is a group of computer systems and other computing hardware devices that are linked together through communication channels to facilitate communication and resource-sharing among a wide range of users. Networks are commonly categorized based on their characteristics.A computer network is a set of connected computers. Computers on a network are called nodes. The connection between computers can be done via cabling, most commonly the Ethernet cable, or wirelessly through radio waves. Connected computers can share resources, like access to the Internet, printers, file servers, and others. A network is a multipurpose connection, which allows a single computer to do more.
Types of Network Connections
Computer networks can be broken down historically into topologies, which is a technique of connecting computers. The most common topology today is a collapsed ring. This is due to the success of a network protocol called the Ethernet. This protocol, or a network language, supports the Internet, Local Area Networks, and Wide Area Networks.
              Star Topology
star topology is a design of a network where a central node extends a cable to each computer on the network. On a star network, computers are connected independently to the center of the network. If a cable is broken, the other computers can operate without problems. A star topology requires a lot of cabling.
        Bus Topology
bus topology is another type of design where a single cable connects all computers and the information intended for the last node on the network must run through each connected computer. If a cable is broken, all computers connected down the line cannot reach the network. The benefit of a bus topology is a minimal use of cabling.
     Collapsed Ring Topology
A similar topology is called a ring. In this design, computers are connected via a single cable, but the end nodes also are connected to each other. In this design, the signal circulates through the network until it finds the intended recipient. If a network node is not configured properly, or it is down temporarily for another reason, the signal will make a number of attempts to find its destination.
collapsed ring is a topology where the central node is a network device called a hub, a router, or a switch. This device runs a ring topology internally and features plugins for cables. Next, each computer has an independent cable, which plugs into the device. Most modern offices have a cabling closet, or a space containing a switch device that connects the network. All computers in the office connect to the cabling closet and the switch. Even if a network plug is near a desk, the plug is connected via a cable to the cabling closet.
       Mesh Topology
A network setup where each computer and network device is interconnected with one another, allowing for most transmissions to be distributed, even if one of the connections go down. This topology is not commonly used for most computer networks as it is difficult and expensive to have redundant connection to every computer. However, this topology is commonly used for wireless networks. Below is a visual example of a simple computer setup on a network using a mesh topology.
      TREE Topology
It has a root node and all other nodes are connected to it forming a hierarchy. It is also called hierarchical topology. It should at least have three levels to the hierarchy.
    HYBRID Topology
It is two different types of topologies which is a mixture of two or more topologies. For example if in an office in one department ring topology is used and in another star topology is used, connecting these topologies will result in Hybrid Topology (ring topology and star topology).

Advantage of Computer networks

         Sharing of Devices such as printer and scanner
         Sharing program / software
         Sharing files
         Sharing data
         Sharing information
         Sharing of single high-speed internet connection
         Better communication using internet services such as email, mailing list and internet Relate chat (IRC)

Disadvantage of Computer Network

         The larger network becomes, the more difficult it is to manage.
         If the network stops operating system, then it may not be possible to access various resources
         Computer Viruses: If any computer system in a network gets affected by computer virus, there is a possible threat of other systems getting affected too.

Types of Network

Metropolitan Area Network (MAN) is high speed network that connect local area network in Metropolitan Area such as city or town and handles bulk of communication activity across the region. 
A MAN typically includes one or more LAN but covers a smaller geographically area than a WAN.

Wide Area Network (WAN) is a network that covers a large geographically area such country or the world. WAN combines many types of media such as telephone lines, cables and radio wave.

Network Architecture

Network Architecture is the overall design of a computer network that describes how a computer network is configured and what strategies are being used. It also known as network model or network design.


Ethernet Cabling

 

You’ll need a sufficient number of Ethernet cables to connect all devices in your network. Most modern networks use Category 5 or 6 cabling, and you can purchase the cables in a variety of lengths. You can even buy cables in different jacket colors to distinguish network devices in a large network. For instance, you can use blue cables for PCs, red ones for servers, and so on.

Modem

 

Your ISP usually provides a modem when you sign up for service, although you can usually purchase your own from a list of approved devices if you choose. A modem exists at the edge of your network and provides bidirectional communication between your ISP and the devices inside your network. Modems come in various forms depending on your service. A DSL modem, for example, connects to your ISP via a telephone line, while a cable modem uses a coaxial link. Most modems also have one or more Ethernet ports that you can use to connect the device to a router, switch, or directly to a computer.

Routers and Switches

A router or switch connects to your modem via an Ethernet cable and provides connectivity to multiple devices. Unlike switches, routers enable you to connect two networks together. For example, if you have one or more branch offices, you can use a VPN-enabled router to provide a secure connection to those offices. Routers and switches with a DSU/CSU provide T1 links to branch offices. Routers have built-in firewalls and advanced features such as Web filtering. Switches are mainly used for facilitating communication within a single office network, although some contain such router-like features as the ability to create virtual local area networks (VLANs). You can also purchase unmanaged switches that need no configuration and work right out of the box.


Mac Address
- hardware address
- It is hardwired or hard-coded onto your computer's network interface card (NIC) and is unique to it

Communication Devices

1.            Hub
-       A non-intelligent device, and has no decision making capability
-       Take the input data from one of the ports and broadcast the information to all the other ports connected to the network.

2.            Repeaters
- A repeater is a device similar to the Hub, but has additional features.
- Used in places where amplification of input signal is necessary
- Regenerates Faded Signals

3. Switch
- A switch is an intelligent device
- Has a decision making capacity
4. Bridges
- A device that connects two local-area networks (LANs), or two segments of the same LAN that use the same protocol

5. Routers
            - A router is a device that forwards data packets along networks. A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP's network.

6. NIC(Network Interface Card)

            - So that the computer can be connected to a network.