Uploaded by priyam.rp.gts

12-QuestionBank

advertisement
UNIT -1
COMPUTER NETWORKING
S.N
o.
Concepts
1.
Introduction of
Network
Elementary
Terminology of
Networks
2.
Degre
e of
Import
ance
*
Level of
Assignme
nt
Errors generally committed
L1
**
L2, L3
Correct use of technical word in definition , lack
of express the objective in Point wise form
Server definition required client side aspect,
correct layout of nodes in network, formation of
MAC address with no. of digits in each section,
not divide domain in 3 parts, no of digits in IP
address
3.
Network
Topologies
***
L1, L2, L3
Factor of topology clearly not in point wise,
layout of topology mix up with others, lack of
understanding the concept, misunderstanding
in star and ring topology.
4.
Types of
Networks
***
L2, L3
Technical word should be differentiate between
two types of network, proper example not given
during explanation
5.
Transmission
Media
*****
L1,L3
Lack of knowledge of different pair of cables,
formation of cabling with diagrams, technical
word not used in definition and difference
6.
Network Devices
**
L1, L2
Formation of connecting of two devices,
misunderstanding bridge, gateway and router,
lack of using technical word
7.
Network Security
***
L1,L2, L3
Active protection and preventive measures mix
up in every aspect, examples not given for
explanation.
Level - 1
1. Define a network.
2. What is MAC Address?
3. What is IP address?
4. What are the various types of networks?
5. What is meant by Topology? Name some popular topologies.
6. Define Hub.
7. Define switch.
8. What are the goals of network?
9. Discuss and compare various types of networks?
10. Explain mostly used topologies.
11. What are hubs? What are its types?
12. Discuss repeater.
Level – 2
1. Write two advantages of networks.
2. Write two disadvantages of networks.
3. What is communication channel? Name the basic types of communication channels
available.
4. What is domain name? How is it alternatively known?
5. What is the difference between MAN and WAN?
6. What are the limitations of star topology?
7. Write the disadvantages if twisted pair cables.
8. Write the applications of network?
Page 1 of 60
9. Advantages and disadvantages of the followings :
a. optic fiber
b. coaxial cables
c. twisted pair cables
d. radio waves
e. microwaves
f. Satellites
10. is the role of a switch in a network?
11. What is denial of services attacks?
Level – 3
1.
2.
3.
4.
5.
6.
7.
8.
What are the factors that must be considered before making a choice for the topology?
What are the similarities and differences between bus and tree topologies?
When do you think, ring topology becomes the best choice for a network?
Write the two advantages and two disadvantages of star topology in network.
What do you understand by domain name resolution?
What are communication channels? Discuss various channels available for networks?
What are common threats to network security?
How can you prevent/ counter threats of network security?
UNIT 2
OPEN SOURCE CONCEPT
SNO.
CONCEPT
1
OPEN SOURCE BASED
SOFTWARE
2
3
4
DEGREE
OF
IMPORTA
NCE
**
LEVEL
OF
ASSIGN
MENT
L1
TYPES OF STANDARD
*
L1
COMMON OPEN STANDARD
FORMATS
INDIAN LANGUAGE COMPUTING
***
L2
**
L3
ERRORS
GENERALLY
COMMITTED
PROBLEM IN
DIFFERENTIATIO
N OF FREE
SOFTWARE,OPEN
SOFTWARE ETC.
DONOT KNOW
ABOUT
PROPRIETARY
SOFTWARE
PROBLEMS IN
OGG VORBIS
PROBLEMS IN
ASSIGNMENT OF
CODING
LEVEL 1
Q1.What is free software and open source software?
Q2. Explain different types of standard?
Q3.What is the advantages of open standard formats?
Q4. Explain some common open standard?
Q5. Write a note on Indian Language Computing?
Q6.What is ODF format?
Q7. What are fonts? Explain with example.
Q8.What is Unicode? What is ISCII?
Q9.What is different font’s categories?
LEVEL II
Q1.What is the importance of ISCII in term of Indian Language Computing?
Q2.Explain different file extension:
1) Odt ii) ods iii) odp iv) odg v) odb.
Page 2 of 60
Q3. Write Short notes on MOZILLA.
Q4.Write short notes on APACHE.
Q5.Write short notes on POSTGRE SQL.
Q6.Write short notes on PHP.
Q7.What are the dangers of Proprietary Standards?
LEVEL III
Q1.In how many different ways can you type Indian script on a computer?
Q2.What is openoffice.org?
Q3.What is LAMP?
Q4. Write a note on Pango ?
Q5.The following is a message encoded in ASCI code. What is the message?
Q6.What is the significance of Unicode?
Q7.What is phonetic text entry?
Q8.Why do we prefer Ogg Vorbis ?
Q9. Explain W3C.
UNIT-II
Java GUI Programming Revision Tour – I
S. No.
Degree of
Importance
Netbeans Java **
IDE
Level
2
Basics of GUI
*
L1
3
Tokens
*
L1
4
Data Types
***
L1,L2
5
Variables
*****
L2, L3
6
Text
Interactions
Operators in
Java
Expressions
****
L1, L2
*****
L1, L2
****
L1, L2,L3
Programming
Constructs
*****
L2, L3
1
7
8
9
Concept
L1,L-2
Errors generally
committed
Not use
appropriate
component
Wrong
properties used
Wrong
identification
Appropriate data
types not used
Wrong
Declarations
Proper syntax
errors
Wrong
evaluation
Semicolon not
used
Loop termination
errors
References
Level - 1
Que1. Explain the term RAD?
Que2. What is event?
Que3. What is message?
Que4. What are properties?
Que5. What is an identifier?
Que6. Define Keyword?
Que7 What is GUI Programming?
Que8. What do you understand by fall through?
Que9. Name the character set supported by Java?
Que10. Identify the valid keywords:Class, new, message , else, event, try
Page 3 of 60
Level – 2
Que1. . What do you understand by jump statement?
Que2. Write loops that display the numbers from 51 to 60.
Que3. What is the significance of Break statement in a switch statement?
Que4. What are the operators? Different types of operators available in Java.
Que5. The expression 8%3 evaluates to ____________
Que6. Differentiate between = and == operator in java?
Que7. Name the two type of selection statement available in Java.
Que8. Differentiate between while and do while loop of Java giving suitable examples.
Que9. Explain the term type casting?
Que10. What are primitive data types? Name the various primitive data type available in
Java.
Level -3
Que1. Expand the term API?
Que2. What is the relationship of properties, methods and events?
Que3. What is event driven programming?
Que4.What are the three constructs that govern statement flow?
Que5. Which elements are needed to control a loop?
Que6. How is the if else if combination more general than a switch statement?
Que7. What is the difference between entry controlled and exit controlled loop?
Que8. How many times will the following loop get executed and what will be the final value
of the variable I after execution the loop is over.
int i = 5;
do
{
I += 3;
System.out.println("I = "+i);
i = i + 1;
}
while (i >= 9);
Que9. Write a program to print the factorial of a given number?
Que10. Que10. What will be the value of p=p* ++j where j is 22 and p=3 initially?
Java GUI Programming Revision Tour – II
S. No.
Concept
Degree of
Importance
Level
1
GUI
Programming
**
L1,L-2
2
Frame
**
L1,L2
3
Push Buttons
**
L1
4
Labels
***
L1,L2
5
Text fields
***
L2, L3
6
Radio Buttons
***
L1, L2
Errors
References
generally
committed
No complete
definition with
example
Diagram
never shown
Coding and
properties
setting
Coding and
properties
setting
Method
written not
properly
Not properly
defined
Page 4 of 60
7
Text Area
*****
L1, L2
8
Check Boxes
**
L1, L2.L3
9
Combo box
*****
LI,L2, L3
10
List
***
LI,L2, L3
UI properties
setting
Coding and
symbols
using
Command
written
Programming
not proper
done
Level – 1
Que1. What command do you need to write in actionPerformed() event handler of a button,
in order to make it exit button
Que2. What method would you use, in order to simulate a button’s (namely OKBtn) click
event, without any mouse activity from user’s side.
Que3. How would you set a label to have both an image as well as text?
Que4. What is combo box?
Que5. Name the class used to create the following:
(i) a list control (ii) a combo box control
Que6. What would be the name of the event handler method in the ListSelection listner
interface for a list namely CheckList to handle its item selections
Que7. By default, a combo box does not offer editing feature. How would you make a
combo box editable.
Que8. What does getPassword ( ) on a password field return
(a) a string (b) an integer (c) a character array
Que9. What is RAD programming?
Que10. What is IDE? Name two IDE for Programming in java.
Level – 2
Que1. What is a button group? What all controls can you put in it?
Que2. Why java is called a platform independent language?
Que3. Elaborate the java Compilation process.
Que4. Why do we write a comment in a program? What are the two ways of writing
comment in a java Program?
Que5. What is a syntax error in context of a program? Give an example.
Que6. Text entered in a jtextField is of String type. A programmer wants tostore it in a
variable of type integer. Is it possible how? Explain
Que7. What is IDE? Name two IDE for Programming in java.
Que8. Name any two types of Tokens available in Java
Que9. Write the purpose of Switch Statement with the help of an example. Which Java
Statement can be used in place of switch statement? In the switch statement, what
happens if every case fails and there is no default option?
Que10. What is the purpose of ‘break’ statement in java?
Level – 3
Que1. What is a list? How it is different from combo box
Que2. What is the difference between a text field and a password field when both can
obtain text from user?
Que3. Name two containers for each of the following categories
(i) top level (ii) middle level (iii) component level
Que4. What are containers or container controls?
Page 5 of 60
Que5. What do you understand by message and an event
Que6. Define GUI .How can you create a GUI application on java platform
Que7. Assume the following interface built using Netbeans used for bill calculation of a icecream parlor. The parlor offers three verities of ice-cream – vanilla, strawberry,
chocolate. Vanilla ice-cream costs Rs. 30, Strawberry Rs. 35 and Chocolate Rs. 50.
A customer can chose one or more ice-creams, with quantities more than one for
each of the variety chosen. To calculate the bill parlor manager selects the
appropriate check boxes according to the verities of ice-cream chosen by the
customer and enter their respective quantities.
Write Java code for the following:
a. On the click event of the button ‘Bill’, the application finds and displays the total bill of
the customer. It first displays the rate of various ice-creams in the respective text fields.
If a user doesn’t select a check box, the respective ice-cream rate must become zero.
The bill is calculated by multiplying the various quantities with their respective rate and
later adding them all.
b. On the Click event of the clear button all the text fields and the check boxes get cleared.
c. On the click event of the close button the application gets closed.
Que8. What are the various types of dialog options supported by jOptionPane?
Que9. Name four methods associated with jOption dialog.
Que10. Explain the various possible values for Option type property of jOptionPane dialog.
UNIT-II
Chapter- 5 JAVAGUI PROGRAMMING REVISION TOUR-III
S.No.
Concepts
Objects
Degree of
Importance
*
Levels of
Assignment
L1
1
2
Classes
*
L1
3
Methods
***
L3
4
Use of keyword
Void
Actual and
formal
Parameter
Constructor
*
L1
**
L2
**
L2
5
6
Errors generally
committed
Definition is not cleared in
real world
Students is get
complexed in declaration
of private, public and
protected part
How decide parameters
and signature
When students used void
keyword
How can you differentiate
actual and formal
parameter in real world
limitation of constructors
Page 6 of 60
7
This Keyword
***
L3
8
Class Methods
and Instance
Methods
**
L2
e.g. of real world , where
this using
Static keyword is using
where
LEVEL-I
1. In Java, Methods reside in ___________.
2. Can every class be referred to as a user defined data type?
3. A________ Constructor takes no Arguments.
4. What is a parameterized constructor? How is it useful ?
LEVEL-II
1. At what time is the constructor method automatically invoked?
2. How do we invoke a constructor?
3. How is call –by –value method different from call- by- reference method?
LEVEL-III
1.
2.
3.
4.
List some of the special properties of the constructor methods?
Differentiate between Composite Data Type and User- Defined Data type.
Differentiate between Software Objects and Real world Objects?
What is ‘this’ OBJECT?
Chapter –Six
More about classes and libraries
Sr No
Concepts
Degree
of
Importan
ce
**
Levels of
Errors generally committed
Assignmen
t
1
2
Controlling access
to members of
class
Java libraries
***
L1,L2
3
Working with string
*****
L1, L2,L3
Working of methods not explained
correctly , difference between string
buffer and string data type not cleared ,
working of comapreTo() & equals( )
methods
4
Using math library
*****
L1,L2,L3
Argument passed to method not
mentioned , return type not mentioned
5
packages
*
L1
Packages used for methods not known
Reference :
L 1,L3
Definition not cleared , scope for each
access specifier is wrongly explained ,
example not given
Improper Usage for Method ,
argument passed to each method not
specified correctly,
“Informatics Practices “ by Sumita Arora
“Informatics Practices “ by Reeta Sahoo
Question bank by Sumita Arora
Page 7 of 60
Level 1
2. What is the difference between length( ) and capacity( ) string function?
a. Explain the following string functions available in Java giving suitable examples in
each case:
b. Length ( )
c. substring ( )
d. concat ( )
e. trim ( )
f. toUpperCase ( )
g. toLowerCase( )
3. Name any four packages available in java.
4. What is an abstract class?
5. What is the difference between an abstract class and an interface?
6. How compareTo() & equals() differ from each other
7. Explain indexOf(char ch)
8. Explain power()
9. Explain the library function append()
10. Explain charAt(int a)
Level 2
1.
2.
3.
4.
5.
What is a package? Why do we design a package?.
What members of a class out of private, protected and public are inheritable?
When do we declare a method or class ‘final’? Explain with example
When do we declare a method or class abstract? Explain with example
What will be the contents of jTextField1 and jTextField2 after executing the followingcode:
String s = "ABC Micro Systems";
jTextField1.setText(s.length()+" ");
jTextField2.setText(s.toLowerCase());
6. What will be the contents of jTextField1 , jTextField2 , jTextField3 after executing the
followingcode
jTextField1.setText(Math.power(2.3));
jTextField2.setText(Math.round(2.3));
7. What will be the contents of jTextField1 , jTextField2 , jTextField3 after executing the
followingcode
String s1 = "ABC ";
String s2 =” Microsystem”
jTextField1.setText(s1.concat(s2));
jTextField2.setText(s1.length());
jTextField3.setText(s2.length());
8. What will be the contents of jTextField1 after executing the followingcode
String s1 = "ABC ";
jTextField1.setText(s1.replace (‘A’ , ‘H’));
9. What will be the contents of jTextField1 after executing the followingcode
String s1 = " ABC Microsystems";
jTextField1.setText(s1.trim());
10. What will be the contents of jTextField1 , jTextField2 , jTextField3 after executing the
followingcode
String s1 = "ABC ";
jTextField1.setText(s1.indexOf(‘C’));
Page 8 of 60
Level 3
1. Write the code for an application count button that counts the occurrence of a particular
character in a string. 3 mark
2. Write the code that changes the first letter of each word in a textbox touppercase and
display the modified sentence in the same textbox. 4
3. An application that converts a string into its reverse and print its in RevTF. write the
suitable code for the application
3 mark
4. find output if ”abc”is passed as argument
Public static void func(string s1)
{
String s = s1+”xyz” ;
System.out.printlln(“ “ + s1);
System.out.printlln(“ “ + s);
}
5. find the output
stringBuffer city = new stringBuffer(“Madras”);
stringBuffer string = new stringBuffer(“ ”);
string.append(new string(city));
string.insert(0 , “Central”);
string.out.println(string);
6. What will be the contents of jTextField1 and jTextField2 after executing the followingcode:
String s = "ABC Micro Systems";
jTextField1.setText(s.replace( ‘r’ , ‘t’);
7. What will be the contents of jTextField1 and jTextField2 after executing the followingcode:
String s = " Informatics Practices ";
jTextField1.setText(s.toUppercase());
jTextField2.setText(s.trim());
8. What will be the contents of jTextField1 and jTextField2 after executing the followingcode:
String s = " Informatics Practices ";
jTextField1.setText(s.conact(“ Practicals”));
9. What will be the contents of jTextField1 and jTextField2 after executing the followingcode:
String s = " Informatics Practices ";
jTextField1.setText(s.lastIndexof(“s”);
10. What will be the contents of jTextField1 and jTextField2 after executing the followingcode:
String s = " Informatics Practices ";
jTextField1.setText(s.substring( 0, 3));
Chapter -7
Inheritance
Sr.No Concept
Importance Levels Errors
1
Definition & need
***
1,2,3
Generally no errors
2
Types of Inheritance
**
1,2
Confusion between Multilevel & Multiple Inheritance
3
Base & Derived Class
*****
1,2,3
4
Visibility Modes
****
1,2,3
5
Function Overloading
***
1,2,3
Improper definition of sub
class
Difference between
protected and public visibility
modes
Confusion in type of
Page 9 of 60
arguments
6
Function Overriding
***
1,2,3
7
Abstract Class &
Methods
Interfaces
**
2,3
Which of the function will be
called by which object
Generally No errors
**
2,3
Generally No errors
8
Level 1
1. What is Inheritance & What is the need of inheritance?
2. Name the various type of inheritance available in java.
3. Define the concept of Base Class and derived class.
4. What are the visibility modes in java?
5. What is the difference between function overloading and function overriding?
6. What is abstract class & methods?
7. Does Java support Multiple Inheritance? Yes or No.
8. What is the difference between protected and public visibility mode.
9. What is the default visibility mode if nothing is specified?
10. What is the difference between method prototype and method signature
Level 2
1. Name the various type of inheritance available in java.
2. Can a derived class have access to private members of base class?
3. When do we declare a method or class ‘final’?
4. What is an abstract class?
5. Differentiate between Interface and Multilevel Inheritance.
6. What is the sequence of constructor calling in inheritance?
Level 3
1. Why was the concept of inheritance introduced in object oriented Languages? Write the
Syntax and its body key points.
2. When do we declare a method or class abstract?
3. Differentiate between an abstract class and an interface?
4. Differentiate between Protected and Friendly access specifiers ?
5. Write a student class with following specifications: Two private variables : first name, last name
 Constructor with two arguments
 Void Method printdata() to print first+lastname



Write a Graduate class that inherits from student class
Add private variables, Stream, Degree
It must have a constructor method
Method PrintGrade() to print Stream, Degree along with inherited first and last name.
6. When an overridden method is called through a Super class reference which version of
the method is executed ?
Page 10 of 60
Unit -2 ( Programming)
Chapter – 8 ( GUI Dialogs and Tables)
SNo Concept
1.
2.
3.
jDialog
jOptionPane
jOptionPane
DialogTypes
4.
Creating
jOptionPane
programatically
Tables
Table Model
5.
6.
Degree of
Importance
*
**
*
Level of
Assigment
L1
L2
L 1, L2
***
L 2, L 3
*
*
L1
L1
Error
Reference
Error In Designing
coding
Problem in using
value/code for the dialog
type
Classes required to be
imported
Use of methods
Problem of the
DefaultTableProperty
Level 1:
1.
2.
3.
4.
5.
6.
7.
What is use of Dialog window?
Which control allows display and render data in row and column format?
Can you insert/remove rows from an existing table?
What is JOptionPane?
What is jTable Control?
How to disappear the dialog window?
Explain all the Dialog Types supported by jOptionPane?
Level 2:
1.
2.
3.
4.
5.
6.
7.
What do you know about jDialog?
Which Buttons will be shown by Input Dialog by Default?
Write code to remove first & last row of a table?
Write the import statement required for using jOptionPane Class?
Name the method which helps to display a dialog box?
Write the code to add two floating point numbers and display in dialog box.
Name four methods associated with jOption dialog.
Level 3:
1.
2.
3.
4.
5.
Explain all the elements of JOptionPane?
Explain Table-Model alongwith its significance?
Create an application to take input from the user and display the sum when user input 0.
Explain the use of JOptionPane.QUESTION_MESSAGE dialog.
Which predefined dialog types of JOtionPane class does not return anything?
UNIT 9:DATABASE CONNECTIVITY TO MYSQL
SNO
CONCEPT
IMPORTANCE LEVELS
1
2
JDBC ODBC Definition
Classes Used for
Databases Connectivity
***
*
1
2
3
Methods to perform
operations like display
,delete ,insert and
update etc.
*
3
Errors
Use of proper words
Appropriate classes
should be used
according to the
description
Take care of syntax,
indentation
Page 11 of 60
Level 1:
Q1.Define database connectivity?
Q2.What is JDBC? How it is different from ODBC?
Q3.Defineresult set?
Q4.Which method will be used to obtain the following type of data from a result set?
Intdata, float data, string data, at data
Q5.Name some Result Set Methods?
Level 2:
Q1.Mention the tasks performed by JDBC?
Q2.What is Connection? What is its role?
Q3.What will Class.ForName do while loading drivers?
Q4.Explain how can you make the connection?
Q5.What does statement object do?
Q6.How can you load the drivers?
Level 3:
Q1. Create a Java GUI application to displaythe records of employees of table DEPT.
Q2. Create a Java GUI application to perform Update and delete operations using DEPT.
Q3. Name the class that provide an easy and convenient way to display standard dialogs
for
Posting a information, asking a question or prompting for simple user input. How can
import
it in your program/ application?
.UNIT -2
WEB APPLICATION DEVELOPMENT
S.N
O
Levels of
Assignme
nt
L1
Errors generally committed
1
Degree of
Importanc
e
Web Browser ***
2
Web Server
L1
Students does not understand the
actual concept of or definition of
Web Browser and write wrong
definition
3
Web Address **
and URL
L2
Students generally does not give
details answer of this question with
example
4
Communicati
ng with web
server
Client Server
Application
*
L3
Students generally have no idea
about this topic
**
L3
Students Does not give right
definition of this topic
5
Concepts
***
Example not given or sometimes
students mix the definition with web
server
Page 12 of 60
LEVEL-1
1. What do you mean by web browser?
2. Differentiate between web browser and web server.
3. Explain the concepts of Client Server Computing by giving example.
4. Define Web site.
5. Expand the following terms
(A) HTTP
(B) WWW (C) URL
(D) CGI
6. Dynamic documents sometimes referred to as _____ dynamic documents.
7. _____is a technology that creates and handles dynamic documents.
8. In a URL the ____is the full name of the file where the information is located.
9. _____ is a repository of information linked together from points all over the world.
10. In a URL, the ____ is the computer on which the information is stored.
LEVEL-2
1. What is a URL? What are its Components? Explain with the help of Example.
2. Why we use the CGI scripts and Server side scripts Explain?
3. How can you differentiate other servers on the internet from World Wide Web?
4. Nisha wants to upload and download files from/to a remote internet server, write
the name of the relevant communication protocol, which will let her do the same.
5. Bhupesh is confused between the terms Domain Name and URL. Explain the
difference with the help of appropriate examples of each.
LEVEL-3
1. What is a protocol? How does protocol affect the Internet?
2. Explain Advantages of using dynamic web pages over static web pages.
3. What do you mean by DNS?
4. Which protocol is used for transferring hypertext document on the internet?
5. Rajesh says that the following No. indicate an address 208.77.1888.166
What is above address called? To which object / device is it assigned?
Unit -2 ( Programming)
Chapter –11 ( HTML:-Basic HTML elements)
SNo Concept
1.
2.
3.
4.
5.
HTML and its
capabilities
Writing HTML
Documents
Container and
Empty Elements
HTML tag
structure
Basic HTML
Tags
Degree of
Level of
Error
Importance Assigment
**
L1
Concept clarity is not there
**
L2
Improper use of tags
*
L1,L2
Tags not properly closed
*
L1
Problem in syntax
***
L2,L3
Proper use not known
Reference
Level 1:
1.
2.
3.
4.
5.
6.
What is the purpose of HTML?
In which section of an HTML do you enter the TITLE element?
HTML tags are case-sensitive or not?
Write the extension of HTML file?
What is the purpose of using BODY tag?
Write HTML code to set the bgcolor as “red”.
Level 2:
Page 13 of 60
1. How can an image be inserted in a web page?
2. What is the difference between container and empty tags?
3. List the types of alignments applied to paragraphs.
4. Write any two attributes used with BODY tag.
5. Which HTMLtag and corresponding attributes are used to add an image as background of an
HTML document.?
6. How is <P> tag different from <BR> tag?
Level 3:
1.
2.
3.
4.
5.
6.
7.
What is a BASEFONT tag? Name any two attributes of this.
Differentiate between BASEFONT and FONT tag?
How is HEAD tag different from <BODY> tag?
How can you give comments in HTML?
What is the purpose of using the tag <H1>…<H6>?
Which HTML command is used to display the following in your web page- X2 + Y2 ?
What is the difference between Colspan and rowspan?
Chapter 12 : HTML-II (Lists ,Tables and Forms)
S.No Concept
Degree of Importance
1
Lists
***
Levels of
Assignment
L1,L2
2
Tables
****
L2,L3
3
Forms
****
L3
Errors
Use <UL>tag when
<OL>tag is required
Confuse when settings are
to be applied to the whole
table and when to a
particular cell.
Students Do not give
proper formatting to the
form.
Level 1:
1.
2.
3.
4
5
6
7
8
9
10
What are the different forms of List used in HTML? Name them.
What is a <OL>…</OL> tag? Name any two attributes used with this tag.
What is CELLPADDING?
What is CELLSPACING?
What is the purpose of using TYPE attribute used in Lists?
What is the purpose of using START attribute used in Lists?
What is <THEAD> tag?
What is rowspan and colspan attributes?
What is Align attribute?
What is unordered lists?
Level 2:
1.
2.
3.
4.
5.
6.
7.
What is table? What are the basic commands for creating a table?
What is FORM tag? Explain with example.
What is INPUT tag? Explain with example.
What is the syntax of creating Radio box?
What is the syntax of creating Check box?
What is the Syntax of creating Text Area?
What are <DL> ?
Page 14 of 60
Level 3:
1. What for Rowspan and Colspan attributes used?
2. How is form processed when the form is submitted?
3. What are Submit and Reset Buttons?
4. What is the difference between GET and POST Methods?
5. Create the following form:
Page 15 of 60
UNIT III
Chapter-13 EXTENSIBLE MARKUP LANGUAGE
Level-I
1. What is a Markup language?
S.No
.
1
2
3
4
2.
3.
4.
Concepts
Degree of Level
Importan
ce
**
L-1
Introduction to
XML
XML vs. Other
****
Languages
Feature of XML **
Working in XML **
What is XML?
What is the use of XML?
What is meta language?
L-1, L2
L-2
L-3
Errors Generally committed
The definition of HTML,XML,SGML May be
Interchange
Students Confused in Properties of HTML
and XML
Student confused b/w diff language futures
Error can occurred in tag writing
Level-2
1. Name some markup language based on XML
2. Compare HTML and XML Briefly
3. What is the features of XML
4. Write the name of two important software that validate or process XML document are?
Level-3
1. Create XML markup to represent a massage sent on October 9, 2009 to Rehana and
Joseph by Gurpreet. The message is “Project successfully completed”.
2. Consider the following XML document. Check this for well-formed ness.
<email>
<to>Mrs.Gohil
<body> Hello there How are today?</to>
</body>
<sender> Dyan pearl</Sender>
</email>
Page 16 of 60
My SQL Revision tour
CONCEPT
DEGREE OF
IMPORTANCE
LEVEL OF
ASSIGNMENT
ERROR
1
Different data models
*
L1
2
Relational model
terminology
****
L1,2
3
4
Introduction to MySQL
My SQL and SQL
**
**
L1
L1
5
MySQL elements
*
L1
6
Assessing Database in
MySQL
Creating tables in MySQL
**
L1,
***
L1,2
8
Making simple queries
through Select Command
*****
L1,2,3
Give proper technical
words
Confusion about the
different terminology. such
as candidate key and
alternate key.
Generally no errors
Give proper technical
words
Give proper technical
words
Do not know how enter in
the data base
Problem in giving data type
and column name
Generally in combining two
conditions and pattern
matching
9
10
**
*****
L1,2
L1,2,3
11
12
My SQL Function
Creating table with SQL
Constraints
Viewing Table structure
Modifying Data from table
*
*****
L1
L1,2,3
13
Altering tables
*****
L1,2,3
14
Dropping tables
**
L1
SNO
7
Check and default
constraint
Generally no errors
Problem in setting the
values
Confusion in alter and
update command
Do not make the table
empty while dropping the
table
LEVEL - 1
1. Difference between Primary Key and candidate key?
2. Why is Foreign Key required?
3. What is referential Integrity Constraint?
4. Define and differentiate Cardinality and Degree.
5 Define the terms attribute and tuple.
6 What is the significance of using view?
7 What is difference between primary Key and unique key?
8 What is the use of NULL in SQL?
9. Difference between candidate key and alternate key.
10. Write down the syntax of Select query.
Page 17 of 60
LEVEL - 2
1. What are features of MY SQL?
2. What is difference between Char and Varchar?
3. Differentiate between DDL and DML.
4. What is purpose of using MY SQL?
5. Display empno and ename of all employees from table emp.
6. Display Ename,sal and sal added with comm from table emp
7. Write a query to display employee name, salary and department number who are not
getting
commission from table empl.
8. List the details of all employees whose salary is between 25000 and 40000.
9. List the details of employees who earn more commission than their salaries.
10. Write a query to display the name of employee whose name contains 'A' as third
alphabet.
LEVEL – 3
1. Answer the following questions based on the table CLUB given below:
TABLE :CLUB
Column Name
Data Type
Size
Constraints
Description
Member_No
Number
5
Primary Key
Member number
Member_Name
Varchar2
40
Not Null
Name of the
Address
Varchar2
30
member
Age
Number
2
>=18
Address of he
Type
Varchar2
10
member
Fees
Number
6,2
Age of the member
Type of
membership
(Temp or
Permanent)
Membership fees
(a) Write the SQL command to create the table CLUB including the constraints.
(b) Insert two tuples.
(c) Write the SQL command to display the details of all the members whose type is
“Permanent” and fees is more than Rs. 5000.
(d) Write SQL query to add a new column called Phno.
(e) Change the fees rate by 10% if the membership is of type “Temp”
(f)Write The SQL command to display all the details of all the members whose age is grater
than eighteen.
2.
Study the following table and then answer the given questions
TEACHERS
NUMBER
NAME
AGE DEPARTMENT DATEOFJOIN SALARY SEX
1
JUGAL
34
COMPUTER
2
PRATIGYA
31
HISTORY
3
SANDEEP
32
MATHS
4
SANGEETA
35
HISTORY
5
SATTI
42
MATHS
6
SHYAM
50
HISTORY
7
SHIV OM
44
COMPUTER
8
SHALAKHA
33
MATHS
Write SQL commands for the following:
10/01/97
24/03/98
12/12/96
01/07/99
05/09/97
27/06/98
25/02/97
31/07/97
12000
20000
30000
40000
25000
30000
21000
20000
M
F
M
F
M
M
M
F
Page 18 of 60
i.
ii.
iii.
iv.
v.
vi.
vii.
viii.
ix.
x.
3.
4.
To show all the information about the teacher of History department.
To list the names of female teachers who are in Hindi department.
To list the names of the teachers with their date of joining in ascending order.
To list the details of all the teachers who’s salary is between 20000 to 35000.
To list Name, age, department of all teachers. This information should be sorted on
Department.
To find out the average salary of all the teachers.
To find out the average salary of all the departments.
To find out the departments for which the total salary is more than 50000.
To find out the average salary given to each sex.
Write command to list structure of above table.
Consider the table given just above and write cardinality and degree of that
table.(teacher table)
Suppose I have added one more column and 4 more rows in the above given
table(teacher table) than what will be the degree and cardinality of that table
5. Study the following table and then answer the given questions:
Table : SchoolBus
Area_covered Capacity Noofstudents Distance Transporter
Charges
Vasant kunj
100
120
10
Shivamtravels 100000
Hauz Khas
80
80
10
Anand travels 85000
Pitampura
60
55
30
Anand travels 60000
Rohini
100
90
35
Anand travels 100000
Yamuna
50
60
20
Bhalla Co.
55000
Vihar
6
Krishna
70
80
30
Yadav Co.
80000
Nagar
7
Vasundhara
100
110
20
Yadav Co.
100000
8
Paschim
40
40
20
Speed travels 55000
Vihar
9
Saket
120
120
10
Speed travels 100000
10
Jank Puri
100
100
20
Kisan Tours
95000
(a) To show all information of students where capacity is more than the no of student in
order of Rtno.
(b) To show area_covered for buses covering more than 20 km., but charges less then
80000.
(c) To show transporter wise total no. of students traveling.
(d) Add a new record with following data:
(11, “ Moti bagh”,35,32,10,” kisan tours “, 35000)
(e) Give the output considering the original relation as given:
(i) Select sum (distance) from schoolbus where transporter= ‘ Yadav travels’;
(ii) Select min (noofstudents) from schoolbus;
(iii) Select avg(charges) from schoolbus where transporter= ‘Anand travels’;
(iv) Select distinct transporter from schoolbus;
Rtno
1
2
3
4
5
6.
Study the following table and then answer the given questions:
TABLE : GRADUATE
S.NO
NAME
STIPEND
SUBJECT
AVERAGE
1
KARAN
400
PHYSICS
68
2
DIWAKAR
450
COMP. Sc.
68
3
DIVYA
300
CHEMISTRY
62
4
REKHA
350
PHYSICS
63
5
ARJUN
500
MATHS
70
6
SABINA
400
CEHMISTRY
55
7
JOHN
250
PHYSICS
64
DIV.
I
I
I
I
I
II
I
Page 19 of 60
8
9
10
(a)
(b)
(c)
(d)
(e)
ROBERT
450
MATHS
68
I
RUBINA
500
COMP. Sc.
62
I
VIKAS
400
MATHS
57
II
List the names of those students who have obtained I DIV sorted by NAME.
Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend received in a
year assuming that the STIPEND is paid every month.
To count the number of students who are either PHYSICS or COMPUTER SC graduates.
To insert a new row in the GRADUATE table:
11,”KAJOL”, 300, “computer sc”, 75, 1
Give the output of following sql statement based on table GRADUATE:
(i)
Select MIN(AVERAGE) from GRADUATE where SUBJECT=”PHYSICS”;
(ii) Select SUM(STIPEND) from GRADUATE WHERE div=2;
(iii) Select AVG(STIPEND) from GRADUATE where AVERAGE>=65;
(iv) Select COUNT(distinct SUBDJECT) from GRADUATE;
7.
Write a SQL commands for table FURNITURE
Table: FURNITURE
ITEMNO
ITEMNAME TYPE
DATEOFSTOCK PRICE
INT
VARCHAR
VARCHAR
DATE
INT
5
20
20
6
Primary
Key
Not Null
Default ’10-0310’
Reference
to
TYPE
column of
item table
Price <
40,000
DISCOUNT
INT
2
Not Null
a). Write a MYSQL Command to create a furniture table including all
constraints.
b). On the FURNITURE table, ITEMNO is the primary key. TYPE is the ITEM
type of furniture and refers to the TYPE column of ITEM Table. The
DISCOUNT is a NOT NULL column.
c) Evaluate this DELETE statement:
DELETE ITEMNO, TYPE, DISCOUNT FROM FURNITURE WHERE
ITEMNAME=‘CHAIR’;
Why does the DELETE statement fail when you execute it?
8. What is the difference between delete and drop command in SQL.
9. What is the difference between Alter and Update command in SQL
10. Aryan made a table “Employee” with attributes E_No, E_name and Salary. He did not made
any primary key at the time of creation. Can you suggest some solution query to this problem.
UNIT-III
CHAPTER-15 Concept of Database Transactions
S.N
Concept
Degree of
importance
Level of
assignment
Error
1
2
Transaction execution
Transaction properties
***
***
L2
L2
3
Transaction control
commands (Begin/start
transaction, commit,
savepoint, rollback)
***
L2
Definition not well explained
Mismanaged meaning of
four properties of each
transaction
Syntax written is normally
wrong
Level 2
Page 20 of 60
1.
2.
3.
4.
5.
What is a database transaction? What TCL commands are separately by SQl?
What are ACID properties? Explain individual term separately?
Explain commit, rollback and savepoint statements.
Which statement is implicitly committed?
Explain the difference between ROLLBACK and COMMIT.
Practical questions of Level 2:
1. Expain how the following SQL script would affect a table.
a.
b.
c.
d.
e.
f.
g.
h.
i.
j.
k.
l.
m.
START TRANSACTION
UPDATE…
INSERT…
SAVEPOINT S1
INSERT…
SAVEPOINT S2
DELETE….
ROLLBACK WORK TO SAVEPOINT S2
UPDATE…
ROLLBACK WORK TO SAVEPOINT S1
UPDATE….
DELETE…..
COMMIT WORK
2. Given a table emp(empid, name,salary) , determine the which changes will become
permanent, and what will be the content of table emp after last statement.
a. BEGIN TRANSACTION
b. INSERT INTO EMP(1001,’AMITA’,40000);
c. DELETE FROM EMP;
d. ROLLBACK
e. BEGIN
f. INSERT INTO EMP(1001,’AKASH’,34000);
g. UPDATE EMP SET SALARY=SALARY*.01+SALARY ;
h. COMMIT
i. BEGIN
j. INSERT INTO EMP(1002,’AKASHY’,24000);
k. ROLLBACK WORK
l. UPDATE EMP SET VALUE=50000WHERE EMPID=1002
m. COMMIT WORK
UNIT-III
Chapter-14 MYSQL REVISION TOUR
Sr. Concepts
No.
Degree
of
Importance
Level of
Assignments
1.
Introduction
**
L-1
2
DBMS
**
L-2
3
RDBMS
***
L-1
Errors Analysis
Definition of data, information,
database, DBMS are confusing
and not compared properly.
Advantages and disadvantages of
DBMS are not written properly
-Confusion in Row, column,
- Confusion between cardinality,
degree and domain of a relation
-Confusion in fields and records of
table
-Confusion in weak entity, strong
Page 21 of 60
4
Introduction to
My SQL
***
L-1, L-2
5
Data Types
**
L-2
6
SQL
Commands
*****
L-1, L-2
entity
-Confusion among different keys.
- Confusion in Full form of SQL
-Confusion in comparison of
MySQL & SQL
-Confusion between char or
varchar datatypes.
-Always mistake when Dates are
inserted into table.
- Always mistake when queries
are written as on of followingComma, From , Or, and ,
between, in, “%__”, “__fd” etc
Level-I
1. Write output of the following
(i)
SELECT ROUND(29.21), Round(32.76);
(ii)
Select Trim(‘
kv pinjore …..’);
2. What are the advantages of using a DBMS?
3. Differentiate Drop table and Drop Database.
4. What is the foreign key?
5. What is MY SQL?
6. What is the difference between Single Row Functions and Aggregate functions?
7. Why to use a Group by clause? Explain with example.
8. Answer the following question based on the given Table
xi.
xii.
xiii.
xiv.
xv.
xvi.
xvii.
xviii.
xix.
NUMBER
NAME
AGE
1
2
3
4
5
6
7
8
JUGAL
PRATIGYA
SANDEEP
SANGEETA
SATTI
SHYAM
SHIV OM
SHALAKHA
34
31
32
35
42
50
44
33
TEACHERS
DEPARTMENT DATEOFJOIN
COMPUTER
HISTORY
MATHS
HISTORY
MATHS
HISTORY
COMPUTER
MATHS
10/01/97
24/03/98
12/12/96
01/07/99
05/09/97
27/06/98
25/02/97
31/07/97
SALARY
SEX
12000
20000
30000
40000
25000
30000
21000
20000
M
F
M
F
M
M
M
F
Write SQL commands for the following:
To show all the information about the teacher of History department.
To list the names of female teachers who are in Hindi department.
To list the names of the teachers with their date of joining in ascending order.
To list the details of all the teachers who’s salary is between 20000 to 35000.
To list Name, age, department of all teachers in ascending order of department.
To find out the average salary of all the teachers.
To find out the average salary department wise.
To find out the departments for which the total salary is more than 50000.
To find out the average salary given to each sex.
Page 22 of 60
xx. To show the structure of above table.
Level-II
1.
2.
3.
4.
What do you mean by referential integrity? How is it enforced in databases?
Explain PRIMARY KEY constraint with example.
Differentiate between DDL and DML commands?
Differentiate between Char and Varchar data types.
Chapter 17
Table and Integrity Constraints
S.No.
Concept
1
Integrity
Constraints
Creating table
with
constraints
2
Degree of
importance
****
Levels of
Assignment
L-1,L-2,L-3
*****
L-1
3
Alter table
with
constraints
***
L-1,L-2
4
Enabling/disa
bling
constraint
Dropping
table
*
L-1
***
L-1
5
Errors generally committed
-Incorrect table definition
-missing datatype or size
-improper placement of
constraint
-difference in table and
column constraint
-where to use add and
modify in alter
-confusion in alter and
update
-confusion in delete and
drop
Level 1
1.
2.
3.
4.
What is a constraint?
Name some constraints to enhance database integrity.
What is a primary key? Can you have multiple primary keys in a table?
What is a foreign key constraint? Can you have multiple foreign key constraints in a
table?
5. What is the use of NOT NULL constraint?
6. When a primary key is included in a table, what other constraints does this imply?
7. Write the syntax to create table with Primary Key?
8. What is the use of check constraint?
9. When the default constraint is used?
10. How to permanently remove a table from database?
Level 2
1. While creating a table 'Dept' Anuj forgot to set the primary key for the table. Give
the statement which she should write now to set the column 'DeptID' as the primary
key of the table.
2. Amit, a student of Class XII created a table 'Book'. Price is a column of that table. To
find the details of books whose price has not been entered, he entered the following
query
Select * from Book where price=NULL;
Help him to remove the error from the query by rewriting it.
3. In a student table, out of Roll NUmber, Name, Address which column can be set as
Primary Key and why?
4. What is the difference between table and column constraints?
5. What is a composite primary key?
Page 23 of 60
6. What is the meaning of cascade in foreign key?
7. How to a)add columns to an existing table ,b) modify column definition of table and
c) delete columns of table?
8. Can we add primary key on an already existing table?
9. Is it possible to remove a primary key from a table? If yes, how?
10. Write the query to display columns and their constraints.
11. Do we need to specify NOT NULL integrity constraint for a column defined as
primary key in MySQL?
12. Create table for following relation address (city,state,pin)
13. Define the reason for defining foreign key
Level 3
1. While defining a constraint, which keyword specifies that if a DELETE or UPDATE
operation affects a row from parent table, then set the foreign key column(s) in
child table to NULL
2. Which statement about constraint is true?
a. A single can have one constraint applied.
b. UNIQUE constraints are identical to PRIMARY KEY constraints
c. NOT NULL constraints can only be specified at the column level
3. In the following table definition, which line will create error and why?
1. create table part(
2. part_id int,
3. part_name varchar(25),
4. cost float(7,2),
5. constraint cost_cn NOT NULL (cost));
4. Can you disable PRIMARY KEY constraint in MySQL?
5. How to disable/enable foreign key?
6. Delete the foreign key constraint namely fk1 from the table a1.
7. Name the integrity terms that following constraints implement:
a. NOT NULL
b. FOREIGN KEY
8. Which of the following FOREIGN KEY constraint keywords identifies the table and
column in the parent table?
a. RESEMBLES
b. ON DELETE CASCADE
c. REFERENCES
9. What must exist on parent table before MySQL allows us to create FOREIGN KEY
constraint?
10. What is self referencing table?
UNIT -4
IT APPLICATION
S.
Concepts
Degree of
Levels of
Errors generally committed
No
Importanc Assignmen
e
t
1.
Introduction to
*
L1
Definition of E-Governance,
E-Governance, EE-Business, E-Learning is not
Business, Ecleared properly, unable to
Learning
differentiate properly.
2.
GUI and its
*
L1
Error to differentiate in FrontImportance
end and back-end interface,
unable to mention the
importance of GUI.
3.
Front-end Interface ***
L2
Error to identify different
Page 24 of 60
4.
Back-end
Database
***
L3
5.
Front-end and
Database
Connectivity
**
L1
controls used in Front-end.
Committed error to extract
data while interacting with
programming
Error to define the usage of
back-end in case of GUI
application.
Error to make connection in
b/w of Front-end and Backend.
LEVEL-1
1.
2.
3.
4.
5.
6.
7.
What is front end application?
What is back end application?
What is e-Governance?
What is e-Learning?
What do you mean by E-Business?
Data validation is one of the important activities. Justify the statement.
In Java and MySQL interfacing, which is used as front end which as back end?
Explain.
8. What are different kinds of E-business?
9. What is interface?
10. list Component of data Entry.
LEVEL-2
1. What are the objectives of E Governance?
2. List the advantages of E Governance.
3. Give the social impact of E Governance?
4. How E-learning is useful to organisation.
5. How E-learning is useful to learner.
6. What are the various components for data entry?
7. What is advantage of interfacing?.
8. Why E-learning is preferred?
9. What are the importances of E-business?
10. What are the different methods of data entry?
LEVEL-3
1.
2.
3.
4.
5.
6.
7.
8.
9.
What is the front end and back end in Java?
Differentiate between front-end testing and backend testing.
How E-learning is useful to trainer. Why e-learning is used.
How has our society benefited from e-governance? Write 2 points
Is E Governance. Better than normal Governance. Explain.
How can Java be interfaced with MySql?
What advantage does e-learning offers as compared to normal learning?
How does e-business improve customer satisfaction- Write one point.
Mr. Das is working as a Manager in the Shivam Enterprises. He wants to create a
form with following functions. Choose appropriate controls from Text box, Label,
Option button, Check box, List box, Combo box, Command button and write in
the third column:
Page 25 of 60
10.
Sno
1.
Control used to :
Enter the name, Address, Basic
salary
Control
2.
Select the Gender (M/F)
3.
Select the department from the
available list
4.
Choose type of employee
(Permanent / Regular)
5.
Display the picture of the
employee
Develop a GUI application to perform data input operation using front-end and back-end
tools.
Unit - 1
COMUTER NETWORKING
Level – 1
Ans 1: A computer network is a system in which computers are connected to share information and
resources.
Ans 2: In computer networking, a Media Access Control address (MAC address) is a unique
identifier assigned to most network adapters or network interface cards (NICs) by the manufacturer
for identification, and used in the Media Access Control protocol sub-layer.
Ans 3: A unique number consisting of 4 parts separated by dots, e.g.
165.113.245.2
Every machine that is on the Internet has a unique IP number - if a machine does not have an IP
number, it is not really on the Internet.
Ans 4: Network can be classified on the basis of their size, complexity and geographical spread. On
the basis of geographical spread it can be classified as Local Area Network, Metropolitan Area
Network and Wide Area Network.
Ans. 5: Network topology is defined as the interconnection of the various elements (links, nodes,
etc.) of a computer network. In computer networking, topology refers to the layout of connected
devices.

Bus topology

Star topology

Ring topology

Tree topology

Mesh topology
Page 26 of 60
Ans 6: The central connecting device in a computer network is known as a hub. When data packets
arrives at hub, it broadcast them to all the LAN cards in a network and the destined recipient picks
them and all other computers discard the data packets.
Ans 7: A Switch is a device that is used to segment networks into different sub networks called
subnets or LAN segments.
Segmenting the network into smaller subnets, prevents traffic
overloading in a network.
Page 27 of 60
Ans: 8. Goals of network:

Resource sharing: The aim to make all programs, data and peripherals available to
anyone on the network irrespective of the physical location of the resources and the
users.

Reliability: A file can have copies on two or more machines, so if one of them is
unavailable due to hardware or software crash, the other copies could be used.
E.g.: Railway reservation, Airways reservation etc.

Cost Factor:
Personal computers have better price / performance ratio as the
important data are stored on file server machine available for sharing.

Communication Medium: Using a network, it is possible for managers, working far
apart, to prepare financial report of the company. The changes at one end can be
immediately noticed at another and hence it speeds up co-operation among them.
Ans 9: Network topology is defined as the interconnection of the various elements (links, nodes,
etc.) of a computer network. In computer networking, topology refers to the layout of connected
devices.
o
Bus topology
o
Star topology
o
Ring topology
o
Tree topology
o
Mesh topology
Ans 10: Star topology is widely use due to following reasons:
i. The star topology is considered the easiest topology to design and implement.
ii. An advantage of the star topology is the simplicity of adding additional nodes.
Ans 11: A hub is hardware device used to connect several computers together. It is of two types
Active or passive Hubs.
Active hub is one which amplifies the signal as it moves from one
connected device to another. Passive hub allows the signal to pass from one computer to another
computer without any change.
Ans.12: Repeater is a device used in data communication to strengthen a signal as it is passed
along the network cable. There are two types of Repeater:
Amplifier: It amplifies all incoming signals as well as concurrent noise.
Repeater: It regenerates the packet as if it is starting from the source station.
Level – 2
Ans. 1: Advantages: I. Data or information can be shared among the users.
Page 28 of 60
ii. Fast communication can be achieved.
iii. Expensive hardware or software can be shared among the users.
Ans: 2 Disadvantages of networks:
i. Sophisticated Hardware and software technology is required.
ii. Threat to security of data and information.
Ans 3.Communication channels mean the connecting cables that link various workstations. There
are 3 basic types of cables:
Twisted Pair cables
Coaxial cables
Fiber-optic cables
Ans 4: The unique name that identifies an Internet site. Domain Names always have 2 or more
parts, separated by dots. The part on the left is the most specific, and the part on the right is the
most general. E.g.: matisse.net
Ans. 5: A metropolitan area network (MAN) is a large computer network that usually spans a city
or a large campus.
WAN is a network that covers an area larger than a single building or campus such as across the
cities or countries.
Ans 6: Cost of Expenses required for implementation of network, Reliability of a particular topology
and flexibility of system for future adjustment; are the various factors that must be considered
before making a choice for the topology.
Ans 7: i. A twisted pair cable is incapable carrying a signal over long distances without the use of
repeaters.
ii. Its low bandwidth capabilities are unsuitable for broadband applications.
iii. Its supports maximum data rates 1mbps without conditioning and 10 mbps with
conditioning.
Ans 8: Application of networks:
1. Sharing Computer peripherals among the connected users.
2. Sharing Data or information among the connected users.
3. Access to remote database: User can access to remote database sitting at his home to
make reservation for airplanes, trains hotels and so on anywhere in the world with
instant confirmation.
4. Communication facilities: Using Network, user can share text, images, digitized voice or
movie to any users anywhere in the world.
5. Cost deduction: Using Computer Network communication system, amount required for
travelling of user or data from one location to another can be reduced to very less and also
saves energy for the same.
Ans 9 (i): Optic fiber:
Advantage: i. It is free from electrical noise and interference
ii.It has more bandwidth than copper wire.
Page 29 of 60
Disadvantage: It is an expensive communication medium.
Ans 9(ii) Coaxial cables:
Advantage : i. It provides a cheap means of transporting multi-channel
television signals around metropolitan areas.
Disadvantage: Expensive than twisted pair cables.
Ans 9(iii) Twisted pair cables:
Advantage: It is inexpensive.
It is easy to install and maintain.
Disadvantage: It has low bandwidth capabilities.
It is unsuitable for broadband connection.
Ans 9(iv) Radio Wave: A data transmission by use of radio frequencies is called as radio-wave
transmission.
Advantages: i. Radio waves transmission offers mobility.
ii. It proves as cheaper communication system.
iii. It offers ease communication over difficult terrain.
Disadvantages: i. It is an insecure communication system.
ii.
Radio Signals are susceptible to weather condition like thunder
storms, rains etc.
Ans 9(v): A microwave communication system is a communications system that uses a beam of
radio waves in the microwave frequency range to transmit video, audio, or data between two
locations, which can be from just a few feet or meters to several miles or kilometers apart.
Microwave links are commonly used by television broadcasters to transmit programmes across a
country, or from an outside broadcast back to a studio.
Advantage: i. It is cheaper communication system
ii. . It offers ease communication over difficult terrain.
iii. It offers ease communication over oceans.
Disadvantage: i. It is an insecure communication system.
ii. Radio Signals are susceptible to weather condition like thunder storms, rains
etc.
iii. Signals from single antenna may split up and propagate in slightly different
path and hence reduces the signal strength.
Ans 10: A Switch is a device that is used to segment networks into different sub networks called
subnets or LAN segments.
Segmenting the network into smaller subnets, prevents traffic
overloading in a network. A switch is responsible for filtering i.e. transforming data in a specific way
and for forwarding packets (a piece of message) between LAN segments. Switch support any
packet protocol. LANs that are segmented through switches are called switched LANs.
Page 30 of 60
Ans 11: Denial-of-services attacks: DoS are those attacks that prevent the legal users of System
from accessing or using the resources, information or capabilities of the system. It may be of
following types:

Denial of Access to Information:
Such attacks cause deletion or changing of
important information to non readable format.

Denial of Access to Applications: Such attacks make the applications unusable or
unavailable for legal user of the system.

Denial of Access to Communications:
Such attacks includes cutting of
communication wire, jamming radio communications, flooding a system with junk
mail.
Level – 3
Ans 1: Cost of Expenses required for implementation of network, Reliability of a particular topology
and flexibility of system for future adjustment; are the various factors that must be considered
before making a choice for the topology.
Ans 2: In bus topology each machine is connected to a single cable. Each computer or server is
connected to the single bus cable through some kind of connector.
Tree topology is a network with the shape of an inverted tree in which a single link between two
nodes.
Ans 3: In case if we need less connection of wires, very fast communication speed; a ring topology
becomes the best choice for a network. This is because optical fiber offers the possibility of very
high seed transmissions in one direction.
Ans: 4 i. The star topology is considered the easiest topology to design and implement.
ii. An advantage of the star topology is the simplicity of adding additional nodes.
Ans 5: Denial of Service: It refers to any threat that prevents the legitimate users from accessing
the network resources or processing capabilities.
Snooping: It refers to any threat that results in an unauthorized user obtaining information
about a network or the traffic over that network.
Ans 6: Domain Name Resolution is the task of converting domain names to their corresponding IP
address. This is all done behind the scenes and is rarely noticed by the user. When you enter a
domain name in an application that uses the Internet, the application will issue a command to have
the operating system convert the domain name into its IP address, and then connect to that IP
address to perform whatever operation it is trying to do.
Ans 7: Communication channels mean the connecting cables that link various workstations. There
are 3 basic types of cables:
Twisted Pair cables
Coaxial cables
Fiber-optic cables
Page 31 of 60
Coaxial Cables: A cable consisting of two concentric conductors (an inner conductor and an outer
conductor) insulated from each other by a dielectric; commonly used for the transmission of highspeed electronic data and/or video signals.
Fiber Optic Cables: It is flexible optically transparent fiber, usually made of glass or plastic, through
which light can be transmitted by successive internal reflections.
Twisted Pair: A cable composed of two small insulated conductors twisted together without a
common covering. Also known as copper pair. Twisted pairs have less bandwidth than coaxial
cable
Ans 8: The various threats to network security are as follows:
1. Intrusion Problems / Access Attacks: This occurs when an unauthorized user attempts to
protected sensitive / confidential information. It may be of following types:
a. Snooping: It refers to unauthorized access to someone else’s data, email or
computer activity.
b. Eavesdropping: It refers to unauthorized listening / intercepting someone else’s
private communication / data/ information.
2.
Denial-of-services attacks: DoS are those attacks that prevent the legal users of
System from accessing or using the resources, information or capabilities of the
system. It may be of following types :
a.
Denial of Access to Information: Such attacks causes deletion or changing of
important information to non readable format.
b.
Denial of Access to Applications:
Such attacks makes the applications
unusable or unavailable for legal user of the system.
c.
Denial of Access to Communications:
Such attacks includes cutting of
communication wire, jamming radio communications, flooding a system with
junk mail.
Ans 9: Threats of network security can be prevented by using various techniques:
i.
Authorization: In this case User is asked to enter an authorized login-id. If user is able
to provide legal login-id then he/she is considered as authorized user.
ii. Authentication: In this case User is asked to enter a legal password. If user is able to
provide legal password then he/she is considered as authenticate user.
iii. Firewall : Firewall is a mechanism to prevent unauthorized internet user to access
private network connected to internet.
iv. Intrusion Detection: This is a monitoring system which detects unauthorized access of
data or resources of the network.
Ans 10. Telephone Cable, Ethernet Cable, Co-axial Cable, Optical Fiber
Topic- OSS
Page 32 of 60
LEVEL I
Ans1. Free Software: Free software means the software is freely accessible and can be
freely used, changed improved, copied and distributed by all who wish to do so. And no
payments are needed to be made for free software.
Open Source Software: can be freely used but it does not have to be free of chage. Here
the company constructing the business models around open source software may receive
payments concerning support, further development
Ans2. The technical standards can be broadly of two types:
(1). Proprietary standards
(2). Open standards
Ans3. Free software means the software is freely accessible and can be freely used
,changed
Improved, copied and distributed by all who wish to do so.And no payments are needed to
be made for free software.
Ans4. COMMON OPEN STANDARD FORMATS
1. Plain text(ASCII) .
2. Hypertext Markup Language(HTML).
3. TeX,LaTeX and Device Independent Formats(DVI)
4. DVIng
5. Open Documents Format for Office Application (ODF)
6. Joint Photographic Expert Group.
7. Portable Network Graphic(PNG).
8. Scalable Vector Graphic (SVG).
9. Ogg Vorbis.
10. Free Lossless Audio Codec(FLAC)
Ans6. ODF is open document format is an XML based file format for representing
electronic documents such as spreadsheets , graphics etc.
Ans7. A font refers to a set of displayable text characters (called glyphs ) , having specific
style and size.
Ans8. Unicode provides a unique number for every character , no matter what the platform
,no matter what the platform ,no matter what the program ,no matter what the language.
Ans9. Fonts can be categorized on the basis of two parameters:
1. On the basis of technical specifications.
2. On the basis of font configuration
LEVEL II
Ans1. Indian Standard Code for Information Interchange was evolved by a standardization
committee .This is an eight bit code capable of coding 256 characters . ISCII code retains
all ASCII characters and offers coding for Indian script also.It is also called Indian scripts
Codes for Information Interchange
Ans2 1) odt – for word processing 2). Ods – for for spreadsheet file 3). Dop – for electronic
presentations files 4). Odg – for graphics file 5). Odb – for database file.
Ans 3: Mozilla
Freeware
► No source code available
► free internet software
It can be download from www.mozilla.org
Ans.4: APACHE: It is the most common web server (or HTTP server) software on the
Internet. Apache is designed as a set of modules, enabling administrators to choose
which features they wish to use and making it easy to add features to meet specific
needs including handling protocols other than the web-standard HTTP.
► Apache HTTP server is an open source web server.
Page 33 of 60
► It is component of LAMP.
Ans 5.POSTGRE SQL: PostgreSQL is a free software Object Relational Database Server.
It offers alternative to OOS database such as MySQL, and Firebird as well as proprietary
Software such as Oracle, Sybase and Microsoft Sql Server.
Ans.6: PHP: It is a Hypertext preprocessor language which is OSS used for server side
applications and developing dynamic web content. PHP allows easy interaction with large
number of relational database systems such MySQL, Oracle, DB2, PostgreSQL etc. PHP
runs on most major OS including windows, Mac OS X, UNIX, Linux etc.
Ans7.(1) Recipient may not be able to read all the file.
(2)You may transmit confidential information
(3)Single supplier or vendor has total control over the functionality and usefulness of
the product.
LEVEL III
Ans.1 In two different ways ,Indian script can be entered :
(i)
(ii)
Using phonetic text entry
Using keymap based entry.
Ans.2 It is Office an application suite which is free software and directly competes with
Microsoft Office. It is compatible with MS Operating System, UNIX, MAC OS.
Ans3. LAMP stands for Linux,Apache,Mozilla and PHP.
Ans4.Pango project is to provide and open – source framework for the layout and rendering
of internationalized text into GTK+ or GNOME environments.
Ans.5 Convert each 7-bit code to its hex equivalent.The results are
48 45 4C 50
After locating these hex values in ASCII table we have
H E
L
P
Ans6.Unicode provides a unique number for every character ,no matter what the platform
,no matter what the program , no matter what the language .The Unicode standard has
been adopted by industry leaders such as Apple ,HP,IBM etc.
Ans.7Words typed as per their pronounciation in English script and lator converted to
Corresponding language word ,is known as Phonetic Text Entry or Transliteration.
Ans8. Ogg Vorbis is freely available open format for audio streaming , without any
restrictions.The other formats available today such as MP3,AAC of MMPEG – 4 etc. are
available under certain terms.
Ans.9 W3C is acronym for World Wide Web Conosrtium.W3C is responsible for producing
the software standards for world wide web.It was created in October 1994.
UNIT-II
Java GUI Programming Revision Tour – I
S. No.
Degree of
Importance
Netbeans Java **
IDE
Level
2
Basics of GUI
*
L1
3
Tokens
*
L1
4
Data Types
***
L1,L2
5
Variables
*****
L2, L3
6
Text
Interactions
****
L1, L2
1
Concept
L1,L-2
Errors generally
committed
Not use
appropriate
component
Wrong
properties used
Wrong
identification
Appropriate data
types not used
Wrong
Declarations
Proper syntax
errors
References
Page 34 of 60
7
8
9
Operators in
Java
Expressions
*****
L1, L2
****
L1, L2,L3
Programming
Constructs
*****
L2, L3
Wrong
evaluation
Semicolon not
used
Loop termination
errors
Level - 1
Ans1. Rapid Application Development describes a method of developing software through
the use of pre-programmed tolls or wizards.
Ans2. Events are activities that take place either due to user interaction or due to some
internal changes e.g. user clicks upon a command button or text of a textbox changes
owing to a calculation.
Ans3. A message is the information/request sent to an application about the occurrence of
an event
Ans4. Properties are characteristics of an object that control its appearance and /or
behavior.
Ans5. Identifier are fundamental building blocks of a program and are used as the general
terminology for the names given to different parts of the program e.g. variables, objects,
classes, functions etc.
Ans6. Keywords are the reserved word in java and having a special purpose and they
cannot be used for any other purpose.
Ans7. GUI stands for Graphical User Interface. This programming style involves graphics
entities, rather than writing numerous lines of code.
Ans8. Execution of multiple cases after matching takes place in a switch statement.
Ans9. Unicode
Ans10. Class new else try
Level – 2
Ans1. Statement that unconditionally transfer program control with in a function.
Ans2. int i= 0;
for(i=51; i<=60; i++)
{
System.out.print(i + “ “);
}
Ans3. In a switch statement, after matching case’s code is executed, it stop only when it
encounters break or closing brace ( } ) of switch.
So, break statement acts as terminating statement for matched case in a switch statement.
Ans4. Operators are the symbol that defines what kind of operation is to be done.
Operators required operands to perform operations.
1. Unary operators
2. Binary operators
3. Ternary operators
Ans5. 2
Ans.6. = represent an assignment operator. It sets the value of the variable on its left side
with the result of expression on its right side. == represent a conditional equal to operator.
It checks for the equality of both its operands. If both the operands are equal, condition
evaluates to true otherwise to false.
Ans.7. Two selection statement available in java are ‘if’ and ‘Switch’
Ans8. Difference between while and do while loop
While Loop
Do while Loop
While Loop is a entry control
Do while is a exit control loop
loop
Page 35 of 60
int x= 100;
while (x> 0)
{
System.out.println(X);
X= x- 10;
}
int x= 100;
do
{
System.out.println(X);
X= x- 10;
}
while (x> 0);
Ans9. Converting a value form one type to another is called type casting.
For e.g. int a = 5 .here ‘a’ is a integer, which can be cased to float as follows
float b = (float) a;
Ans.10.Data types that are directly available with java are called primitive data type.
Various primitive data types available in java are byte, short, int, long, float, double, char
and Boolean.
Page 36 of 60
Level -3
Ans1. Application Programming Interface.
Ans2. Although properties, methods and events do different things, yet they are
interrelated. Properties can be thought of as an object’s attributes, methods as its actions,
and events as its responses.
Ans3.This programming style responds to the user events and is driven by the occurrence
of user-events.
Ans.4 (i) Sequence constructs
(ii) Selection statement
(iii) Iteration statement
Ans5. Every loop has its elements that controls govern its execution. Generally, a loop has
four elements that have different purposes. These elements are as given below:
1.
2.
3.
4.
Initialization expression(s)
Test Expression.
Update Expression(s)
The body of the loop
Ans6. The switch statement must be controlled by single integer control variable, and each
case section must correspond to a single constant value for the variable. The if else if
combination allows any kind of condition after each if
Ans7. Difference between an entry control loop and an exit control loop.
Entry Control Loop
Exit Control Lop
It first checks or evaluates the
It first evaluates the loop body
terminating condition and then
and then checks the terminating
executes the loop body.
condition. If the condition is
found true the loop continues
otherwise the loop stops.
In case if the condition is false
In case if the condition is false
in first time only then the loop
in first time only then the loop
will not get execute even once.
will still get execute at-least
once.
Ans8. Infinite Loop, hence it is not possible to find the final value of i
Ans9. //Assumes that given number is available int variable n
int fact = 1;
for(int i=1; i<=n; i++)
{
Fact=fact*i;
}
Ans10. 69
Revision Tour - II
Level-1
Ans1. System.exit(0);
Ans2. OKBtn.doClick();
Ans3. For this we shall set the icon property to the path a specific image file and text
property to specific text.
Ans4. A combobox is a graphical control that displays a list of values in a drop-down list
form.
Ans5. (i) JList (ii) JComboBox
Ans6. CheckListValueChanged( )
Ans7. By setting editable property of combo box, we can make it editable.
Ans8. (c) a character array.
Ans9. RAD stands for Rapid Application Development. A programming style which aims at
building programs fastly through the use of tools and wizards is called RAD.
Page 37 of 60
Ans10. A text fiels’s text property can hold single line of text unless it is an HTML text.
A text area’s text can hold any number of lines of text depending upon its rows
property.
Level-2
Ans1. A button group is a group of controls out of which only one can be selected at a time.
A button group is created through JButtonGroup component class of Java Swing.
In a button group we can put radio buttons or push buttons
Ans2. Java program can be easily moved from one computer system to another, anywhere
anytime. Changes and upgrade in operating system, processors and system
resources will not force any change in the Java program. Hence it is called a
platform independent language.
Ans3. The source program is first converted into a byte code using a java compiler. This
byte code is machine independent i.e. same for all the machines. Later the byte code is
executed on the machine using an interpreter.
Ans4. Comments are added to a program for the following purposes:1. Make the more readable and understandable
2. For future references
We can add comments in a Java program in the following ways:
1. Adding // before the line which is to be commented. This can be used only for
single line comments.
2. using a pair of /* and */ for multi-line comments.
Ans5. Error in the way of writing a statement in a program, results in a syntax error.
For e.g.
for ( i=0, i<=100. i++), will result in a syntax because the program has written comma
instead of a semi comma in the for loop.
Ans6. Yes, it is possible to store a text in a jTextField in a Integer variable. To store the
text, first it must be converted into intertype using the pareInt() method.
int stud_cnt= Integer.pareInt(JTextFiled1.getText());
In the a above statement, first the getText() function obtains the text written in the
jTextField1 and then convert it into integer type using parseInt() method of available in
Integer class.
Ans7. A programming environment, where all the tools required for programming are
available under one roof is called IDE. Two IDE for Java are Netbeans and BlueJ
Ans8. Keyword, Identifier, Literal, Punctuators ad Operators
Ans9. A Switch statement is used execute a statement from a group of statement based on
the result of a expression. The expression must result in either of byte, short, integer or
character.
An ‘if statement’ can be used in place of switch statement
In a switch statement if none of the statement satisfies and even there is no default
case then nothing would happen. This would not result in any sort of error.
Ans10. Break is used to terminate the current switch statement or the loop.
Level-3
Ans1. A list is a graphical control that display a list of items in a box where from the user
can make selection.
A list is different from combobox in many ways:
(i) A list does not have a text field the user can use to edit the selected item,
whereas a combobox is a cross between a text field and a list.
Page 38 of 60
(ii)
In a list user must select the items directly from the list whereas in a combobox
user can edit it if he/ she wishes.
(iii) The list does not drop down whereas a combobox takes less space initially but
drop down when user clicks obn its arrow.
(iv) List allow us to select more than obe items but combobox allows only single item
selection.
Ans2. Through a text field and a password field can obtain a single line of text from user,
yet there are difference
A password field displays the obtained text in encrypted form on screen while text field
displays the obtained text in unencrypted form.
Ans3. Top level containers: JFrame, JDialog
Middle level containers: JPanel, JTabbedPane
Component level containers: JButton, JLabel
Ans4. A container is a control that can hold other controls within it e.g. a Panel, a Label,
Frame etc.
Controls inside a container are known as child controls. The child controls can exit
completely inside their containers.
When we delete a container control, all its child controls automatically get deleted.
Ans5. An Event refers to the occurrence of an activity.
Events can occure through user actions such as a mouse click or key press.
Each time an event occurs, it causes a message to be sent to the operating system.
Ans6. A GUI (Graphical User Interface) is an interface that use pictures and other graphic
entities along with text , to interact with user.
You can create a GUI application on Java platform using Swing API(Application
Programming Interface), which is part of Java Foundation Classes (JFC).
Ans7. private void jBtnClearActionPerformed(java.awt.event.ActionEvent evt)
{
jTextField1.setText(“ “) OR jTextField1.setText(null)
jTextField1.setText(“ “) OR jTextField1.setText(null)
jTextField1.setText(“ “) OR jTextField1.setText(null)
jTextField1.setText(“ “) OR jTextField1.setText(null)
jCheckbox1.setSelected(false);
}
private void jBtnCalcPerActionPerformed(java.awt.event.ActionEvent evt)
{
int p;
p=Integer.parseInt(jTextField2.getText());
if (jCheckBox1.isSelected())
p=p+5;
jTextField3.setText(Integer.toString(p));
}
private void jBtnResultActionPerformed(java.awt.event.ActionEvent evt)
{
int p;
p=Integer.parseInt(jTextField3.getText());
if( jRadioButton1.isSelected())
{
if ( p>=70)
jTextField4.setText(“Eligible for all subject”);
else
jTextfield4.setText(“Not Eligible for science”);
}
else if( jRadioButton2.isSelected())
Page 39 of 60
{
if ( p>=60 )
jTextField4.setText(“Eligible for Commerce and Humanities”);
else
jTextfield4.setText(“Not Eligible for Science and Commerce”);
}
else
{
if ( p>=40 )
jTextField4.setText(“Eligible for Humanities”);
else
jTextfield4.setText(“Not Eligible for any subject ”);
}
}
private void jBtnCloseActionPerformed(java.awt.event.ActionEvent evt)
{
System.exit(0);
}
Ans8. Joption pane support the following Dialog types:
a) Input Dialog: provides a text Field, Combo box or a list box for the user to input an
option or value.
b) Confirm Dialog: it helps the user to input the choice in the form of Ok, Cancel, Yes, No
etc.
c) Message Dialog: It is a simple dialog box to display a message with a OK button.
Option Dialog: helps to create a dialog box according to the requirements of the user.
Ans9. showInputDialog(): to display an Input dialog Box:
 showIConfirmDialog(): to display a confirm dialog Box:
 showMessageDialog(): to show a Message dialog Box:
 showOptionDialog(): to show a option dialog Box:
Ans10. Various possible values for Option type property of jOptionPane are
-1: used to display a simple OK Button.
0: To display both Yes and No button
1: To display Yes, No and Cancel button,
2: To display Ok and Cancel button.
Page 40 of 60
UNIT-II
Chapter- 5 JAVAGUI PROGRAMMING REVISION TOUR-III
Level –I
1 Class
2 Yes
3 Non-Parameterized Constructor
4 Which can receive Parameters.
Level- II
1 Whenever object is created.
2 when object is created and by using (.) Operator.
3 In Call by Value , The called method creates it’s own work copy for the passed
parameters and copies the passes values in it. Any changes that take place are done in
the work copy and the original data remain intact.
In Call by reference, the called method receive the reference to the passed
parameters and through this reference, it access the original data. Any changes that take
place are reflected in the original data.
Level- III
1 Constructor Properties are: (i) have no return type, not even void (ii) constructor should
be defined as public, so that it’s objects can be created in any method.
2 The data type that are based on fundamental or primitive data type, are known as
Composite data type. User Defied Data type are created by users.
3 Software objects have state and behaviour like their state is maintained through
variables or data items. Their behaviour is implemented through functions generally
called methods.
Real World object also physical characteristics(or state) and behaviour e.g. a Motorbike
has:
Like: Current gear,two wheels are Characteristics
Like: halting, accelerating are States
4 The keyword this refers to currently calling object. It is automatically created and
initialized by java. So you can refer to current object by using keyword this.
Answer to the Chapter -6
More about Classes and libraries
Level 1
1
2
3
4
5
6
7
8
9
10
Length() return the length while capacity() return maximum no of character that
can be entered.
Return length , extract substring , conacat string specified in argument, removes
the leading & trailing spaces, convert into upper & lowercase
Java.applet , java.awt, java.io, java.net
Abstract classes are used for inheritance
Abstract classes are used for inheritance while interface is used for multiple
inheritance
Compareto () compares 2 string while equals( ) check for equality
indexOf(char ch) returns the index of the Character Ch
Power(a,b ) finds the value of a raise to power b
Append() is used to append the string in a textarea to its p
charAt(int a) retruns the character present at position a in the string
Level 2
1.
2.
Related classes and interfaces grouped together is called as package.
Page 41 of 60
Member Type
Its Own
Derived Class
class
Same Package
Public
Accessible
Accessible
Accessible
Protected
Accessible
Accessible
Accessible
Default
Accessible
Accessible
Not Accessible
Private Protected
Accessible
Accessible
Not Accessible
Private
Accessible
Not Accessible
Not Accessible
Other Package
3. Final keyword is used fro a class to make it static
4 Whenever a class contains only general code and need to be inherited .
5. (a) s.length() will give output -17
(b) jTextField2.setText(s.toLowerCase()) will give output abc micro systems
6 (a) 2
(b) 8
7. (a) ABC Microsytems
(b) 3
( c) 12
8. HBC
9. ABC Microsystems
10. 2
Level 3
1. string str = Tf.getText();
int len = str.length();
char ch =character.toUppercase();
str = ch + str.substring(1);
for (int I =2 ;i<len -1; i++)
{
If (str.charAt(i) == ‘ ‘)
{
Ch = character.toupperCase(str.charAt(i+1));
Str = str.substring(0,i+1) + ch +str.substring(i+2);
}
}
TF.setText(str);
2. string str = STF.getText();
char ch = charTF.getText().charAt(0);
int count = 0;
for(int i=0; i<str.length(); i++)
{
If(str.charAt(i) = = ch)
Count=count+1;
}
occurLable.setText(“”+ Count);
3. string str = STF.getText();
string strRev = “”;
for(int i=str.length()-1 ;i>0 ; i--)
{
strRev=strRev+ str.charAt(i);
}
Revtf.setText(strRev);
4. i.
abc
ii.
Abcxyz
5. CentralMadras
Page 42 of 60
6. ABC Micto Systems
7. i INFORMATICS PRACTICES
8. Informatics Practices Practicals
9. 20
10. SPACE In
ii Informatics Practices
Chapter -7
Lesson-Inheritance
Level 1
Ans-1 Inheritance: The ability of a class to obtain the characteristics of another class is
called inheritance.
Need of Inheritance: Inheritance helps in two ways:

Code Reusability:

Helps in expressing relationship among classes
Ans -2 Type of Inheritance:
o Single Inheritance
o Multiple Inheritance
o Hierarchical Inheritance
o Multilevel Inheritance
o Hybrid Inheritance
Ans-3
Base Class (Parent Class): The Preexisting class which is being inherited is
called the base class or the parent class. It is also called a Super Class
Derived Class (Child Class): The new class which inherits the capabilities from
another pre-existing class is called the Derived Class or the Child Class. It is also
called Sub Class.
Ans-4 Public, Protected Default, Private Protected, Private and their scopes
Ans -5
Function Overriding:
o If a derived class method has the same name as that of the base class then
the derived class method overtakes (get higher preference) the base class
method. This is known as overriding of base class method.
Function overloading:
o Two or more functions in the same scope having the same name but different
signatures are said to be overloaded. For two functions to be overloaded
either they should have different number of arguments or different order of
arguments.
As-6 Abstract Class: A class that cannot be instantiated.
Abstract Method: A method without implementation.
As- 7 No
Level-2
Page 43 of 60
Ans -1 Type of Inheritance:
o Single Inheritance: A single Base class is being inherited by a single derived
class.
o Multiple Inheritance: A single derived class inherits more than one base
class.(This type of inheritance is not supported in Java)
o Hierarchical Inheritance: A single base class is being inherited by more
than one child classes.
o Multilevel Inheritance: A child class act as a base class for anther child
class.
o Hybrid Inheritance: A combination of two or more of the above inheritance
pattern.
Ans- 2 No
Ans- 3 Final class cannot be inherited. Final methods, classes are used for security. This is
because Hackers extend some of important classes and substitute their classes for the
origin.
As-4
Abstract Class: A class that cannot be instantiated.
public abstract class shape
{
---------
Ans-5
}
An interface cannot implement any methods.
No variables can be inherited from interfaces.
Level 3
Ans 1 Reusability
Base Class & Derived Class
Ans-2 A concrete/abstract superclass is the one whose objects cannot be declared and
created. When
we need to define general characteristics and behavior of its subclass es.
Ans-3 a)
An interface can be implemented by a class which is already a subclass of
another class. A class which is already a subclass of another class can’t
extend an abstract class as well.
b)
An abstract class can contain non abstract methods where as a interface
can’t contain non-abstract methods. All methods of an interface must be
abstract.
Page 44 of 60
Ans-4
Protected member is accessible in non sub class of same package but friendly is
not Accessible.
Ans-5 1. Create the class Student
2. Declare data members & functions
3. Create another class graduate and extend the Student class
Ans- 6 It is determined by the type of the object being referred to at the time of call.
Unit -2 ( Programming)
Chapter – 8 ( GUI Dialogs and Tables)
LEVEL 1
Ans 1: To provide or request information to / from the user.
Ans 2: Table
Ans 3: Yes
Ans 4: Yes with associated TABLE_MODEL
Ans 5: Allows displaying data in row column format.
Ans 6: dispose() method.
Ans 7: InputDialog
Confirm Dialog
Message Dialog
Option Dialog
LEVEL 2
Ans 1: A small separate window that appears to user.
Ans 2: OK and CANCEL.
Ans 3: Step 1: to get the table-model
DefaultTableModel <name>= (DefaultTableModel) <table-name>.getModel();
Step2: tocount the rows
Int r = <name>.getRowCount();
Step 3: to remove the indexed row.
<name>.removeRow(index);
Ans 4: import javax.swing.JOptionPane;
Ans 5: setVisible(true);
Ans 6: float n1,n2;
n1=23.45;
n2=45.67;
float ans=n1+n2;
JOptionPane(ans);
Ans 7: showMessageDialog
showConfirmDialog
showOptionDialog
showInputDialog
LEVEL 3
Ans 1: InputArea
Icon Type
Message
Button
Ans 2: it is associated object that provides source-data to a JTable Object. It is the tablemodel that organizes the source data in row-column format.
Ans 3: int val =0;
Page 45 of 60
int sum=0;
do
{
val=JOptionPane.showInputDialog(“Enter any Number”);
sum=sum+val;
}while(val <> 0);
JOptionDialog.showMesageDialog(“The sum =” + sum);
Ans 4: This command specifies question mark icon to be displayed alongwith the
JOptionPane through message type property.
Ans 5: The Message dialog (invoked with showMessageDialog()) does not return anything.
UNIT 9:DATABASE CONNECTIVITY TO MYSQL
Level 1:
Ans1:Database Connectivity refers to connection and communication between an
application
and a database system.
Ans2: JDBC: Java Database Connectivity is a framework developed by Sun Java to help
Java connect to different databases
ODBC:Open Database Connectivity is a framework used by Microsoft to connect to various
types of databases.
JDBC provides database connectivity from within Java application to databaseswhereas
ODBCprovides databases connectivity to non-Java front end applications.
But ODBC is language independent as it can work with any language but JDBC is
language dependent as it works only for Java.
Ans3:A resultset refers to a logical set of records that are fetched from the databases by
executing a query and made available to the application program.
Ans4: getInt(),getFloat(),getString(),getDate().
Ans 5: next(), first(), last(), relative(int rows), absolute(intrno), getRow()
Level 2:
Ans1: Tasks:
a) Establish a connection with a database.
b) Sending SQL statements to database server
c) Processing the results obtained
Ans2: Connection: A connection is the session between the application program and the
database.
Role:To do anything with database one must have a connection object.
Ans3:It is use to create an instance of a driver and register it with the DriverManager.
Ans4: Consider following line of code:
Connection con=DriverManager.getConnection
(“jdbc:mysql://localhost:3306/test”,”root”,”pwd”);
*pwd is the password assigned to your MySQl.
Ans5: Statement object execute one static SQL statement on the associated database by
executing a query and made available to the application program.
Ans6:Class.forName(“com.mysql.jdbc.Driver”);
Level 3:
Ans1. a)Consider the Table DEPT(deptno,deptname,address).
Page 46 of 60
b) Provide connectivity URL.
c)Use Java classes
d)Store the Select query in a string.
e) use method executeQuery()
Ans2. Ans1. a)Consider the Table DEPT(deptno,deptname,address).
b) Consider the buttons INSERT,DELETE,UPDATE and write the respective
operations
separately.
b) Provide connectivity URL.
c) Use Java classes
d) Store the query in a string.
e) use method executeQuery() and executeUpdate()
Web Application Development
LEVEL-1
1. It is software programs that allow to user to access and navigate www. (Internet
Explorer,Mozilla Firefox, Google Chrome)
2. It is a software program that allows to user to access and navigate WWW. (Internet
Explorer,Mozilla Firefox, Google Chrome),Web Server is a program that runs on the
computer connected to the Internet and fulfils the request send by the web browser.(Ex.
Apache Web Server, Netscape Enterprise Navigator).
3. In Client/Server Computing: - Client makes a request for services from another program
and Server fulfils the request send by the clients.
4. A location on Net Server is called web site.
5. (a) Hypertext transfer protocol
(b) World wide web
(c) Uniform resource locator
(d) Computer generated imagery
6. Server-site
7. CGI
8. File
9. The WWW
10. Host
LEVEL-II
1. Each website has a unique address called URL (uniform resource locator) its
components are
(a) The type of server or protocol e.g http
(b) The name and address of the server. e.g MSN.com
(c) Location of the file on the server e.g. encycle.msn.com/get info/style.asp
2. CGI scripts and Server Side Scripts are used to create dynamic WebPages.
3. The other server on the Internet:-ftp, gopher, cater to textual information but www uses
http server caters
to multimedia information. So it enables user to receive hypertext
information.
4. FTP. (1 Mark for Abbreviation and/or Full Form)
5. A URL (Uniform Resource Locator) is the complete address of a document on the web,
Whereas a domain name specifies the location of document's web server. A domain
Name is a component of the URL used to access web sites.
For example the web address
http://www.example.net/index.html is a URL.
LEVEL-III
Page 47 of 60
1. Set of rules are called protocols. A file’s internet address or URL is determined by
protocol.
2. Dynamic WebPages support client server concept i.e. any request are fulfilled by server
while static
WebPages does not support client sever concept.
3. The character based naming system by which servers are identified is known as domain
name system.
4. HTTP
5. The above address is called IP address or Internet protocol address.
It is numerical label that is assigned to devices participating in a network.
Unit -2 ( Programming)
Chapter –11 SOLUTION ( HTML:-Basic HTML elements)
ANSWERS:
LEVEL 1:
1. to create web pages.
2. HEAD tag
3. not case-sensitive
4. .html (dot html)
5. Body of html document is prepared in <BODY> tag
6. <BODY BGCOLOR=VBRED>
LEVEL 2:
1. By usig <body> tag and its background attribute
2. Container tags have both starting and ending as well as empty tags have only starting tags.
3. LEFT, RIGHT , CENTRE
4. BGCOLOR, BACKGROUND
5. <BODY> , BACKGROUND
6. <P> tag is used for making paragraph and <BR> tag is used for break a line.
LEVEL 3:
1. It lets you know the basic size for the font. Attributes- size, face
2. It is basically used for a short segment of text.
3. <HEAD> tag is used for giving title of the document and <BODY> tag is used for making
body of the document.
4. <!------>
5. For giving different sizes of headings from h1 to h6
6. <SUP> TAG
7. Colspan is used for merging columns and rowspan is used for merging rows.
Chapter 12 : HTML-II (Lists ,Tables and Forms)
Level 1.
1 . The different forms of lists are: ordered and unordered lists. For example, UL and OL.
2. The <OL> tag is used to indicate a list item as contained in an ordered or numbered
form. For example
i. <OL>
1. <LI> Apples
2. <LI> Oranges
ii. </OL>
iii. Two attributes are: START, TYPE.
3. CELLPADDING tells the browser how much padding is required in the cell. In other
words between the side of the cell and the contents of the cell. Try a few different
numbers. Note that cell and padding run together and are one word. To control the
Page 48 of 60
horizontal alignment of text and images within table cells use the align attribute i.e.,
align=left, align=right or align=center.
4. CELLSPACING defines how much space you’d like in cells. It specifies the amount
of space between the frame of the table and the cells in the table. Note that cell and
spacing run together.
5. In a list, the TYPE attribute specifies the type of numbering (:A”, etc.) or bulleting
(“circle”, “Disc”, Square”, etc.) depending on whether the LI is inside an OL or UL
list.
6. The START attribute is used to change the beginning value of an ordered list.
Normally, the ordered list starts with 1. for example, <OL START = 10>
7. It is used to define a set of header rows.
8. They are used to specify the span of a cell.
9. Align attribute is used to control the horizontal alignment of the contents of a cell.
10. They are indented lists with a specific bullet.
Level 2:
1. Table is a collection of rows and column.
Followings are important tags
<Table> :- used to give identification to a table
<TH> :- To provide headings in a table
<TR>:- (Table Row) to create Row in a table
<TD> :- (Table Data) to create columns in a row
2. To create or use forms in a web page <FORM> tag is used. Form is means to
collect data from the site visitor. It is done with the help of controls that collect data
and send it over.
Example:
<FORM method = “POST” action=mailto:xyz.abc@gmail.com>
3. Text boxes are single line text input controls that are created using <INPUT> tag
whose TYPE attribute has a value as “Text”.
Example:
<FORM method = “POST” action=mailto:xyz.abc@gmail.com>
First Name:
<INPUT TYPE=”text” NAME = “fname”/>
<BR>
Last Name:
<INPUT TYPE=”text” NAME = “lname” />
</FORM>
4. <Input type =”radio” name=”stream” value= “science”/>
5. <Input type=”checkbox” name=”s2” value=”physics”/>
6. <text area=”5” cols=”50” name =”description”>
7. They are indented lists without any billet symbol or any number in front of each item.
Level 3:
1. Sometimes a table cell is bigger than other. Its span is spread to more rows or columns.
Such cells can be created with rowspan and colspan. For instance following code will
produce the table shown below it in which cells have different span.
<html>
<body>
Page 49 of 60
<table border>
<tr>
<td align=center rowspan =2 colspan=2>a</td>
<td>1</td>
<td>2</td>
</tr>
2. An HTML Form does not do anything without a program to process the information
.We need to specify the following things in order to get the form processed.
a) Where the processing program is located.
b) How it takes information i.e. whether we need to use the POST or GET method.
3. When Submit button is clicked then the forms data is submitted to the back end
application.
When Reset button is clicked then all the forms controls are reset to default size.
4. GET sends the information to the URL specified through action attribute.
POST sends the form information in the HTTP environment.
5. <html>
<body>
<p align=center>
<center><h1>example</h1></center>
</p>
<form method=post>
<p> persons name:
<input type="text" name="persons-name" size="40" maxlength="40">
<input type="hidden" name="recipient" size="40" maxlength="40">
</p>
<p> password:
<input type="password" name="password" size="10"maxlength="10">
</p>
<p>please place me on your mailing list
<input type="checkbox" name="mailing-list" value="yes" checked>
</p>
<p>what country do you live in?
<select name="country">
<option value="ind">india
<option value="usa">united states
<option value="ca">canada
<option value="fr">france
<option value="spr">singapore
</select>
</p>
<p>type of computer you have
<input type="radio" name="comp-type" value="486dx">486dx 
<input type="radio" name="comp-type" value="486sx">486sx 
<input type="radio" name="comp-type" value="pentium2" checked > pentium 2  
<input type="radio" name="comp-type" value="pentium3">pentium3 
Page 50 of 60
<input type="radio" name="comp-type" value="pentium 4">pentium4  
</p>
<p> comments
<input type="submit" name="request" value="submit this form">
<input type="reset" name="clear" value="clear form and start over">
</p>
</body>
</html>
UNIT III
Chapter-13 EXTENSIBLE MARKUP LANGUAGE
Level-I
1. Markup Language is a set of rules /tag that define the structure and format of text while
Presenting text.
2. XML stands for eXtensible Markup Language. Which allows creating application specific
structured document by allowing creation of new tags.
3. XML is used to describe what data actually means.
4. A meta-language is a language that’s used to define other language.XML is a meta language.
Level-II
1. (i) ADML (Architecture Description Markup Language)
(ii) GML
(Geography markup Language
(iii) MathMl(Mathematical Markup Language)
2.
HTML
XML
1
HTML document formats and
XML documents carry data
displays web page’s data
along with their description.
2
HTML tags are predefined
New tags can be created as per
our requirements.
3
HTML may not have closing
XML must have closing tags.
tags.
4
HTML tags are not case
XML tags are case sensitive.
sensitive
5
HTML documents are directly
XML documents are viewed only
viewable in a browser.
if proper style sheet file is also
available along with XML file.
3.
a. XML is designed to carry data not to display data.
b. XML was created to structure, store and to send information.
c. XML is self descriptive .Tags are not pre defined; rather they are created to describe the content
in appropriate manner.
d. XML is free and extensible.
e. XML is platform independent.
f. XML can separate Data from HTML.XML stores and describes data, which can later be formatted
and presented in desired way.
g. XML can be used to create new languages, since it is a meta language.
h. XML is supported and recommended by World Wide Web Consortium (W3C).
4. XML Validator And XML parser
Level-III
1.
<?xml version=”1.0”>
<message data=”9/10/2009>
Page 51 of 60
<sender>gurpreet</sender>
<receivers>
<receiver> Rehana </receiver>
<receiver> Josheph </receiver>
</receivers>
<text>project successfully completed
</text>
</message>
2. The above XML document is not well formed. The document suffer from two errors:
Improper nesting –The body element was opened inside the to element, yet body was not closed
before the to element was closed.
Mismatched cases of start and end tags-The tag<sender> is closed with </Sender>, which
is incorrect. XML is case sensitive, thus the end-tag of <sender> should be </sender> and
not <Sender>
My SQL Revision tour
Level 1:
1. A Primary Key is a set of one or more attribute that can uniquely identify tuples
within the relation.
2. A non key attribute, whose values are derived from the primary key of some other
table, is known as foreign key in its current table.
3. Referential integrity is a system of rules that a DBMS uses to ensure that
relationships between records in related tables are valid, and that users don't
accidently
delete or change related data.
4. No of tuples in a relation is known as degree and no of attributes in a relation is
known as cardinality.
5. The columns in relation is known as attribute and the rows in a relation is known as
tuple.
6. A virtual table derived from one of more underlying base tables.
7. A candidate key which is not primary key is known as alternate key.
8. The attribute combination in a relation that can serve as a primary key.
Level 2:
1. . key features are:
a.fast speed.
b.Ease of use.
c.Free of cost.
d.Portability.
e.Security
f.Provides many datatypes.
2. The difference between CHAR and VARCHAR is that of fixed length and variable
length.The Char datatype specifies a fixed length character string. when a clolumn is given
datatype CHAR(n), then the lenght is fixed to n characters and if the value is less than n
than blank is added, but the size remain n byte, where as VARCHAR, on the other hand,
specifies a variable length string.
3. DDL stands for Data Definition Language, that allows you to perform tasks related to data
definition.
DML Stands for Data Manipulation Language, and are used to manipulate data.
4. My SQL is a free, open source Relational Database Management that uses structured
query language. In a My SQL database, information is stored in tables.
5. select ename,empno from emp;
6. select ename,empno from emp;
7. select ename,sal,deptno from empl where comm is NULL;
8. select * from emp where sal*12 between 25000 and 40000;
Page 52 of 60
9. select * from empl where comm>sal;
10. select ename from emp where ename like'_ _ A%';
LEVEL 3:
1. Answers are as following:
a. create table club
(
Member_No number(5) Primary key,
Member_Name varchar(40) not null,
Address varchar(30),
Age number(2) check(age>=18),
Type varchar(10),
Fees number(6,2));
b. insert into club
values(101,‘reena’,’hissar’,24,’permanenet’,2000);
insert into club
values(102,‘meena’,’hissar’,24,’permanenet’,2000);
c. select * from club
where type= ‘permanent’ and fees>5000
d. alter table club
add(phno integer);
e. Update club
Set fees=fees*.10
Where type= ‘temp’;
f.
2.
3.
4.
5.
Select * from emp
Where age>=18;
Answers are as follows:
i. Select * from teachers where department=’HISTORY’
ii. SELECT name from teachers where department=’HINDI’ and sex=’F’
iii. Select name from teacher order by dateofjoin
iv. Select * from teacher where salary between 20000 and 35000
v. Select name, age, department from teachers order by department
vi. Select avg(salary) from teacher group by department
vii. Select avg(salary) from teacher group by department
viii. Select department, sum(salary) from teacher group by department
sum(salary)>50000
ix. Select avg(sal), sex from teachers group by sex
x. Desc teachers.
The degree is 7 because the no of attributes are 7 and cardinality is 8
Now the degree will become 8 and cardinality will be 11.
Answers are as follows:
a. Select * from SchoolBus where capacity > noofstuents
b. Select Area_covered from SchoolBus where distance>20 and Charges<8000
c. Select sum(Noofstudens), Transporter from SchoolBus group by Transporter
d. Insert into SchoolBus values(11, ‘Moti bagh’,35,32,10,’ kisan tours ‘, 35000)
having
e. Run the query and check
6. Answers are as follows
a. Select name from graduate where div=’I’ order by name;
b. Select NAME, STIPEND, SUBJECT , 12*stipend from graduate;
c. Select count(*) from graduate where subject=’physics’ or subject=’comp. sc’;
d. Insert into graduate
Values(11,’KAJOL’, 300, ‘computer sc’, 75, 1);
Page 53 of 60
e. Run the query and check
7. Answers are as follows:
a. Create table furniture
(
Itemno int(5) primary key,
Itemname varchar(20) not null,
Type varchar(20) reference item(type),
Dateofstock date default=’10-03-10’,
Price int(6) check(price<40000),
Discount int(2) not null);
b. In delete command the name of the columns must not be given in the command.
Database Transaction
Level 2
1. Transaction : A transaction is a logical unit of work that must succeed or fail in its entirety. A
transaction might be a sequence of many SQL statements, but logically performing a single
task, thus all the SQL statements should work as a whole or none at all ensuring the
consistency of the database. A transaction is an atomic operation which may not divided
into smaller operations.
2. ACID properties : A database system must maintain the following four (Atomicity,
Consistency, Isolation, & Durability) properties of a transaction:
a) Atomicity : (All or None) This property ensures that either all operations of the
transaction are executed or none at all.
b) Consistency: This property implies that if the database is in consistent state before
the execution of the transaction, database must remain in consistent state after the
execution of the transaction.
c) Isolation: This property suggests that if a transaction is being executed in the
database system, no other transaction should be executed at the same time. It
simply refers that if a transaction is accessing/modifying some data item, that data
item must not be available to other transaction at the same time, since it may be in
an inconsistent state.
d) Durability : This property of transaction ensures that after the successful
compeletion of the transaction the changes made by it to the database persist, even
if there are system failures.
3. Commit: This command permanently commits all the changes made in the database after
last commit command was executed. After committing the transaction, changes made can
not be rolled back.
RollBack : This command rolls back (undoes) all the changes made in the database after
last
commit command was executed.
SavePoint : In between the transaction savepoints can be defined. If in any case rollback is
needed
but only a few operations are needed to be rolled back, savepoints are useful. Using the
ROLLBACK TO command changes can be undone in reverse direction(last change to first
change)
upto specified SAVEPOINT.
4. DDL Statement.
5. Rollback undoes the previous changes and Commit does the changes permanently.
UNIT-III
Chapter-14 MYSQL REVISION TOUR
Level-I
Page 54 of 60
1. (i) 29, 33
(ii) kv pinjore
2. Reduce redundancy, Control inconsistency, Provide security and protection.
3. Drop table means delete the entire table and drop database means delete the database with
all its
tables.
4. A non key attribute of the relation that is foreign key of the other table and primary key for
first table
5. It is multithreaded Open source RDBMS.
6. Single row function individual result for each row where as aggregate function gives
aggregated
result for the given group of rows.
7. To perform any aggregate operation in groups, we use GROUP BY clause with the Select
statement
8. According to table
(i) Select * from teachers where department=’HISTORY’;
(ii) SELECT name from teachers where department=’HINDI’ and sex=’F’
(iii) Select name from teacher order by dateofjoin
(iv) Select * from teacher where salary between 20000 and 35000
(v) Select name, age, department from teachers order by department
(vi) Select avg(salary) from teachers
(vii) Select avg(salary) from teacher group by department
(viii) Select department, sum(salary) from teacher group by department having
sum(salary)>50000
(ix) Select avg(sal), sex from teachers group by sex
(x) Desc teachers
Level-II


It maintains the integrity of the Database. It does not allow any data to be deleted accidentally.
A primary key is used to uniquely identify each row in a table.
NOT NULL constraint ensures that a column cannot have NULL value.
Example:
CREATE TABLE STUDENT
(ROLLNO INT PRIMARY KEY,
FNAME VARCHAR(20) NOT NULL,
LNAME VARCHAR(20) );
Or
CREATE TABLE STUDENT
(ROLLNO INT,
FNAME VARCHAR(20) NOT NULL,
LNAME VARCHAR(20)
PRIMARY KEY (ROLLNO) );
 DDL commands:- These are data definition language that are use to create table, views,
indexes schemas. E. g. create, alter, drop
DML Commands:- Thaese are data definition language that are used for update, insert and
delete the data from table. E. g. insert, update, delete
 Char :- A fixed-length string between and 255 characters in length right-padded with spaces
to the specified length when stored values must be enclosed in single quotes or double
quotes.
Varchar:- A variable-length string between 1 and 255 characters in length; for example
VARCHAR(25).Values must be enclosed in single quotes or double quotes.
More on SQL
Level 1
1.
Rules that are defined when a table is created. They help in preventing certain type
of inconsistent values from being placed in the column(s).
2.
Page 55 of 60
3.
4.
5.
6.
7.
8.
9.
10.
Constraints
name
Description
PRIMARY KEY
Used to create a primary key
UNIQUE
to create a unique key
NOT NULL
to define that column will not accept null values.
FOREIGN KEY/
REFERENCES
to define referential integrity with another table.
DEFAULT
to define the columns default value.
CHECK
to define the custom rule.
A Primary key constraint uniquely identifies each row in a table which means that no
two rows in a table can have same values. No, only one primary key constraint can
be created for each table.
Foreign key enforces referential integrity. A foreign key column is one whose values
are derived from primary key column of another table. Yes, a table can have multiple
foreign keys.
A NOT NULL constraint enforces that the column will not accept NULL values.
Unique and NOT NULL
Create table table-name(column-name data-type(size) primary key….);
It limits the values that can be inserted into a table eg. The age entered by user
must be greater than 18
When a user does not enter a value for the column (having default value),
automatically the defined default value is inserted in the field
Drop table table-name;
Answers
Level 2
1.
2.
3.
4.
Alter table
Select * from book where price IS NULL;
Roll Number
Column constraints apply to individual columns whereas table constraints apply to
group of one or more columns
5. A composite primary key is made up from combination of columns and it can be
defined as only a table integrity constraint.
6. It states that if a DELETE or UPDATE operation affects a row from parent table,
then automatic delete or update is made in matching rows of child table.
7. a) Alter table <tablename> ADD [column] <columnname> <datatype>;
b) Alter table <tablename> modify [column] <columnname> <column definition>;
c) Alter table <tablename> drop [column] <columnname>;
8. Yes, with alter command. Alter table <tablename> add primary key(columnname);
9. Yes. Alter table <tablename> drop primary key;
10. Show create table <tablename>;
11. MySQL does not require that NOT NULL be defined for each column belonging to
primary key. MySQL will define the column as NOT NULL itself.
12. Create table address(city varchar(20), state char(2), pin int primary key);
13. Foreign keys are defined to force a DBMS to check that no incorrect data can be
entered in the tables.
Answers
Level 3
Page 56 of 60
1.
2.
3.
4.
5.
SET NULL
C)
Line 5, because NOT NULL constraint is not defined at table level.
We can’t disable primary key but can be dropped if required with Alter command
To disable: SET FOREIGN_KEY_CHECKS=0;
To enable: SET FOREIGN_KEY_CHECKS=1;
6. Alter table a1 drop foreign key f1;
7. a) Domain Integrity
b) Referential Integrity
8. c) REFERENCES
9. A PRIMARY KEY or UNIQUE KEY must exit on parent table
10. When the referenced and referencing tables associated with a foreign key are the
same, such a table is called self-referencing table.
UNIT -4
IT APPLICATION
Answers of Level 1 Questions
A “front-end” application is one that application users interact with directly.
For example, Internet Browser or any other software application where an
end user works.
Ans. 2
A “back-end” application or program serves indirectly in support of the frontend services, usually by being closer to the required resource or having the
capability to communicate with the required resource. For example databases
like MySQL, Oracle, OOo Base, MS-Access etc.
Ans. 3
E-Governance is the use of a range of modern
information and
communication technologies such as internet , local area network, mobiles
etc. by government to improve effectiveness of
their services.
Ans.4
E-Learning is a delivery of learning, training or education program by
electronic means
Ans.5
E-business is a term used to described business run on the computer
Ans.6
If Data Validation is not done then prog. May work on wrong data, therefore
data validation2 is important.
Ans.7
Front End : Java
Back End : My SQL
Ans.8
B2B, B2C, C2C C2B, B2B
Ans.9
User interface is the junction between a user and a computer Program. It sets
command or menus through user communicate with a program.
Ans10
Textbox, text area, button, Label, checkbox, radio button, combo box, list box
etc.
Ans. 1
Answers of Level 2 Questions
Ans. 1
a.
b.
c.
d.
Improves Government processes
Increases the efficiency and speed in a transparent manner.
Simplify administrative transactions.
Citizen can participate in decision making process
Ans.2
i.
ii.
iii.
Improved quality of information and information supply.
Reduction of process time.
Cost reduction
Page 57 of 60
iv. Improved service level
v. Increased efficiency.
Ans.3
There are various social be benefits of e-governance
a. openness and transparency
b. Enhanced policy effectiveness
c. Increased democratic participation etc
d. Increased economic competitiveness.
Ans.4
It reduced overall cost, learning time reduced, increased retention and
application to job.
Ans.5.
i. It enables students to complete training conveniently at off-hours
or form home.
i.
Self pacing for slow and quick learners reduces stress and
increased satisfaction.
ii.
Interactivity engage users, pushing them rather than pulling
them through training etc.
Ans.6
Textbox, text area, button, Label, checkbox, radio button, combo box, list box
etc.
Ans.7
User interface is a junction between user and a computer. it has various
advantages
a It provides ways to communicate
b. It provide meaningful feedback when error occur and provide context
sensitive user help facility.
c. It provides appropriate interaction facilities for different types of system
user.
Ans. 8
E-learning is preferred because it provides faster learning at reduced cost,
increased accessed to learning and clear accountability for all participants in the
learning process.
Ans. 9.
i.
i.
Ans. 10
Use of web to find prices and reviews
Use of our website for managing the information in our
business.
ii.
Fast communication with customer, members or suppliers via
email etc.
b.
Use of website for research and to find recent trends.
There are two main issues while designing front end interfaces these are
a. How can information from the user are provided to the computer
system?
b. How can information from the computer system be presented to the
user?
The various ways of data entry are as fallows.
i. Direct Manipulation
ii. Menu Selection
iii. Form Fill in.
iv. Command Language
v. Natural Language.
Answers of Level 3 Questions
Ans.1.
Front-end means which you are going to have look and feel like jsp,
swings, awt package, Backend means which is going to implement business logic
for you.
Page 58 of 60
Ans.2.
Front-end testing is basically GUI testing or GUI functional testing.
Backend testing involves databases or any backend storage. It’s basically testing
data while travelling from front to back end or in back end to back end only.
For example, if you enter some data in front end application and it is getting
stored on some database then you have to test it whether it is storing correctly you
can do it by writing sql queries / scripts.Also if application is not front end (GUI) for
example, you are creating some table using joining 40 different input/source tables
then you have to test it. In this case you have write queries to validate source and
target data between those table using sql scripts.
Ans.3. It reduced overall cost, learning time reduced, increased retention and
application to job.
Ans4. 1. A lot of productive time of government servants and general public is
saved.
2. Transparency has increased and therefore cheating cases have been
reduced.
Ans.5 It reduced overall cost, learning time reduced, increased retention and
application to job.
.Ans.6 Yes , In many ways
a. Cost effective
b. Time saving
c. Transparency
d. Simplicity in work etc
Ans.7 Java interface MYSQL through JDBC.
Ans.8 E-Learning offers many things as compared to normal learning like use of
technology, learning on demand, participation of all etc.
Ans.9 • Goods sold through e-business are generally cheaper as cost incurred in
ebusiness
is less compared to setting up a traditional business.
• Customers can receive highly customizable service.
• Even Remote area customers are reached in e-business.
• Sellers have better understanding of their customers' needs as customers
communicate through e-mails.
Ans.10
Textbox, option button, combo box, radio button, Label and refer case
study for GUI Development Steps
Page 59 of 60
Page 60 of 60
Download