8 Thcomputer
8 Thcomputer
8 Thcomputer
Session – I: Introduction:-
A computer network is a collection of connected computers that are able to exchange information.
Advantage of Networking:-
Types of Network:-
LAN (Local Area Network):- A LAN is a computer network that interconnects computers in a
limited area such that as a home, school, computer lab, or office building. Ethernet and Wi-Fi are
the two most common technologies currently used to build LANs.
MAN (Metropolitan Area Network):- A MAN is a computer network that usually spans a city or
a large campus. It interconnects a number of LANs using high capacity backbone technology.
WAN (Wide Area Network):- A MAN is a network that covers a broad area using private or
public network transports. Internet can be considered a WAN as well, and is used by business,
governments, organizations.
Network Topology:- Network topology is the way of a network is a set up or interconnected between
computers in a group of communication. It is a description of the arrangement of computers in a
network. There are different types of topology:-
1. Star Topology:- Each node has a dedicated set of wires connection it to a central network hub.
Hub becomes a central point for isolation network problems.
Advantages:-
Computers can be connected easily.
There is no delay in the network while connecting or removing computers.
Faults can be detected easily.
Parts of a computer can be removed.
Disadvantages:-
2. Ring Topology:- Each computer is connected to two other workstations to form a ring. It is
unidirectional and carries forward.
Advantage:-
Data transfer is faster as the cable is connected between two computers.
Disadvantage:-
A failure in any cable or device breaks the loop and can show down the entire network.
3. Bus Topology:- One cable connects all the computers together and carries data through it
passing it to the requested computer. Data is easily transmitted one at a time per each machine
or workstation.
Advantage:-
It enables easy connection between computers.
It requires less cable length.
Disadvantage:-
4. Tree Topology:- It combines characteristics of linear bus and star topologies. It consists a group
of topologies. It allows for the expansion of an existing network, and enable network to meet
their needs.
Advantages:-
Point-to-point wiring for individual segments.
Supported by several hardware and software vendors.
Disadvantage:-
Session – II:
Components of Network:- Computer network can be set up by connecting computers to each other or
to the central machine called server.
Server:- A server is a computer that provides services to other computers on the network.
Network Interface Card (NIC):- It provides physical connection between network and computer
workstation. NIC are a major factor in determining the speed and performance of a network. It is good
idea to use the fastest card available for the types of workstation you are using. Common NIC are
Ethernet cards and wireless adapters.
Network Operating System (NOS):- Network requires NOS. It is the software that runs or a server and
enables the server to manage data, users, groups, security, applications, and other networking
functions. Types of NOS:-
Networking Channel:- It is also called communications line of link, is the path that the data follows as it
is transmitted from one computer to another.
Transmission Media:- Different physical material are used to transmit data between computers.
Cable:- It is used to connect computers on network. The most commonly used cable is referred as 5
Cable RJ-45. It can be of different types:
1) Twisted wire (Phone Line):- It is easy to install and economical. But it is static and garble.
2) Co-axial Cable (Round insulated wire):- It is not susceptible to interference and transmits faster.
But its disadvantage is heavy and bulky and needs booster over distance.
3) Fibre Optic Line (Glass Fibers):- It is smaller and lighter, faster, No interference. It’s
disadvantage is expensive, harder to install and modify.
Hub:- it is rectangular box that is used as the central object on which computers and other devices are
connected. It is equipped with ports. It appears with 4,8,12 or more ports. You connect an RJ-45 cable
from the network card of an computer one port of the hub.
Switches:- An Ethernet switch is a device that provides a central connection point for cables from
workstation, servers, and peripherals. Switches are:-
Routers:- These are smart switches that are aware of other networks, while hubs and switches are only
aware of the network they facilitate. These are used to connect one LAN to another. They can update
their routing information dynamically. Router can connect to the internet if you have a school LAN.
Broadcast:- For longer distance cables are not practically possible, other method like satellite, radio
wave, micro wavers are used.
Session- I: Introduction:
Visual Basic was designed to be easy to learn and use. This language not only allows
programmers to easily create simple GUI application, but also has the flexibility to develop fairly
complex application as well.
Programming in VB is a combination of visually arranging components of controls on a form.
Visual basic programs are created in IDE (Integrated Development Environment).
The IDE allows a programmer to create, run, debug visual basic programs conveniently. It is
event driven programming language. VB was derived from BASIC and enables the rapid
application development of GUI applications.
VB is evolved from BASIC (Beginners’ All-purpose Symbolic Instruction Code). It is a fairly easy
programming language to learn.
A simplified version of windows involves three key concepts: windows, events and messages.
Window:- A window is simply a rectangular regions with its own boundaries. You are aware
about an explorer window, document window, dialog box. A command button is a window.
Icons, text boxes, option buttons and menu bars are all windows.
Events:- Events can occur through user actions such as a mouse click, key press, through
programmatic control or even result of another window’s actions. Each window can then take
appropriate action based on its own instructions.
This model does not follow a predetermined path – it executes different code sections in
response to events.
Events can be triggered by the user’s actions, by messages from the system of other application
or even from the application itself.
Event determines the sequence in which the code executes.
Your code can also trigger events during execution. For ex changing the text in text box cause
the text box’s change event to occur.
Starting Visual Basic in Windows:- When you run the Visual Basic setup program, it allows you to place
the program items in an existing program group or create a new program and steps are:-
Visual Basic programming is event driven and object-oriented. The unit of object-oriented
programming is the class form which objects are instantiated.
VB programmer can create their own user-defined types called classes. Classes are referred to
as programmer-defined data types.
Each class contain data as well as methods which manipulate that data. The data components of
a class are called instance variable.
An instance of a class is called an object. The focus in OOP with VB is one classes.
Programming the code that responds to these events is called an event-driven programming.
Programmer has the ability to create GUIs by pointing and clicking with the mouse.
Visual programming eliminated need for writing code to achieve different tasks.
All of these codes are provided as part of the project. The programmer creates GUI and writes
code to describe what happens when user interact with GUI.
The user dictates the order of program execution – not the programmer. Using a computer
becomes a much more user-friendly process.
It allows the programmer to create, run and debug windows program in one application without
the need to open additional programs.
New Project Dialog box allows programmer to choose what type of program you want to create.
Each type of project listed in this dialog box describes a group of related files called a project.
The new project dialog box contains three tabs:-
o New for creating a new project.
o Existing for opening an existing project.
o Recent for opening a project that has been previously loaded.
After creating new project the environment consists of various windows, a menu bar and a tool
bar.
The menu bar contains several menus (File, View, Edit, etc).
The tool bar contains several icons that provide quick access to commonly used features.
The project-form window contains GUI where user enters data to the program and where the
programs display its result for users to read.
The form layout windows enables the user to specify the form’s position on the screen when the
program is executed.
Properties of Form1 window display form attributes or properties.
Toolbox contains controls for customizing the GUI. Controls are GUI components such as
buttons, checkboxes.
Toolbox:-
It contains controls used to customize forms. It helps you to write programs faster.
Pointer:- It is not a control which helps to interact with form.
Picture Box:- It is a control that displays images.
Label:- It s a control that displays un-editable text to the user.
Text Box:- It is a control for accepting user input. It displays text.
Frame:- It is a control for grouping other controls.
Command Button:- It is a control that represents a button.
Check Box:- It provides user with a toggle choice.
Option Button:- It is used in groups where only one at a time can be True.
List Box:- It is a control that provides a list of items.
Combo Box:- It is a control that provides a short list of items.
Hscroll Bar:- A horizontal scrollbar.
Vscroll Bar:- A vertical scrollbar.
Timer:- It is a control that performs a task at programmer-specified intervals. It is not visible to
the user.
Drive List Box:- It is a control for accessing system disk drives.
DirList Box:- It is a control for accessing directories on a system.
FileList Box:- It is a control for accessing files in a directory.
Shape:- It is a control for drawing circles, rectangles, squares or ellipses.
Line:- It is a control for drawing lines.
Image:- It is control for displaying images.
Data:- It is a control for connecting to a database.
OLE:- It is a control for interacting with other window applications.
Form Layout Window:- It specifies a form’s position on the screen at runtime. It consists of an image
representing the screen and form’s relative position on the screen. Mouse pointer positioned over the
form image and drag the form to a new location.
Properties Window:-
It display the properties for a form or control. Properties are attributes such as size, position,
etc.
Each control type has its own set of properties like width, height are common to both forms and
controls, while other properties are unique to a form or a control.
Properties are listed either alphabetically or categorical. Scrollbar can be used to scroll through
the list of properties.
Menu Bar:- Commands for developing, maintaining, and executing programs are contained in IDE’s
menus. Following Menu are displayed on the menu bar:
File Edit View Project Format Debug Run Query Diagram Tools Add-Ins Window Help
Toolbar:- Programmer can select menus for certain commonly used commands from toolbar. It is
comprised of pictures called icons that represent commands.
Form:- The form window contains a form named form1, where GUI will be displayed. GUI is the visual
portion of program this is where user enters data to program and display its result for user to read.
Creating your First Application: There are three steps to creating an application in visual basic:-
Creating the Interface:- Forms are the foundation for creating the interface of an application. You
can use forms to add windows and dialog boxes to your application. The first step in building a visual
basic application is to create the forms that will be the basis for your application's interface.
Another simple way to add a control to a form is to double-click the button for that control in the tool
box. It creates a default-size control located in the centre of the form; then you move the control to
another location on the form.
To resize a control:
1. Select the control you intend to resize by clicking it with the mouse. Sizing handles appear
on the control.
2. Position the mouse pointer on a sizing handle and drag it until the control is the size you
choose.
3. Release the mouse button or use SHIFT with the arrow keys to resize the selected control.
To move a control:
o Use the mouse to drag the control to a new location on the form.
o Use the properties window to change the TOP and LEFT properties.
When a control is selected, you can use CTRL with arrow keys to move the control one grid unit
at a time.
o You can "nudge" the control that has the focus by holding CTRL down and pressing the
appropriate arrow key.
o You can change the control's Top and Left properties in the property window.
Setting Properties:-
The next step is to set properties for the object you have created. The properties window provides easy
way to set properties for all objects on a form. Elements of properties windows:
Object box – displays the name of the object for which you can set properties.
Sort tabs - choose between an alphabetic listing of properties or hierarchical view.
Properties list – left column displays all properties for selected object.
1. From the view menu, choose properties or click the properties button on the toolbar.
2. Form the properties list, select the name of a property.
3. In the right column, type or select the new property setting.
All forms in Visual basic have a generic, default icon that appears when you minimize that form. To
assign an icon to a form, set the icon property for that form.
Writing Code:
The Code editor window is where you write visual basic code for you application. Code consists of
language statements, constant, and declarations.
1) Double-click the form of control for which you choose to write code.
2) From the project explorer window, select the name of a form or module, and choose the view
code button.
1) On the editor tab in option dialog box, clear the check box to left of default to full module view.
2) Click the procedure view button in the lower left corner of the code editor window.
Object list Box – displays the name of the selected object.
Procedure list box – lists the procedures of events for an object.
1) In object list box, select the name of an object in the active form.
2) In the procedure list box, select the name of an event for the selected object.
3) Type the following code between the Sub and End Sub statements:
Text1.Text = "My first Visual Basic Program"
Private sub commandClick()
Text1.Text = "My First Visual Basic Program"
End Sub
You will note that the code is simply changing the text property of control named Text1 to read
"My First VB program".
To run the application, choose start from the run menu or click start button on the toolbar or press F5.
Four commands on File Menu allow on to create, open and save projects.
Create a New Project – For creating a new project press CTRL+N and select type of project.
Open an existing project – Press CTRL+O to open an existing project including modules, forms, etc.
Save a Project – It updates the project file of current and all of its form standard, and class modules.
Press CTRL+S to save the file.
This option allow you to set conditions for compiling for your project
DLL Base Address: set base address for the program, overriding the default location for .dll file. OS first
attempts to load program at its specific or default address.
Advanced Optimizations: you can now specify the advanced optimizations using the advanced option
dialog box
Debugging a Form: Form objects are the basic building blocks of a visual basic
applications, the actual windows with which a user interacts when they run any
applications.
Forms have their own properties, events, and methods which you can control their
appearance and behaviour.
Answer the Following Questions –
Session – I (Introduction)
HTML (Hyper Text Markup Language) is the set of markup symbols or codes inserted in a file intended
for display on a World Wide Web page. HTML is formal recommendation by World Wide Web
Consortium (W3C) and adhered to by major browsers.
HTML Tags: HTML markup tags are usually called HTML tags.
Handling Images: Inserting the Image in your web page and manipulating can be done with the
<image></image> tag. GIF, JPEG, PNG, etc. are the popular extension of images are supported by most
of the web browsers.
Types of Image:
Inline Images
External Images
Inline Images: These types of images are automatically downloaded to your browser. You needn't have
to perform any special step to complete its downloading process.
External Images: These images neither are installed nor downloaded automatically. One has to perform
certain action to initiate a downloading sequence for image.
Manipulating the Images: User can manipulate the size, alignment, order & space of the images. We can
use height and width attributes like:
Alignment of Images with Text: You can also give the direction to browser as to image should be
displayed along either text or without text. Various alignment shows in below –
Alignment Work
Top Align the text at the top of the images.
Middle Align the text at middle of Image.
Bottom Align the text at the bottom of the image.
Left Display image or text on left side of window.
Right Display image or text on right side of window.
Border: It is used to place a border around the image. <IMG SRC = "ONE.GIF" BORDER=5>
Space Attribute: We can specify white spaces around image by specifying the Vspace(For above and
below the image) and Hspace(For left and right of the image).
<IMG SRC="File Name" VSPACE="pixel" HSPACE="pixel">
ALT (Alternative): It is optional attribute which is used to represent some information about the image.
Introduction to Links: Links are the most fundamental part of WWW. Whenever you want to creae link,
you need to use <A> tag. You can make images as well. <A> is a container tag.
Linking with websites: The major concept of linking is that we can connect two or more different
websites within particular webpage.
Creating a Table: HTML has a tag called <Table> tag to create table in web page. Table tag generate the
row and column matrix that may contains objects such as text, images, links, etc. Tags are used to create
table that are described below:
<TH>: used to define the data within a cell but mainly used for adding column heading in a cell.
Attributes of Table:
Border: The most popular attributes associated with table tag is BORDER. Used to add border to a table.
Rules: This attribute in <TABLE> tag effects only internal cell borders.
Syntax: <TABLE BORDER = 1 RULES = ROWS> It is used to draw the internal border of rows
<TABLE BORDER = 1 RULES = ROWS> It is used to draw the internal border of columns.
Cell Spacing: It is defined as space between cells and outer edge of the table.
Cell Padding: It denotes space between the contents and edge of a cell.
Form: HTML has number of tags to create Forms. These tags can be used to create complex and
functional user interface. It contains special elements like checkbox, radio button, menu, etc. are also
called controls, and labels on these controls. Different for objects are given belows:
<INPUT>: It is used to declare input field that indicates elements to be displayed on the form. It can be
text field, text area, radio button or checkbox. Type attribute can have any of following values:
a. TEXT: used to create single line text box. Which stores small value.
Syntax: <textarea>______________</textarea>
b. CHECKBOX: these are on/off switches that may be toggled by user.
Syntax: <INPUT TYPE=CHECK BOX>
c. RADIO BUTTONS: used to select only one option from a range of selections.
Syntax: <INPUT TYPE=RADIO>
d. SUBMIT: It is used in form to submit the information filled by user.
Syntax: <INPUT TYPE=SUBMIT>
e. RESET: It is used to clear the contents of the form on one click.
Syntax: <INPUT TYPE=RESET>
f. PASSWORD: It takes the data in asterisks form which contains sensitive data.
Syntax: <INPUT TYPE=PASSWORD>
g. NAME: on submitting a form all information entered by user is transferred to server.
Information given by user is stored in given NAME attribute.
Syntax: YOUR NAME: <INPUT TYPE=TEXT NAME="FIRST">
h. MAXLENGTH: it defines the length of field. I fixes the maximum no of characters that a
user can enter in a field.
Syntax: YOUR NAME: <INPUT TYPE=TEXT MAXLENGTH=12 NAME="FIRST">
i. SIZE: it specifies the length of field that should be visible on screen.
Syntax: YOUR NAME: <INPUT TYPE=TEXT SIZE=10 MAXLENGTH=12 NAME="FIRST">
j. SELECT: it is used to create menu on the web page. The menu can be either pull-down
or scrollable menu. There is one other tag called <option> tag, which is used to define
option of menu.
Syntax: <SELECT NAME="LANG">
<OPTION VALUE="C">C</OPTION>
<OPTION VALUE="C++">C++</OPTION>
<SELECT NAME="LANG" SIZE=2>
Answer the Following Questions:
1) What is HTML?
HTML (Hyper Text Markup Language) is the set of markup symbols or codes inserted in a file
intended for display on a World Wide Web page. HTML is formal recommendation by World
Wide Web Consortium (W3C) and adhered to by major browsers.
2) Explain Various Types of Images?
Inline Images: These types of images are automatically downloaded to your browser. You
needn't have to perform any special step to complete its downloading process.
External Images: These images neither are installed nor downloaded automatically. One has to
perform certain action to initiate a downloading sequence for image.
3) Explain all the available attributes of <IMG> tag.
Height, Width, Border, Hspace, Vspace, Iframe, Alt, Name, href, src are the attributes of IMG tag.
4) Define Linking in detail.
Links are the most fundamental part of WWW. Whenever you want to creae link, you need to
use <A> tag. You can make images as well. <A> is a container tag.
<a href = http://www.google.com>Here</a> to open google website.
5) Define all the attributes of <TABLE> tag.
Border: The most popular attributes associated with table tag is BORDER. Used to add border to
a table.
Rules: This attribute in <TABLE> tag effects only internal cell borders.
Cell Spacing: It is defined as space between cells and outer edge of the table.
Cell Padding: It denotes space between the contents and edge of a cell.
6) Explain the purpose of using Forms?
Forms are widely used to take the data or information from user and sent to the server. HTML
has number of tags to create Forms.
7) Explain forms and create a sample form that uses all the attributes available.
HTML has number of tags to create Forms. These tags can be used to create complex and
functional user interface. It contains special elements like checkbox, radio button, menu, etc. are
also called controls, and labels on these controls.
Ex: Your Name: <INPUT TYPE=TEXT SIZE=10 MAXLENGTH=12 NAME="FIRST">
<SELECT NAME="LANG">
<OPTION VALUE="C">C </OPTION>
<OPTION VALUE="C++">C++</OPTION>
Session – I (Introduction)
A business can use various means to keep its operation records. For ex it can keep the records on the
paper or in a computer system.
What is Database: A database is simple a computer based record keeping system. The collection of the
data in a particular format is termed as database. The data in database is organized in systematic way
such as tabular format. An Example of database is a Student Record System kept by special office.
Utility of Database: it has several notable advantages over manual record system.
1. Data Standardization: In database useful data is always collected and stored in an orderly
manner.
2. Synthesis of Information: The main intention of a database is to provide information number of
application as and when required.
3. User flexibility: The main advantage of using computer-based database is its user flexibility. The
right information can be retrieved in required format. A database can handle grouping and
regrouping tasks easily.
4. Data integration: it is very important that same data items read identically across all the
departments should be stored in one central system.
5. Sharing data: data sharing is opposite side of data integration. It helps the business to reduce
the processing cost and improve the communication among departments.
Electronic data processing: When electronic system like computer etc. are used for data processing, the
system is called as Electronic Data processing. On the basis of raw data and by giving commands or
instruction to the computer, we can generate desired reports.
Function of DBMS: The function of data management system may be broken into five categories.
a) File Creation: The term file structure refers to the manner in which we design the structure. We
add data by adding one record at a time.
b) Adding records: when adding records to a file, we enter data into the fields. Many DBMS's
allows appending records to a file by accessing data from another file.
c) Delete records: Deleting removes records from the file, no any file processing operation are
used.
d) Modifying a file: Modifying means to change its structure. You may wish to add or delete fields
to records in a file or change width of one or more fields.
e) Selecting Records: we may wish to examine all the records in a file with a certain characteristic.
The ability to select those records is an essential capability of any DBMS.
Now, this is a single record of a database customer. DBMS stores data in tabulated form.
FILE
RECORD
DATA
A database is collection of files that acts as a single centralized data bank for many processing
applications.
Session- I (Introduction):
Flash, popular authoring software developed by Macromedia, is used to create graphic-based animation
programs with full-screen navigation interface, graphic illustration. The content is then saved as file
name SWF extension.
Open the flash program from File Menu, click New. Select Action Script 3.0 and then click OK.
Click on window menu. Click the toolbar option and select Edit Bar. Place a checkmark beside Timeline,
Tools and Library.
Layers: It is a good idea to use separate layers for sound files, actions, frame labels and frame
comments. This helps us to find these items quickly when we need to edit them.
Creating layers: after creating it appears above selected layer. A newly added layer becomes the active
layer. To create Layer:
Masking: It is easy and it allows creating interesting visual effects. It is familiar techniques in computer
graphics.
Prepare the image for flash with proper size ha will fit to the size of the text. We have selected
the following image.
Open flash and import image on the stage using File>Import>Import to Stage, or just press.
For this particular animation, we don't need to convert the image to symbol because we are not
going to make any changes to the image.
Press F5 to 60th frame to keep an image stationary for 60 frames.
Create new layer in the timeline and type the text at the top. Try to use thick font to get better
effect. Keep it selected.
Convert the text into graphic symbol.
Select 60th frame on the top layer where the text is placed and press F6 to insert the keyframe.
Drag the text down and apply motion tween.
If you play this animation it will be regular, simple animation with a text moving over the image.
Right click on the top layer where the text animation is situated and select Mask.
The layer in the timeline will show the changes indicating masking.
The image will be displayed only where the text is overlapped.
Export movie using File>Export>Export Movie.
Open a new flash file (Ctrl+N). New document window will appear. Select General panel and
choose type: Flash Document. Press OK.
If you Timeline window is not open, press (Ctrl+Alt+T).
Now you can see a single layer called Layer1 in your Timeline Window.
Create Shape Tween on Layer 1.
Single click on Add New Layer button.
A new layer gets added. By default it will be named Layer2.
Create a Motion Tween on Layer2. After creating two layers, your timeline will look something
like the one shown alongside.
Now press (Ctrl+Enter) to view your Motion Tween.
In the timeline window, right click on the 50th frame and choose insert keyframe. Select the
movie clip and change the blur filter X and Y values to 0 to remove the blur effect.
Select any frame between Frame 1 and 50 and select motion for the between pop-up menu in
the Property inspector.
Press Ctrl+S to save your changes.
Zoom In Zoom Out Flash Animation With Fading Effect: Steps to Follow:
Open a new flash file (Ctrl+N). The New Document window will appear. Select General panel
and choose Type: Flash Document. Press OK.
If your Timeline window is not open. Press (CTRL+ALT+T). Now , you can see a single layer called
Layer1 in your Timeline Window.
Select the first frame. Import a background image onto stage, preferably an image of a street by
clicking on File>Import>Import to Stage, or just press Ctrl+R.
Press F8 to convert this images to a symbol. Name this symbol background_gr and choose
graphic behaviour. Press OK. Name this Layer "bg". On the 35th frame press F6 to insert a new
frame.
Select the second layer. Import an image or create a shape of a car using shape tools from the
tools box. Press F8 to convert this image to a symbol. Name this symbol car 1_m and choose
movie clip(F8). Press OK. Name this Layer car1.
Select the image (car 1_m) > right click > edit in place. Now, you will come to a new timeline
windows called Symbol2.
On Frame1 of symbol2 convert the image to a graphic (car 1_gr). Go to the Properties Bar >
Color > Alpha > 0%. In Frame5 insert a new keyframe (press F6) and change Alpha to 100% and
make the image small.
Right click in between Frame 1 and Frame 5 and press motion tween.
Add one more keyframe in Frame20. In this frame make the image (car 1_gr) bigger and move it
out.
On Frame25 insert a new keyframe and change Alpha to 0%. Insert motion tween in between
frame 5 – 20 and frame 20 – 25.
Now, press (Ctrl+Enter) to view your motion between.
Remember to inert only ONE symbol/image in ONE new layer only.