ip ques studymaterial oct2010

61
UNIT -1 COMPUTER NETWORKING S.N o. Concepts Degre e of Import ance Level of Assignme nt Errors generally committed 1. Introduction of  Network * L1 Correct use of technical word in definition , lack of express the objective in Point wise form 2. Elementary Terminolog y of Networks ** L2, L3 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 understandi ng the conc ept, misunderstan ding 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 cab ling with diag rams, tech nica l word not used in definition and difference 6. Network Devices ** L1, L2 Formation of connecting of two devices, misunde rstanding bridge, gateway and router, lack of using technical word 7. Network Security *** L1,L2, L3 Active protection and preventive measures mix up in ev er y aspect , ex ampl es no t given for  explanation. Level - 1 1. De fi ne a netw or k. 2. Wh at is MAC Add ress? 3. Wh at i s IP address? 4. What ar e the va rio us types of netwo rks ? 5. Wha t is mea nt by Top olog y? Name some popu lar to pol ogi es. 6. Defi ne Hub. 7. De fi ne sw it ch . 8. What are the goals of network? 9. Disc uss an d compare vari ous ty pes o f ne twor ks? 10. Explain m ostly use d topolog ies. 11. What are hubs? What are its types? 12. Disc uss repeat er. Level – 2 1. Write tw o adv antag es of netw ork s. 2. Wr ite two disa dva nta ges of netw ork s. 3. Wha t is communic atio n channel? Name the basic types of communication channels available. 4. Wha t is doma in n ame ? How is i t a lter nati vely know n? 5. Wha t is the difference between MAN and WAN? 6. Wha t are the l imi tatio ns of star topo log y? 7. Writ e the disadvan tage s if twisted pair cables. 8. Wr ite th e app lic ati ons o f net work? Page 1 of 61

Upload: pulkit-gosain

Post on 05-Apr-2018

242 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 1/61

UNIT -1COMPUTER NETWORKING

S.No.

Concepts Degree of Import

ance

Level of Assignment

Errors generally committed

1. Introduction of  Network

* L1 Correct use of technical word in definition , lackof express the objective in Point wise form

2. ElementaryTerminology of Networks

** L2, L3 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 IPaddress

3. NetworkTopologies

*** L1, L2, L3 Factor of topology clearly not in point wise,layout of topology mix up with others, lack of understanding the concept, misunderstandingin star and ring topology.

4. Types of  Networks

*** L2, L3 Technical word should be differentiate betweentwo types of network, proper example not givenduring explanation

5. TransmissionMedia

***** L1,L3 Lack of knowledge of different pair of cables,formation of cabling with diagrams, technicalword 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 - 11. 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 – 21. 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 61

Page 2: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 2/61

9. Advantages and disadvantages of the followings :a. optic fiber b. coaxial cablesc. twisted pair cablesd. radio wavese. microwavesf. Satellites

10. is the role of a switch in a network?11. What is denial of services attacks?

Level – 31. What are the factors that must be considered before making a choice for the topology?2. What are the similarities and differences between bus and tree topologies?3. When do you think, ring topology becomes the best choice for a network?4. Write the two advantages and two disadvantages of star topology in network.5. What do you understand by domain name resolution?6. What are communication channels? Discuss various channels available for networks?7. What are common threats to network security?8. How can you prevent/ counter threats of network security?

UNIT 2OPEN SOURCE CONCEPT

SNO. CONCEPT DEGREEOFIMPORTANCE

LEVELOF ASSIGNMENT

ERRORSGENERALLYCOMMITTED

1 OPEN SOURCE BASEDSOFTWARE

** L1 PROBLEM INDIFFERENTIATION OF FREE

SOFTWARE,OPENSOFTWARE ETC.

2 TYPES OF STANDARD * L1 DONOT KNOW ABOUTPROPRIETARYSOFTWARE

3 COMMON OPEN STANDARDFORMATS

*** L2 PROBLEMS INOGG VORBIS

4 INDIAN LANGUAGE COMPUTING ** L3 PROBLEMS IN ASSIGNMENT OFCODING

LEVEL 1Q1.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 IIQ1.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 61

Page 3: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 3/61

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-IIJava GUI Programming Revision Tour – I

S. No. Concept Degree of  Importance

Level Errors generallycommitted

References

1 Netbeans JavaIDE

** L1,L-2 Not useappropriatecomponent

2 Basics of GUI * L1 Wrongproperties used

3 Tokens * L1 Wrongidentification

4 Data Types *** L1,L2 Appropriate datatypes not used

5 Variables ***** L2, L3 WrongDeclarations

6 TextInteractions

**** L1, L2 Proper syntaxerrors

7 Operators inJava

***** L1, L2 Wrongevaluation

8 Expressions **** L1, L2,L3 Semicolon notused

9 Programming

Constructs

***** L2, L3 Loop termination

errors

Level - 1Que1. 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 61

Page 4: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 4/61

Level – 2Que1. . 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 inJava.

Level -3Que1. 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 valueof 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 – IIS. No. Concept Degree of  

ImportanceLevel Errors

generallycommitted

References

1 GUIProgramming

** L1,L-2 No completedefinition with

example2 Frame ** L1,L2 Diagram

never shown

3 Push Buttons ** L1 Coding andpropertiessetting 

4 Labels *** L1,L2 Coding andpropertiessetting

5 Text fields *** L2, L3 Methodwritten notproperly

6 Radio Buttons *** L1, L2 Not properlydefined

Page 4 of 61

Page 5: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 5/61

7 Text Area ***** L1, L2 UI propertiessetting

8 Check Boxes ** L1, L2.L3 Coding andsymbolsusing

9 Combo box ***** LI,L2, L3 Command

written10 List *** LI,L2, L3 Programming

not proper done

Level – 1Que1. What command do you need to write in actionPerformed() event handler of a button,

in order to make it exit buttonQue2. 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 acombo 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 – 2Que1. 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? ExplainQue7. What is IDE? Name two IDE for Programming in java.Que8. Name any two types of Tokens available in JavaQue9. 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, whathappens if every case fails and there is no default option?

Que10. What is the purpose of ‘break’ statement in java?

Level – 3Que1. What is a list? How it is different from combo boxQue2. 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 61

Page 6: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 6/61

Que5. What do you understand by message and an eventQue6. Define GUI .How can you create a GUI application on java platformQue7. Assume the following interface built using Netbeans used for bill calculation of a ice-

cream 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 theappropriate check boxes according to the verities of ice-cream chosen by thecustomer 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 thetotal bill of the customer. It first displays the rate of various ice-creams in the respectivetext fields. If a user doesn’t select a check box, the respective ice-cream rate mustbecome 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 boxesget 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-IIChapter- 5 JAVAGUI PROGRAMMING REVISION TOUR-III

S.No. Concepts Degree of  Importance

Levels of Assignment

Errors generallycommitted

1 Objects * L 1 Definition is not cleared inreal world

2 Classes * L 1 Students is getcomplexed in declarationof private, public andprotected part

3 Methods *** L3 How decide parametersand signature

4 Use of keywordVoid

* L1 When students used voidkeyword

5 Actual andformalParameter 

** L2 How can you differentiateactual and formalparameter in real world

Page 6 of 61

Page 7: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 7/61

6 Constructor ** L2 limitation of constructors

7 This Keyword *** L3 e.g. of real world , wherethis using

8 Class Methodsand InstanceMethods

** L2 Static keyword is usingwhere

LEVEL-I1. 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-II1. 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-III1. List some of the special properties of the constructor methods?2. Differentiate between Composite Data Type and User- Defined Data type.

3. Differentiate between Software Objects and Real world Objects?4. What is ‘this’ OBJECT?

Chapter –SixMore about classes and libraries

Sr No Concepts Degreeof Importance

Levels of Assignment

Errors generally committed

1 Controlling accessto members of class

** L 1,L3 Definition not cleared , scope for eachaccess specifier is wrongly explained ,example not given

2 Java libraries *** L1,L2 Improper Usage for Method ,argument passed to each method notspecified correctly,

3 Working with string ***** L1, L2,L3 Working of methods not explainedcorrectly , difference between stringbuffer and string data type not cleared ,working of comapreTo() & equals( )methods

4 Using math library ***** L1,L2,L3 Argument passed to method notmentioned , return type not mentioned

5 packages * L1 Packages used for methods not known

Reference : “Informatics Practices “ by Sumita Arora“Informatics Practices “ by Reeta SahooQuestion bank by Sumita Arora

Page 7 of 61

Page 8: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 8/61

Level 12. What is the difference between length( ) and capacity( ) string function?

a. Explain the following string functions available in Java giving suitable examples ineach 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 21. What is a package? Why do we design a package?.2. What members of a class out of private, protected and public are inheritable?3. When do we declare a method or class ‘final’? Explain with example4. When do we declare a method or class abstract? Explain with example5. 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 thefollowingcode

 jTextField1.setText(Math.power(2.3));jTextField2.setText(Math.round(2.3));

7. What will be the contents of jTextField1 , jTextField2 , jTextField3 after executing thefollowingcode

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 thefollowingcode

String s1 = "ABC ";

 jTextField1.setText(s1.indexOf(‘C’));

Page 8 of 61

Page 9: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 9/61

Level 31. 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 anddisplay 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 mark4. find output if ”abc”is passed as argumentPublic 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 -7InheritanceSr.No Concept Importanc

eLevels Errors

1 Definition & need *** 1,2,3 Generally no errors

2 Types of Inheritance ** 1,2 Confusion between Multi-level & Multiple Inheritance

3 Base & Derived Class ***** 1,2,3 Improper definition of subclass

4 Visibility Modes **** 1,2,3 Difference between protectedand public visibility modes

5 Function Overloading *** 1,2,3 Confusion in type of  arguments

Page 9 of 61

Page 10: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 10/61

6 Function Overriding *** 1,2,3 Which of the function will becalled by which object

7 Abstract Class &Methods

** 2,3 Generally No errors

8 Interfaces ** 2,3 Generally No errors

Level 11. 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 31. 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 61

Page 11: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 11/61

Unit -2 ( Programming)Chapter – 8 ( GUI Dialogs and Tables)

SNo Concept Degree of  Importance

Level of Assigment

Error Reference

1.  jDialog * L 1 Error In Designing

2. jOptionPane ** L 2 coding3. jOptionPane

DialogTypes* L 1, L2 Problem in using

value/code for the dialogtype

4. Creating jOptionPaneprogramatically

*** L 2, L 3 Classes required to beimported

5. Tables * L 1 Use of methods

6. Table Model * L 1 Problem of theDefaultTableProperty

Level 1:1. What is use of Dialog window?2. Which control allows display and render data in row and column format?3. Can you insert/remove rows from an existing table?4. What is JOptionPane?5. What is jTable Control?6. How to disappear the dialog window?7. Explain all the Dialog Types supported by jOptionPane?

Level 2:1. What do you know about jDialog?2. Which Buttons will be shown by Input Dialog by Default?3. Write code to remove first & last row of a table?

4. Write the import statement required for using jOptionPane Class?5. Name the method which helps to display a dialog box?

6. Write the code to add two floating point numbers and display in dialog box.7. Name four methods associated with jOption dialog.

Level 3:1. Explain all the elements of JOptionPane?2. Explain Table-Model alongwith its significance?3. Create an application to take input from the user and display the sum when user input 0.4. Explain the use of JOptionPane.QUESTION_MESSAGE dialog.5. Which predefined dialog types of JOtionPane class does not return anything?

UNIT 9:DATABASE CONNECTIVITY TO MYSQL

SNO CONCEPT IMPORTANCE LEVELS Errors1 JDBC ODBC Definition *** 1 Use of proper words

2 Classes Used for  Databases Connectivity

* 2 Appropriate classesshould be usedaccording to the

description

3 Methods to perform

operations like display,delete ,insert and

update etc.

* 3 Take care of syntax,

indentation

Page 11 of 61

Page 12: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 12/61

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 dialogsfor Posting a information, asking a question or prompting for simple user input. How canimportit in your program/ application?

.UNIT -2WEB APPLICATION DEVELOPMENT

S.NO

Concepts Degree of  Importanc

e

Levels of Assignme

nt

Errors generally committed

1 Web Browser *** L 1 Example not given or sometimesstudents mix the definition with webserver 

2 Web Server *** L 1 Students does not understand theactual concept of or definition of Web Browser and write wrongdefinition

3 Web Addressand URL

** L2 Students generally does not givedetails answer of this question withexample

4 Communicating with webserver 

* L3 Students generally have no ideaabout this topic

5 Client Server   Application

** L3 Students Does not give rightdefinition of this topic

Page 12 of 61

Page 13: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 13/61

LEVEL-11. 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) CGI6. 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-21. 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-31. 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 Degree of  Importance

Level of Assigment

Error Reference

1. HTML and itscapabilities

** L1 Concept clarity is not there

2. Writing HTMLDocuments

** L2 Improper use of tags

3. Container and

Empty Elements

* L1,L2 Tags not properly closed

4. HTML tagstructure

* L1 Problem in syntax

5. Basic HTMLTags

*** L2,L3 Proper use not known

Level 1:

1. What is the purpose of HTML?2. In which section of an HTML do you enter the TITLE element?3. HTML tags are case-sensitive or not?4. Write the extension of HTML file?

5. What is the purpose of using BODY tag?6. Write HTML code to set the bgcolor as “red”.

Level 2:

Page 13 of 61

Page 14: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 14/61

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. What is a BASEFONT tag? Name any two attributes of this.2. Differentiate between BASEFONT and FONT tag?3. How is HEAD tag different from <BODY> tag?4. How can you give comments in HTML?5. What is the purpose of using the tag <H1>…<H6>?

6. Which HTML command is used to display the following in your web page- X2 + Y2 ?7. What is the difference between Colspan and rowspan?

Chapter 12 : HTML-II (Lists ,Tables and Forms)

S.No Concept Degree of Importance Levels of Assignment

Errors

1 Lists *** L1,L2 Use <UL>tag when<OL>tag is required

2 Tables **** L2,L3 Confuse when settings areto be applied to the wholetable and when to aparticular cell.

3 Forms **** L3 Students Do not give

proper formatting to theform.

Level 1:1. What are the different forms of List used in HTML? Name them.2. What is a <OL>…</OL> tag? Name any two attributes used with this tag.3. What is CELLPADDING?4 What is CELLSPACING?5 What is the purpose of using TYPE attribute used in Lists?6 What is the purpose of using START attribute used in Lists?7 What is <THEAD> tag?

8 What is rowspan and colspan attributes?9 What is Align attribute?10 What is unordered lists?

Level 2:1. What is table? What are the basic commands for creating a table?2. What is FORM tag? Explain with example.3. What is INPUT tag? Explain with example.4. What is the syntax of creating Radio box?5. What is the syntax of creating Check box?6. What is the Syntax of creating Text Area?7. What are <DL> ?

Page 14 of 61

Page 15: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 15/61

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 61

Page 16: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 16/61

Page 17: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 17/61

My SQL Revision tour 

SNO

CONCEPT DEGREE OFIMPORTANCE

LEVEL OF ASSIGNMENT

ERROR

1 Different data models * L1 Give proper technicalwords

2 Relational modelterminology

**** L1,2 Confusion about thedifferent terminology. suchas candidate key andalternate key.

3 Introduction to MySQL ** L1 Generally no errors

4 My SQL and SQL ** L1 Give proper technicalwords

5 MySQL elements * L1 Give proper technicalwords

6 Assessing Database inMySQL

** L1, Do not know how enter inthe data base

7 Creating tables in MySQL *** L1,2 Problem in giving data typeand column name

8 Making simple queriesthrough Select Command

***** L1,2,3 Generally in combining twoconditions and patternmatching

9 My SQL Function ** L1,2

10 Creating table with SQLConstraints

***** L1,2,3 Check and defaultconstraint

11 Viewing Table structure * L1 Generally no errors12 Modifying Data from table ***** L1,2,3 Problem in setting thevalues

13 Altering tables ***** L1,2,3 Confusion in alter andupdate command

14 Dropping tables ** L1 Do not make the tableempty while dropping thetable

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 61

Page 18: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 18/61

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 emp7. Write a query to display employee name, salary and department number who are notgetting

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 thirdalphabet.

LEVEL – 31. Answer the following questions based on the table CLUB given below:

TABLE :CLUBColumn Name Data Type Size Constraints Description

Member_NoMember_Name Address AgeTypeFees

Number Varchar2Varchar2Number Varchar2Number 

540302106,2

Primary KeyNot Null

>=18

Member number Name of themember  Address of hemember  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 10/01/97 12000 M

2 PRATIGYA 31 HISTORY 24/03/98 20000 F

3 SANDEEP 32 MATHS 12/12/96 30000 M

4 SANGEETA 35 HISTORY 01/07/99 40000 F

5 SATTI 42 MATHS 05/09/97 25000 M

6 SHYAM 50 HISTORY 27/06/98 30000 M

7 SHIV OM 44 COMPUTER 25/02/97 21000 M8 SHALAKHA 33 MATHS 31/07/97 20000 F

Write SQL commands for the following:

Page 18 of 61

Page 19: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 19/61

i. To show all the information about the teacher of History department.ii. To list the names of female teachers who are in Hindi department.iii. To list the names of the teachers with their date of joining in ascending order.iv. To list the details of all the teachers who’s salary is between 20000 to 35000.v. To list Name, age, department of all teachers. This information should be sorted on

Department.

vi. To find out the average salary of all the teachers.vii. To find out the average salary of all the departments.viii. To find out the departments for which the total salary is more than 50000.ix. To find out the average salary given to each sex.x. Write command to list structure of above table.

3. Consider the table given just above and write cardinality and degree of thattable.(teacher table)

4. Suppose I have added one more column and 4 more rows in the above giventable(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

Rtno

 Area_covered Capacity

Noofstudents Distance

Transporter Charges

1 Vasant kunj 100 120 10 Shivamtravels 100000

2 Hauz Khas 80 80 10 Anand travels 85000

3 Pitampura 60 55 30 Anand travels 60000

4 Rohini 100 90 35 Anand travels 100000

5 YamunaVihar 

50 60 20 Bhalla Co. 55000

6 KrishnaNagar 

70 80 30 Yadav Co. 80000

7 Vasundhara 100 110 20 Yadav Co. 100000

8 PaschimVihar 

40 40 20 Speed travels 55000

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 inorder of Rtno.

(b) To show area_covered for buses covering more than 20 km., but charges less then80000.

(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;

6. Study the following table and then answer the given questions:TABLE : GRADUATE

S.NO NAME STIPEND SUBJECT AVERAGE DIV.

1 KARAN 400 PHYSICS 68 I

2 DIWAKAR 450 COMP. Sc. 68 I

3 DIVYA 300 CHEMISTRY 62 I4 REKHA 350 PHYSICS 63 I

5 ARJUN 500 MATHS 70 I

6 SABINA 400 CEHMISTRY 55 II

Page 19 of 61

Page 20: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 20/61

7 JOHN 250 PHYSICS 64 I

8 ROBERT 450 MATHS 68 I

9 RUBINA 500 COMP. Sc. 62 I

10 VIKAS 400 MATHS 57 II

List the names of those students who have obtained I DIV sorted by NAME.(b) Display a report, listing NAME, STIPEND, SUBJECT and

amount of stipend received in a year assuming that the STIPEND is paid every month.

(c) 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

  (e) Give the output of following sql statement based on table GRADUATE:(i) Select MIN(AVERAGE) from GRADUATE whereSUBJECT=”PHYSICS”;

i) Select SUM(STIPEND) from GRADUATE WHERE div=2;(iii) Select AVG(STIPEND) from GRADUATE where AVERAGE>=65;

v) Select COUNT(distinct SUBDJECT) from GRADUATE;

7. Write a SQL commands for table FURNITURE

Table: FURNITUREITEMNO ITEMNAME TYPE DATEOFSTOCK PRICE DISCOUNT

INT VARCHAR VARCHAR DATE INT INT

5 20 20 - 6 2

PrimaryKey

Not Null ReferencetoTYPEcolumn of item table

Default ’10-03-10’

Price <40,000

Not Null

a). Write a MYSQL Command to create a furniture table including allconstraints.

b). On the FURNITURE table, ITEMNO is the primary key. TYPE is the ITEMtype of furniture and refers to the TYPE column of ITEM Table. TheDISCOUNT is a NOT NULL column.

c) Evaluate this DELETE statement:DELETE ITEMNO, TYPE, DISCOUNT FROM FURNITURE WHEREITEMNAME=‘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 madeany primary key at the time of creation. Can you suggest some solution query to this problem.

UNIT-IIICHAPTER-15 Concept of Database Transactions

S.N Concept Degree of  importance

Level of assignment

Error 

1 Transaction execution *** L2 Definition not well explained

2 Transaction properties *** L2 Mismanaged meaning of four  properties of eachtransaction

3 Transaction controlcommands (Begin/starttransaction, commit,

*** L2 Syntax written is normallywrong

Page 20 of 61

Page 21: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 21/61

savepoint, rollback)

Level 2

1. What is a database transaction? What TCL commands are separately by SQl?2. What are ACID properties? Explain individual term separately?3. Explain commit, rollback and savepoint statements.4. Which statement is implicitly committed?5. Explain the difference between ROLLBACK and COMMIT.

 Practical questions of Level 2:

1. Expain how the following SQL script would affect a table.

a. START TRANSACTIONb. UPDATE…c. INSERT…d. SAVEPOINT S1e. INSERT…

f. SAVEPOINT S2g. DELETE….h. ROLLBACK WORK TO SAVEPOINT S2i. UPDATE… j. ROLLBACK WORK TO SAVEPOINT S1k. UPDATE….l. DELETE…..m. COMMIT WORK

2. Given a table emp(empid, name,salary) , determine the which changes will becomepermanent, 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. ROLLBACKe. BEGINf. INSERT INTO EMP(1001,’AKASH’,34000);g. UPDATE EMP SET SALARY=SALARY*.01+SALARY ;h. COMMITi. BEGIN j. INSERT INTO EMP(1002,’AKASHY’,24000);k. ROLLBACK WORKl. UPDATE EMP SET VALUE=50000WHERE EMPID=1002m. COMMIT WORK

UNIT-IIIChapter-14 MYSQL REVISION TOUR

Sr.No.

Concepts Degreeof 

Importance

Level of Assignments Errors Analysis

1. Introduction ** L-1 Definition of data, information,database, DBMS are confusingand not compared properly.

2 DBMS ** L-2 Advantages and disadvantages of  

DBMS are not written properly3 RDBMS *** L-1 -Confusion in Row, column,

- Confusion between cardinality,

Page 21 of 61

Page 22: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 22/61

degree and domain of a relation-Confusion in fields and records of table-Confusion in weak entity, strongentity-Confusion among different keys.

4 Introduction to

My SQL

*** L-1, L-2 - Confusion in Full form of SQL

-Confusion in comparison of MySQL & SQL

5 Data Types ** L-2 -Confusion between char or  varchar datatypes.-Always mistake when Dates areinserted into table.

6 SQLCommands

***** L-1, L-2 - Always mistake when queriesare written as on of following-Comma, From , Or, and ,between, in, “%__”, “__fd” etc

Level-I1. 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

TEACHERS

NUMBER NAME AGE DEPARTMENT DATEOFJOIN SALARY SEX

1 JUGAL 34 COMPUTER 10/01/97 12000 M

2 PRATIGYA 31 HISTORY 24/03/98 20000 F

3 SANDEEP 32 MATHS 12/12/96 30000 M

4 SANGEETA 35 HISTORY 01/07/99 40000 F5 SATTI 42 MATHS 05/09/97 25000 M

6 SHYAM 50 HISTORY 27/06/98 30000 M

7 SHIV OM 44 COMPUTER 25/02/97 21000 M

8 SHALAKHA 33 MATHS 31/07/97 20000 F

Write SQL commands for the following:xi. To show all the information about the teacher of History department.

xii. To list the names of female teachers who are in Hindi department.xiii. To list the names of the teachers with their date of joining in ascending order.xiv. To list the details of all the teachers who’s salary is between 20000 to 35000.xv. To list Name, age, department of all teachers in ascending order of department.

xvi. To find out the average salary of all the teachers.xvii. To find out the average salary department wise.xviii. To find out the departments for which the total salary is more than 50000.

Page 22 of 61

Page 23: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 23/61

xix. To find out the average salary given to each sex.xx. To show the structure of above table.

Level-II1. What do you mean by referential integrity? How is it enforced in databases?2. Explain PRIMARY KEY constraint with example.3. Differentiate between DDL and DML commands?4. Differentiate between Char and Varchar data types.

Chapter 17Table and Integrity Constraints

S.No. Concept Degree of  importance

Levels of  Assignment

Errors generally committed

1 IntegrityConstraints

**** L-1,L-2,L-3 -Incorrect table definition

2 Creating tablewith

constraints

***** L-1 -missing datatype or size-improper placement of constraint

-difference in table andcolumn constraint

3 Alter tablewith

constraints

*** L-1,L-2 -where to use add andmodify in alter -confusion in alter andupdate

4 Enabling/disabling

constraint

* L-1

5 Dropping

table

*** L-1 -confusion in delete and

dropLevel 11. What is a constraint?2. Name some constraints to enhance database integrity.3. What is a primary key? Can you have multiple primary keys in a table?4. 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 21. 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 primarykey of the table.

2. Amit, a student of Class XII created a table 'Book'. Price is a column of that table. Tofind the details of books whose price has not been entered, he entered the followingquerySelect * 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 asPrimary Key and why?

4. What is the difference between table and column constraints?

Page 23 of 61

Page 24: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 24/61

5. What is a composite primary key?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 asprimary key in MySQL?

12. Create table for following relation address (city,state,pin)13.Define the reason for defining foreign key

Level 31. 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 tableto NULL

2. Which statement about constraint is true?a. A single can have one constraint applied.

b. UNIQUE constraints are identical to PRIMARY KEY constraintsc. 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 NULLb. FOREIGN KEY

8. Which of the following FOREIGN KEY constraint keywords identifies the table and columnin the parent table?

a. RESEMBLESb. ON DELETE CASCADEc. REFERENCES

9. What must exist on parent table before MySQL allows us to create FOREIGN KEYconstraint?

10. What is self referencing table? UNIT -4IT APPLICATION

S.No

Concepts Degree of  Importance

Levels of Assignment

Errors generally committed

1. Introduction toE-Governance, E-Business, E-Learning

* L 1 Definition of E-Governance,E-Business, E-Learning is notcleared properly, unable todifferentiate properly.

2. GUI and its

Importance

* L 1 Error to differentiate in Front-

end and back-end interface,unable to mention theimportance of GUI.

Page 24 of 61

Page 25: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 25/61

3. Front-end Interface *** L 2 Error to identify differentcontrols used in Front-end.Committed error to extractdata while interacting withprogramming

4. Back-end

Database

*** L 3 Error to define the usage of  

back-end in case of GUIapplication.

5. Front-end andDatabaseConnectivity

** L 1 Error to make connection inb/w of Front-end and Back-end.

LEVEL-11. What is front end application?2. What is back end application?3. What is e-Governance?4. What is e-Learning?

5. What do you mean by E-Business?6. Data validation is one of the important activities. Justify the statement.7. 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-21. 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-31. What is the front end and back end in Java?2. Differentiate between front-end testing and backend testing.

3. How E-learning is useful to trainer. Why e-learning is used.4. How has our society benefited from e-governance? Write 2 points5. Is E Governance. Better than normal Governance. Explain.6. How can Java be interfaced with MySql?7. What advantage does e-learning offers as compared to normal learning?8. How does e-business improve customer satisfaction- Write one point.9. Mr. Das is working as a Manager in the Shivam Enterprises. He wants tocreate a form with following functions. Choose appropriate controls from Textbox, Label, Option button, Check box, List box, Combo box, Command buttonand write in the third column:

Page 25 of 61

Page 26: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 26/61

10.

Sno Control used to : Control

1.

2.

3.

4.

5.

Enter the name, Address, Basicsalary

Select the Gender (M/F)

Select the department from theavailable list

Choose type of employee(Permanent / Regular)

Display the picture of theemployee

 

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 computersare 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

Page 26 of 61

Page 27: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 27/61

• Mesh topology

 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 61

Page 28: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 28/61

 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

Page 28 of 61

Page 29: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 29/61

 Ans. 1: Advantages: I. Data or information can be shared among the users.

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

Page 29 of 61

Page 30: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 30/61

ii.It has more bandwidth than copper wire.

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

Page 30 of 61

Page 31: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 31/61

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.

 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 topologybecomes the best choice for a network. This is because optical fiber offers the possibility of veryhigh 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 accessingthe network resources or processing capabilities.

Snooping: It refers to any threat that results in an unauthorized user obtaining informationabout 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

Page 31 of 61

Page 32: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 32/61

Fiber-optic cables

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 high-

speed 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 toprotected 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 

Page 32 of 61

Page 33: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 33/61

Topic- OSSLEVEL I

 Ans1. Free Software: Free software means the software is freely accessible and can befreely used, changed improved, copied and distributed by all who wish to do so. And nopayments 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. Herethe company constructing the business models around open source software may receivepayments 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,changedImproved, copied and distributed by all who wish to do so.And no payments are needed tobe 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. DVIng5. 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 representingelectronic documents such as spreadsheets , graphics etc. Ans7. A font refers to a set of displayable text characters (called glyphs ) , having specificstyle and size. Ans8. Unicode provides a unique number for every character , no matter what theplatform ,no matter what the platform ,no matter what the program ,no matter what thelanguage. 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 standardizationcommittee .This is an eight bit code capable of coding 256 characters . ISCII code retainsall ASCII characters and offers coding for Indian script also.It is also called Indian scriptsCodes for Information Interchange Ans2 1) odt – for word processing 2). Ods – for for spreadsheet file 3). Dop – for electronicpresentations files 4). Odg – for graphics file 5). Odb – for database file.

Ans 3: MozillaFreeware

► No source code available► free internet softwareIt can be download from www.mozilla.org

 Ans.4: APACHE: It is the most common web server (or HTTP server) software on the

Page 33 of 61

Page 34: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 34/61

Internet. Apache is designed as a set of modules, enabling administrators to choosewhich features they wish to use and making it easy to add features to meet specificneeds including handling protocols other than the web-standard HTTP .

► Apache HTTP server is an open source web server.► 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 proprietarySoftware such as Oracle, Sybase and Microsoft Sql Server. Ans.6: PHP: It is a Hypertext preprocessor language which is OSS used for server sideapplications and developing dynamic web content. PHP allows easy interaction with largenumber of relational database systems such MySQL, Oracle, DB2, PostgreSQL etc. PHPruns 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) Using phonetic text entry(ii) Using keymap based entry.

 Ans.2 It is Office an application suite which is free software and directly competes withMicrosoft 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 renderingof 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 theplatform ,no matter what the program , no matter what the language .The Unicode standardhas been adopted by industry leaders such as Apple ,HP,IBM etc. Ans.7Words typed as per their pronounciation in English script and lator converted toCorresponding language word ,is known as Phonetic Text Entry or Transliteration. Ans8. Ogg Vorbis is freely available open format for audio streaming , without anyrestrictions.The other formats available today such as MP3,AAC of MMPEG – 4 etc. areavailable under certain terms. Ans.9 W3C is acronym for World Wide Web Conosrtium.W3C is responsible for producingthe software standards for world wide web.It was created in October 1994.

UNIT-IIJava GUI Programming Revision Tour – I

S. No. Concept Degree of  Importance

Level Errors generallycommitted

References

1 Netbeans JavaIDE

** L1,L-2 Not useappropriatecomponent

2 Basics of GUI * L1 Wrongproperties used

3 Tokens * L1 Wrong

identification4 Data Types *** L1,L2 Appropriate data

types not used

Page 34 of 61

Page 35: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 35/61

5 Variables ***** L2, L3 WrongDeclarations

6 TextInteractions

**** L1, L2 Proper syntaxerrors

7 Operators inJava

***** L1, L2 Wrongevaluation

8 Expressions **** L1, L2,L3 Semicolon notused

9 ProgrammingConstructs

***** L2, L3 Loop terminationerrors

Level - 1 Ans1. Rapid Application Development describes a method of developing software throughthe use of pre-programmed tolls or wizards. Ans2. Events are activities that take place either due to user interaction or due to someinternal changes e.g. user clicks upon a command button or text of a textbox changesowing 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 generalterminology 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 theycannot be used for any other purpose. Ans7. GUI stands for Graphical User Interface. This programming style involves graphicsentities, rather than writing numerous lines of code.

 Ans8. Execution of multiple cases after matching takes place in a switch statement. Ans9. Unicode Ans10. Classnew 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 operators2. Binary operators3. Ternary operators

 Ans5. 2 Ans.6. = represent an assignment operator. It sets the value of the variable on its left sidewith 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’

Page 35 of 61

Page 36: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 36/61

 Ans8. Difference between while and do while loop

While Loop Do while Loop

While Loop is a entry controlloop

Do while is a exit control loop

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 followsfloat 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 61

Page 37: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 37/61

Level -3 Ans1. Application Programming Interface. Ans2. Although properties, methods and events do different things, yet they areinterrelated. 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 hasfour elements that have different purposes. These elements are as given below:

1. Initialization expression(s)2. Test Expression.3. Update Expression(s)4. 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 theterminating condition and thenexecutes the loop body.

It first evaluates the loop bodyand then checks the terminatingcondition. If the condition isfound true the loop continuesotherwise the loop stops.

In case if the condition is falsein first time only then the loop

will not get execute even once.

In case if the condition is falsein first time only then the loop

will still get execute at-leastonce.

 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 - IILevel-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 listform. 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 61

Page 38: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 38/61

 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 rowsproperty.

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 buttonsAns2. Java program can be easily moved from one computer system to another, anywhere

anytime. Changes and upgrade in operating system, processors and systemresources will not force any change in the Java program. Hence it is called aplatform independent language.

 Ans3. The source program is first converted into a byte code using a java compiler. Thisbyte code is machine independent i.e. same for all the machines. Later the byte code isexecuted on the machine using an interpreter.

 Ans4. Comments are added to a program for the following purposes:-

1. Make the more readable and understandable2. 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 onlyfor 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 commainstead 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 thetext, 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 inInteger class.

 Ans7. A programming environment, where all the tools required for programming areavailable 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 onthe 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 statementIn a switch statement  if none of the statement satisfies and even there is no defaultcase 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 61

Page 39: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 39/61

(ii) In a list user must select the items directly from the list whereas in a comboboxuser can edit it if he/ she wishes.

(iii) The list does not drop down whereas a combobox takes less space initially butdrop down when user clicks obn its arrow.

(iv) List allow us to select more than obe items but combobox allows only single itemselection.

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 fielddisplays the obtained text in unencrypted form.

 Ans3. Top level containers: JFrame, JDialogMiddle level containers: JPanel, JTabbedPaneComponent 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 exitcompletely 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 graphicentities along with text , to interact with user.You can create a GUI application on Java platform using Swing API(ApplicationProgramming 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”);

elsejTextfield4.setText(“Not Eligible for science”);}

else if( jRadioButton2.isSelected())

Page 39 of 61

Page 40: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 40/61

{if ( p>=60 )jTextField4.setText(“Eligible for Commerce and Humanities”);elsejTextfield4.setText(“Not Eligible for Science and Commerce”);}

else{if ( p>=40 )jTextField4.setText(“Eligible for Humanities”);elsejTextfield4.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 button1: To display Yes, No and Cancel button,2: To display Ok and Cancel button.

Page 40 of 61

Page 41: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 41/61

UNIT-IIChapter- 5 JAVAGUI PROGRAMMING REVISION TOUR-III

Level –I1 Class2 Yes3 Non-Parameterized Constructor 

4 Which can receive Parameters. Level- II1 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 passedparameters and copies the passes values in it. Any changes that take place are done inthe work copy and the original data remain intact.

In Call by reference, the called method receive the reference to the passedparameters and through this reference, it access the original data. Any changes that takeplace are reflected in the original data.

Level- III1 Constructor Properties are: (i) have no return type, not even void (ii) constructor shouldbe 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 asComposite data type. User Defied Data type are created by users.3 Software objects have state and behaviour like their state is maintained throughvariables or data items. Their behaviour is implemented through functions generallycalled methods.Real World object also physical characteristics(or state) and behaviour e.g. a Motorbike

has:Like: Current gear,two wheels are CharacteristicsLike: halting, accelerating are States4 The keyword this refers to currently calling object. It is automatically created andinitialized 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 Length() return the length while capacity() return maximum no of character thatcan be entered.

2 Return length , extract substring , conacat string specified in argument, removes

the leading & trailing spaces, convert into upper & lowercase3 Java.applet , java.awt, java.io, java.net4 Abstract classes are used for inheritance5 Abstract classes are used for inheritance while interface is used for multiple

inheritance6 Compareto () compares 2 string while equals( ) check for equality7 indexOf(char ch) returns the index of the Character Ch8 Power(a,b ) finds the value of  a raise to power b9 Append() is used to append the string in a textarea to its p10 charAt(int a) retruns the character present at position a in the string

Level 21. Related classes and interfaces grouped together is called as package.2.

Member Type Its Own Derived Class

Page 41 of 61

Page 42: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 42/61

class Same Package Other 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

3. Final keyword is used fro a class to make it static4 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 systems6 (a) 2

(b) 87. (a) ABC Microsytems

(b) 3( c) 12

8. HBC

9. ABC Microsystems

10. 2

Level 31. 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. Abcxyz5. CentralMadras

6.  ABC Micto Systems

7. i INFORMATICS PRACTICES ii Informatics Practices8. Informatics Practices Practicals9. 2010. SPACE In

Page 42 of 61

Page 43: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 43/61

Chapter -7Lesson-Inheritance

Level 1Ans-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

 Ans -1 Type of Inheritance:

Page 43 of 61

Page 44: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 44/61

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 isbecause 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 61

Page 45: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 45/61

 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: InputDialogConfirm DialogMessage DialogOption 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 rowsInt 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: showMessageDialogshowConfirmDialogshowOptionDialogshowInputDialog

LEVEL 3

 Ans 1: InputAreaIcon TypeMessageButton

 Ans 2: it is associated object that provides source-data to a JTable Object. It is the table-model that organizes the source data in row-column format. Ans 3: int val =0;

Page 45 of 61

Page 46: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 46/61

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 theJOptionPane through message type property.

 Ans 5: The Message dialog (invoked with showMessageDialog()) does not return anything.

UNIT 9:DATABASE CONNECTIVITY TO MYSQLLevel 1: Ans1:Database Connectivity refers to connection and communication between anapplication and a database system.

 Ans2: JDBC: Java Database Connectivity is a framework developed by Sun Java to helpJava connect to different databasesODBC:Open Database Connectivity is a framework used by Microsoft to connect to varioustypes of databases.JDBC provides database connectivity from within Java application to databaseswhereasODBCprovides databases connectivity to non-Java front end applications.But ODBC is language independent as it can work with any language but JDBC islanguage dependent as it works only for Java. Ans3:A resultset refers to a logical set of records that are fetched from the databases byexecuting 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 thedatabase.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 byexecuting a query and made available to the application program. Ans6:Class.forName(“com.mysql.jdbc.Driver”);

Level 3:

Page 46 of 61

Page 47: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 47/61

 Ans1. a)Consider the Table DEPT(deptno,deptname,address).b) Provide connectivity URL.c)Use Java classesd)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 respectiveoperationsseparately.

b) Provide connectivity URL.c) Use Java classesd) Store the query in a string.e) use method executeQuery() and executeUpdate()

Web Application DevelopmentLEVEL-1 

1. It is software programs that allow to user to access and navigate www. (InternetExplorer,Mozilla Firefox, Google Chrome)2. It is a software program that allows to user to access and navigate WWW. (InternetExplorer,Mozilla Firefox, Google Chrome),Web Server is a program that runs on thecomputer 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 programand 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-site7. CGI8. File9. The WWW10. Host

LEVEL-II1. Each website has a unique address called URL (uniform resource locator) itscomponents 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 useshttp server caters to multimedia information. So it enables user to receive hypertextinformation.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.

Page 47 of 61

Page 48: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 48/61

LEVEL-III1. Set of rules are called protocols. A file’s internet address or URL is determined byprotocol.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. HTTP5. 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 tag3. not case-sensitive4. .html (dot html)5. Body of html document is prepared in <BODY> tag6. <BODY BGCOLOR=VBRED>

LEVEL 2:1. By usig <body> tag and its background attribute2. Container tags have both starting and ending as well as empty tags have only starting tags.3. LEFT, RIGHT , CENTRE4. BGCOLOR, BACKGROUND5. <BODY> , BACKGROUND6. <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, face2. 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 h66. <SUP> TAG7. 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 numberedform. For example

i. <OL>1. <LI> Apples2. <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 differentnumbers. Note that cell and padding run together and are one word. To control the

Page 48 of 61

Page 49: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 49/61

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 amountof space between the frame of the table and the cells in the table. Note that cell andspacing 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 ULlist.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 tocollect data from the site visitor. It is done with the help of controls that collect dataand send it over.Example:<FORM method = “POST” action=mailto:[email protected]>

3. Text boxes are single line text input controls that are created using <INPUT> tagwhose TYPE attribute has a value as “Text”.Example:<FORM method = “POST” action=mailto:[email protected]>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 61

Page 50: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 50/61

<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 theinformation .We need to specify the following things in order to get the formprocessed.

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 endapplication.

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.<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&nbsp;

<input type="radio" name="comp-type" value="486sx">486sx&nbsp;<input type="radio" name="comp-type" value="pentium2" checked > pentium 2 &nbsp;

Page 50 of 61

Page 51: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 51/61

<input type="radio" name="comp-type" value="pentium3">pentium3&nbsp;<input type="radio" name="comp-type" value="pentium 4">pentium4 &nbsp;</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 IIIChapter-13 EXTENSIBLE MARKUP LANGUAGE

Level-I1. 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 specificstructured 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 anddisplays web page’s data

XML documents carry dataalong with their description.

2 HTML tags are predefined New tags can be created as per  our requirements.

3 HTML may not have closingtags.

XML must have closing tags.

4 HTML tags are not casesensitive

XML tags are case sensitive.

5 HTML documents are directlyviewable in a browser.

XML documents are viewed onlyif proper style sheet file is alsoavailable 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 contentin 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 formattedand 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-III1.<?xml version=”1.0”>

Page 51 of 61

Page 52: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 52/61

<message data=”9/10/2009><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 closedbefore the to element was closed.

Mismatched cases of start and end tags-The tag<sender> is closed with </Sender>, whichis incorrect. XML is case sensitive, thus the end-tag of <sender> should be </sender> andnot <Sender>

My SQL Revision tour 

Level 1:

1. A Primary Key is a set of one or more attribute that can uniquely identify tupleswithin 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 thatrelationships between records in related tables are valid, and that users don'taccidently delete or change related data.

4. No of tuples in a relation is known as degree and no of attributes in a relation isknown 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.Securityf.Provides many datatypes.

2. The difference between CHAR and VARCHAR is that of fixed length and variablelength.The Char datatype specifies a fixed length character string. when a clolumn is givendatatype CHAR(n), then the lenght is fixed to n characters and if the value is less than nthan 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 datadefinition.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;

Page 52 of 61

Page 53: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 53/61

8. select * from emp where sal*12 between 25000 and 40000;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 clubvalues(101,‘reena’,’hissar’,24,’permanenet’,2000);insert into clubvalues(102,‘meena’,’hissar’,24,’permanenet’,2000);

c. select * from club

where type= ‘permanent’ and fees>5000d. alter table clubadd(phno integer);

e. Update club

Set fees=fees*.10

Where type= ‘temp’;

f. Select * from empWhere age>=18;

2. 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 departmentviii. 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.

3. The degree is 7 because the no of attributes are 7 and cardinality is 8

4. Now the degree will become 8 and cardinality will be 11.

5. Answers are as follows:

a. Select * from SchoolBus where capacity > noofstuents

Page 53 of 61

Page 54: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 54/61

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)

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);

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. Atransaction might be a sequence of many SQL statements, but logically performing a singletask, thus all the SQL statements should work as a whole or none at all ensuring theconsistency of the database. A transaction is an atomic operation which may not dividedinto 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 thetransaction 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 theexecution 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

Page 54 of 61

Page 55: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 55/61

simply refers that if a transaction is accessing/modifying some data item, that dataitem must not be available to other transaction at the same time, since it may be inan inconsistent state.

d) Durability : This property of transaction ensures that after the successfulcompeletion of the transaction the changes made by it to the database persist, evenif 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 cannot be rolled back.RollBack : This command rolls back (undoes) all the changes made in the database after 

lastcommit command was executed.SavePoint : In between the transaction savepoints can be defined. If in any case rollback is

neededbut only a few operations are needed to be rolled back, savepoints are useful. Using theROLLBACK 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-IIIChapter-14 MYSQL REVISION TOUR

Level-I

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 withall its

tables.4. A non key attribute of the relation that is foreign key of the other table and primary key for first table5. It is multithreaded Open source RDBMS.6. Single row function individual result for each row where as aggregate function givesaggregated

result for the given group of rows.7. To perform any aggregate operation in groups, we use GROUP BY clause with the Selectstatement8. 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 havingsum(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.

Page 55 of 61

Page 56: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 56/61

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 createtable, views, indexes schemas. E. g. create, alter, drop

DML Commands:- Thaese are data definition language that are used for update, insert anddelete 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 singlequotes or double quotes.Varchar:- A variable-length string between 1 and 255 characters in length; for exampleVARCHAR(25).Values must be enclosed in single quotes or double quotes.

More on SQLLevel 1

1. Rules that are defined when a table is created. They help in preventing certain typeof inconsistent values from being placed in the column(s).

2.

Constraintsname

Description

PRIMARY KEY Used to create a primary keyUNIQUE 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.

3.  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 canbe created for each table.

4. Foreign key enforces referential integrity. A foreign key column is one whose valuesare derived from primary key column of another table. Yes, a table can have multipleforeign keys.

5.  A NOT NULL constraint enforces that the column will not accept NULL values.6. Unique and NOT NULL7. Create table table-name(column-name data-type(size) primary key….);8. It limits the values that can be inserted into a table eg. The age entered by user 

must be greater than 189. When a user does not enter a value for the column (having default value),

automatically the defined default value is inserted in the field10. Drop table table-name;

Answers

Page 56 of 61

Page 57: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 57/61

Level 2 

1. Alter table2. Select * from book where price IS NULL;3. Roll Number  4. Column constraints apply to individual columns whereas table constraints apply to group of 

one or more columns5. 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 primarykey. 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.

AnswersLevel 3

1. SET NULL2. C)3. Line 5, because NOT NULL constraint is not defined at table level.

4. We can’t disable primary key but can be dropped if required with Alter command5. 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 Integrity8. c) REFERENCES9. A PRIMARY KEY or UNIQUE KEY must exit on parent table10.When the referenced and referencing tables associated with a foreign key are the

same, such a table is called self-referencing table.

UNIT -4IT APPLICATION

Answers of Level 1 Questions

 Ans. 1 A “front-end” application is one that application users interact with directly.For example, Internet Browser or any other software application where anend user works.

 Ans. 2 A “back-end” application or program serves indirectly in support of the front-end services, usually by being closer to the required resource or having the

capability to communicate with the required resource. For example databaseslike MySQL, Oracle, OOo Base, MS-Access etc.

Page 57 of 61

Page 58: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 58/61

 Ans. 3 E-Governance is the use of a range of modern information andcommunication technologies such as internet , local area network, mobilesetc. by government to improve effectiveness of their services.

 Ans.4 E-Learning is a delivery of learning, training or education program byelectronic 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, thereforedata 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 boxetc.

 

Answers of Level 2 Questions

  Ans. 1

a. Improves Government processesb. Increases the efficiency and speed in a transparent manner.c. Simplify administrative transactions.d. Citizen can participate in decision making process

 Ans.2i. Improved quality of information and information supply.ii. Reduction of process time.iii. Cost reductioniv. Improved service levelv. Increased efficiency.

 Ans.3 There are various social be benefits of e-governancea. openness and transparency

b. Enhanced policy effectivenessc. Increased democratic participation etc

d. Increased economic competitiveness. Ans.4 It reduced overall cost, learning time reduced, increased retention andapplication 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 andincreased satisfaction.

ii. Interactivity engage users, pushing them rather than pulling themthrough training etc.

 Ans.6 Textbox, text area, button, Label, checkbox, radio button, combo box, list boxetc. Ans.7 User interface is a junction between user and a computer. it has variousadvantages

a It provides ways to communicateb. 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.

Page 58 of 61

Page 59: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 59/61

 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 thelearning process.

 Ans. 9.i. Use of web to find prices and reviews

i. Use of our website for managing the information in our business.ii. Fast communication with customer, members or suppliers via emailetc.

b. Use of website for research and to find recent trends. Ans. 10 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 theuser?

The various ways of data entry are as fallows.i. Direct Manipulation

ii. Menu Selectioniii. Form Fill in.iv. Command Languagev. 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 logicfor you.

 Ans.2. Front-end testing is basically GUI testing or GUI functional testing.

Backend testing involves databases or any backend storage. It’s basically testingdata 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 gettingstored on some database then you have to test it whether it is storing correctly youcan 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 tablesthen you have to test it. In this case you have write queries to validate source andtarget data between those table using sql scripts.

 Ans.3. It reduced overall cost, learning time reduced, increased retention andapplication to job.

Ans4. 1. A lot of productive time of government servants and general public issaved.

2. Transparency has increased and therefore cheating cases have beenreduced. Ans.5 It reduced overall cost, learning time reduced, increased retention and

application to job..Ans.6 Yes , In many ways

a. Cost effectiveb. Time savingc. Transparencyd. 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.

Page 59 of 61

Page 60: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 60/61

 Ans.9 • Goods sold through e-business are generally cheaper as cost incurred inebusiness

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 casestudy for GUI Development Steps

Page 60 of 61

Page 61: IP Ques StudyMaterial Oct2010

8/2/2019 IP Ques StudyMaterial Oct2010

http://slidepdf.com/reader/full/ip-ques-studymaterial-oct2010 61/61