_______________
7) _______________
8) ________________
9) _____________
10) _____________________
Q.2 Write functions of the following tags:
1)
2)
3)
4)  
5)
Q.3 Write full forms of the following:
1) XML 2) HTML
3) ISP 4) HTTP
5) HREF 6) URL
7) RDF 8) XSLT
9) WAI 10) CSS
11) JPEG 12) GIF
Q.4 Write HTML code for:
1) Short term courses 2) IT Companies
Windows XP I Infosys
Windows Vista II TCS
Java Net beans III Wipro
Open office
Q.5 Write HTML codes for:
ProductionN.N Reddy1493S M Krishna3829P. Chidambaram0283SalesMaria Philip4827S.GANDHIQ.6 Create an XML document to represent the marksheet of 5 students on the browser.
OR
Create an XML document to create the details of employees in a company.
Q.7 Write answer in one word
1) Name one empty tag
2) Syntax of comment tag
3) Which tag identifies the document as html tag?
4) A tag having closing tag
5) Which kind of list is bulleted list?
6) What character is displayed with password field?
7) What is the type field for radio button?
8) Type field for checkbox button.
9) Set of rules/tags that define the structure & format of text while presenting them.
***************
EMBED PBrush EMBED PBrush
Worksheet 4
Q.1 Define the following terms :( 8)
Database
Encapsulation
Inheritance
Frontend
Resultset
Transaction
Q.2 Answer the following in one word :( 10)
He invented Java
Language which is both platform & programming Language
Character set used by Java
Interpreter of Java
It helps in developing applications through pre-programmed tools.
In which kind of literals is \n & \b
What are these called :( ),{ },[ ]
This keyword tells the compiler that value cannot be changed.
Name one method to convert number to string.
Name one which retrieves the text typed in text field.
Q.3 Write the functions of the following methods with syntax :( 10)
isEditable( )
setVisible( )
isEnabled( )
append( )
isSelected( )
getSelectedItem( )
getSelectedValue( )
ShowMessageDialog( )
ShowInput Dialog( )
SetText( )
Q.4 Do as directed:( 14)
Convert a string to number.
Convert a number to string.
Get the output of:
a) int x;
x=5;
System.out.print(x++);
System.out.print(x);
System.out.println (++x);
int a=1,b=2,c=4:
a=++b/c;
System.out.printLn ( +a+ \n +(c++));
int I=7;
System.out.print (++I);
System.out.print (I);
System.out.print (I++);
Identify the valid identifiers:
a) Var.1 b) roll no c) D23 d) S$ e) emp no f) 2A g) withdraw
Q.5 Explain the function of commit, rollback & save point?
Q.6 Explain call by value & call by reference?
Q.7 Mention atleast 5 controls which you use to make an application. (2)
Q.8 Explain the GUI builder & Netbeans IDEs different parts. (2)
**************
EMBED PBrush EMBED PBrush
Worksheet 5
1. Give the output of the following code fragment.
(a) int ch=10;
System.out.println (ch++);
System.out.println (++ch);
System.out.print (ch);
(i)What output does the above code fragment produce?
(ii)What is the effect of replacing ++ch with ch+1?
(b) int val,res,n=1000;
res= (n+val)>1500? 200:400;
System.out.println (res);
(i)If the input is 400
(ii)If the input is 1000
(iii)If the input is 1500
2. What will be the result of the following two expressions if i=15 initially?
(i)++i<=15 (ii) i++<=15
3. Given the two following expressions:
(i) a=4 (ii) a==4
(i)How are these two different?
(ii)What will be the result of the expression if the value of a is 6 initially?
4. Will the value of y be the same for the two cases given below if x=42?
(i) y=++x; (ii) y=x++;
5. Consider the following code snippet:
int i=10;
int n=i++%5;
What are the values of i and n after the code is executed?
6. What will be the value of p=p*++j where j is 22 and p=3 initially?
7. What will be the result of the following expression?
If (i) age=25(ii) age=65(iii) age=85
age>65? 350:100
8. Develop an application that accepts principal amount, rate of interest and
Time from the user then it computes the simple interest and displays it.
9. Design an application for four function calculator.
10. Which of the following will produce a value of 22 if x=22.9?
(i)Math. Ceil(x) (ii) Math. Round(x)
(iii) Math. Abs(x) (iv) Math. Floor(x)
12.Give the output of the following code.
int m=100;
while (m>0)
{ if (m<10)
break;
m=m-10;
}
System.out.println (m is+m);
13. Write a program to input a digit and print it in words.
using switch.
if (ch==E)
eastern++;
if (ch==W)
western++;
if (ch==N)
northern++;
if (ch==S)
southern++;
else
unknown++;
***************
EMBED PBrush EMBED PBrush
Worksheet 6
Q.1 Fill in the blanks:
1) The ______ method is used when we simply want to retrieve data from a table
without modifying the contents of the table.
2) The _______ method is used to extract specified number of characters from a
String.
3) A string method which does not accept argument._________
4) Which is not a valid method of the string class?
a) length ( ) b) concat ( ) c) trim ( ) d) round ( )
5) ________ class which contains methods for basic numerical operations.
6) Which is not a primitive data type in Java?
a) float b) int c) string 4) void
7) To execute sql statements, you need to initiate a ______ object using the ______
Object.
8) The ______ method is used to instantiate a statement object using the connection
Object.
9) The _______ method is used to move to the next row of the resultset.
10) _________ statement gives us the runtime error.
Q.2 Explain the significance of:
1) forName ( )
___________________________________________________________________
2) getModel ( )
___________________________________________________________________
3) executeUpdate ( )
___________________________________________________________________
4) rs.next ( )
____________________________________________________________________
5) java.sql.*
____________________________________________________________________
Q.3. WAP to connect with mysql for retrieving data from a table with search button
according to the mobile no. given in the application.
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
Q.4 Write the correct order of the following steps for connectivity to update customer
Table:
1) execute s1
2) register the jdbc driver
3) create a statement s1 to update customers
4) execute s1
5) close connection
6) open connection to the database
7) close s1
________________________________________________________________
________________________________________________________________
_________________________________________________________________
**************
EMBED PBrush EMBED PBrush
Worksheet 7
Q.1 What do you mean by derived class/subclass & base class/super class?
________________________________________________________________________
________________________________________________________________________
_________________________________________________________________________
Q.2 What is a package in JAVA?
_________________________________________________________________________
_________________________________________________________________________
Q.3 What is public access of class members?
_________________________________________________________________________
_________________________________________________________________________
Q.4 How are protected members different from private members.
_________________________________________________________________________
_________________________________________________________________________
Q.5 Define Polymorphism and Encapsulation?
________________________________________________________________________
________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
Q.6 What are abstract classes? Give example?
_________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Q.7. What do you mean by the term INHERITENCE? Write its significance also.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
Q.8 Answer in one word:
1) Keyword which makes the variable a class variable ________________
2) Keyword used to call a method from the base class.________________
3) Arguments contained in method call and passes is called______________
4) This keyword is used to create an object ____________
5) Variables & methods in a class are collectively called ____________.
6) Keyword to make a subclass.________________.
Q.91) Identify the super class & subclass in the following codes:
public class Animal{
}
public class Mammal extends Animal{
}
public class Reptile extends Animal{
}
2) What are the objects created in the following codes?
Animal a=new Animal ( );
Mammal m=new Animal ( );
Dog d=new Dog;
3) Explain inheritance in Java with example?
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
*************
EMBED PBrush EMBED PBrush
Worksheet 8
Q.1 Fill in the blanks:
1) In Java, methods reside in _______________
2) A member method having the same name as that its class is called ______________.
3) The keyword _______________ refers to current object.
4) An __________ is an instance of a class.
5) A ______________ constructor takes no arguments
6) The members of a class which are defined without the keyword static are ________.
7) The data types that are based on primitive data types are known as _______________
8) Everything that exists in java program has to be through ___________ & objects.
9) Keyword static makes a method a _____________.
10) _______________ Parameters appear in method call.
11) _______________ Parameters appear in method definition.
12) A method is invoked in two manners __________ & _____________.
13) ________________ Data type specifies an empty set of values.
14) Java offers ___________, ________________ , _______________ classes to work
with character Data.
15) Packages in java are called ________________.
Q.2 Define access specifiers and also explain private, protected and public access specifiers
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Q.3 What is the difference between pass by value & pass by reference methods?
___________________________________________________________________________
__________________________________________________________________________
___________________________________________________________________________
Q.4 Explain keyword this?
___________________________________________________________________________
___________________________________________________________________________
Q.5 Write a program to design a GUI application to print square of natural numbers till n.
___________________________________________________________________________
___________________________________________________________________________
Q.6 WAP to design a GUI application to print prime nos. till 10.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
*********
EMBED PBrush EMBED PBrush
Worksheet 9
Q.1 Answer in one word:
a) Device used to connect several computers.
b) A system to prevent unauthorized access to/from a network.
c) Device that connects dissimilar networks.
d) Pairs of copper wires twisted around each other.
e) This cable uses light to transmit data instead of magnetic signals
f) One network, this is your computers unique hardware number.
g) This is the unique name given to site that becomes websites identification.
h) The arrangement of computers in a network.
i) The operator which needs three operands.
j) Which code is used by Java?
k) Reserved word having special meaning and purpose
l) Tools that enable the fast creation of application
m) The commands in HTML
n) The part of XML document where we define the introduction of the document.
o) The tags who dont have the ending tag
p) The text which can be linked
Q.2 Find the output of the following:
1) int r,x=50,y=10;
R=(x>45)?x:y;
System.out.println(x);
2) int p=10,k=20;
K=k/++p;
System.out.println (k=+k);
3) int z,x=5,y= -10,a=4,b=2;
Z=x++- --y*b/a;
4) char ch=a;
ch=(ch==b)?ch:b;
System.out.println (k=+k);
5) int a=10;
Int b=5;
Int c=7;
System.out.println (a+b+c);
System.out.println ();
System.out.println (a+t+b+t+c);
System.out.println ();
System.out.println (a+\n+b+\n+c);
6) int i=10;
Int j, k, l, m,n;
J=i+5;
K=i+j/5;
L=k+1;
M=l+1+i;
N=k+m*l;
System.out.println (i+\n+k+\n+l+\n+m+\n+n);
7) int c=0,i=2;
While (i<10){c=++i-i*2;}
System.out.println (c=+c+i=+i);
8) int i, j,k,x=0;
For (i=0; i<5; ++i)
For (j=0; j 10,000 than discount is as follow
Payment Mode Discount Cost 15 % Credit Card N/L Cheque i)Writete the code to make the Text Fields for Discount & Net Amount in
ii) Write code to Calculate Discountbutton as per given criteria and discount
and net amount should be displayed in Text Field.
iii) Write code for Stopbutton to close the interface.
Q.4 a) Write the output of following SQL queries. i. SELECT ROUND (6.88, 2) ;
ii. SELECT MID (Discovery Channel, 4, 6) ;
SELECT DAYOFMONTH (20110330);
SELECT TRUNCATE (7.727,1);
Consider the table STUDENT given below, write SQL Commands for (i) to (iv) and output for (v) to (viii)
RollNoName Class DOB Sex City Marks 1Nanda X6/6/95MAgra5512Saurabh XII7/5/93MMumbai4623Sanal XI6/5/94FDelhi4004Trisla XII8/8/95FMumbai4505Store XII8/10/95MDelhi3696Marisla XI12/12/94FDubai2507Neha X8/12/95FMoscow3778Nishant X12/6/95MMoscow489To Display all information about class XII students.
____________________________________________________
List the name of made student of class X.
____________________________________________________
List names all class of all students in descending order of DOB.
____________________________________________________
To count the number of student in XII Class of Mumbai city.
____________________________________________________
SELECT DISTINCT (Sex) FROM Student.
____________________________________________________
SELECT AVERAGE (Marks) FROM Student GROUP BY Sex.
____________________________________________________
SELECT COUNT(*)FROM Student where Class = XI
____________________________________________________
SELECT MAX (Marks) FROM Student.
____________________________________________________
**************
EMBED PBrush EMBED PBrush
Worksheet 17
Q.1 Fill in the blank:
1) A website to provide online information and services to the citizens is an example of
______________
2) The website of an electricity supply company which allows its customers to pay bills
online is an Example of ______________.
3) The website of a school which allows the students to go through various lessons in their
Subjects Is an example of _____________
4) Web address of national portal of India is _____________
5) A form through which users interact with an IT application is a part of _____________.
6) A good front-end is ___________.
Q.2 Write two important features of each of the following:
e- Governance
___________________________________________________________________________
___________________________________________________________________________
e- Business
___________________________________________________________________________
___________________________________________________________________________
e-Commerce
___________________________________________________________________________
___________________________________________________________________________
Q.3 Give domain names of two most commonly used websites for e-Governance, e-Commerce and e-Business?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Q.4 Mention few important points which you should keep in mind while developing an efficient and user friendly application?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
***********
EMBED PBrush EMBED PBrush
Worksheet 18
Q 1. Answer the following questions: a) What type of network would you suggest for the following type of requirements in an organization?
i) Around 200 computers in two different buildings adjacent to one another are to be connected.
ii) The cost of network should not be very high.
iii) It should be fairly easy to implement.
______________________________________________________________________________b) Mr. Vasu is transferring data to a large distance via cable connection and he wants to amplify the
signal transmitting over a network. What device will be useful for him?
______________________________________________________________________________c) What do you mean by network topology? Write one advantage and one disadvantage of star topology.
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
d) What is freeware? How is it different from free software?
_______________________________________________________________________________
_______________________________________________________________________________e) Which of the following technologies require line-of site between the transmitter and receiver?
a) Satellite b) Fiber Optic c) Microwave d) Co-axial Cable
____________________________________________________________________________f) What is openoffice.org?
____________________________________________________________________________g) Which protocol is used for transfer files over the internet?
____________________________________________________________________________Q 2. Answer the following questions.a)Mr. Nayak has developed a Java application for a school, in which, a combo box is made on the
form for class. Name the property which Mr. Nayak should use to add the classs data in combo box.
____________________________________________________________________________
b) Name the statements used for decision making in Java.
____________________________________________________________________________
c) Differentiate between and tags with example..
____________________________________________________________________________
d) Write a method in Java that takes a number as parameter and returns True if the number is prime
otherwise returns False. _____________________________________________________________________________
_____________________________________________________________________________
g) What are the use of the following tags-
, , , Q 3.a) Which MySQL command helps you to create database if it does not exist?b) How can we see the list of existing tables?c) Rajan created a table named Item, he wants to see those Items whose price is between 200 and 800. He wrote a query-
SELECT * FROM Item WHOSE price>200 OR <800;
Help Rajan to run the query by removing the errors from the query by rewriting it. d) Sanket wants to implement referential integrity in the tables being created. Which constraint should be used by Sanket while doing so?e) What is the role of primary key in the table? Explain with the help of suitable example.f) Room_No, Cust_Name, Room_Type and Room_Rent of table HOTEL are given below:
Table : HOTEL
Room_No
Cust_Name
Room_Type
Room_Rent
204
Rajesh
Single
700
308
Anuja
Double AC
1600
105
Vinamra
Single NAC
500
202
Soma
Based on this information, find output of the following queries:
SELECT Room_Type, SUM(Room_Rent) FROM hotel GROUP BY Room_Type;
SELECT Room_no FROM hotel WHERE Cust_Name LIKE %n%;g) Define Domain and Tuple.Q 4. a) What is Interface in Java? What purpose does it solve?b) Differentiate between function overloading and method overriding. c) Write the purpose of the following statements:
i) int n=Integer.parseInt(1254); ii) jButton1.doClick( );d) Rewrite the following code using while loop:
int i,j;
for(i=1,j=2;i<=6;i++,j+=2)
System.out.println(i++);
System.out.println(Finished!!!);
e) The following code has some error(s). Rewrite the correct code underlining all the corrections made.
int y=6,p;
do
{ y=3.14*y;
p=y%10;
if p=2
System.out.print(Two);
while(y>1)f) What will be the content of jTextField1 and jTextField2 after executing the following code:
String st=New to Information Technology;
jTextField1.setText(st.replace(Technology,Practices);
jTextField2.setText(st.substring(7));g) Mr. Madhav works in a construction company. To calculate total wages he has developed the following GUI in NetBeans.
EMBED PBrush
Male and female labourers are respectively paid Rs. 150/- per day and Rs. 170/- per day. Skilled labourers are paid extra at the rate of Rs. 100/- day. Male and female labourers from rural areas are paid 10% less per day.
Write the code to lock the text box.( text box for total wages should not take input)
Write code to do the following-
When Calculate Wage button is clicked, the total wages is calculated as per the given criteria and displayed in total wage text box.
When Clear button is clicked, all the text boxes should be cleared and radio button, check box should be deselected.
Close the application when Quit button is pressed. Q 5.a) How can you remove the column of a table? Explain with example.b) What are TCL commands? Explain the role of Commit and Rollback with example. c) Consider the table Doctor given below, write command in SQL for (1) to (4) and output for (5) to (8).
Table : DOCTOR
ID
Name
Dept
Gender
Experience
ConstFee
201
R.K. Nath
ENT
M
12
300
457
Mahavir Singh
SKIN
M
500
365
M. Asthana
MEDICINE
F
9
250
221
V. S. Nag
ENT
M
3
150
122
S. P. Sinha
NEPHRO
F
200
110
J. P. Pandey
CARDIOLOGY
M
9
500
(1) To display name of all doctors who are in Medicine having more than 10 years of experience.
(2) To display the different departments.
(3) To display minimum consultation fee of female doctors
(4) To display name and department of male doctors who has no experience.
(5) SELECT AVG(ConstFee) FROM Doctor WHERE NOT Gender=F;
(6) SELECT Count(Experience) FROM Doctor;
(7) SELECT Name, Experience FROM Doctor WHERE id BETWEEN 100 AND 200;
(8) SELECT SUM(ConstFee),MAX( Experience) FROM Doctor;Q 6. Answer the following question.a) Write an SQL query to create the table Items with the following structure-
Field
Type
Constraint
Item_Id
Varchar(5)
Primary Key
Item_Name
Varchar(25)
Manufacturer
Varchar(15)
Color
Varchar(15)
Price
Integer
Must between 399 and 4999
Quantity
Integer
Not Null
b) In a database there are two tables Dress and Material shown below-
Table: Dress
Dcode
Description
Price
MCode
LaunchDate
1002
Trouser
999
M002
15-12-2010
2006
Coat
1599
M001
27-09-2009
1036
Sweater
540
M001
11-01-2008
1789
Frock
1950
M003
31-12-2010
Table: Material
MCode
Type
M001
Woolen
M002
Cotton
M003
Polyester
M004
Silk
M005
Denim
Name the columns which can be made Foreign Key in both the tables.
To display the dress details which are made up of woolen?
c) Consider the tables given below.
Table : Books
Book_Id
Book_Name
Author_Name
Publisher
Price
Type
Quantity
B0001
Harry Potter
J.K. Rolling
BPB
525
Fiction
15
B0013
Vision 2020
A.P.J.A. Kalam
TMH
333
Informative
10
B0152
Let Us C++
Y.K
BPB
625
Text
50
B1102
Applied Physics
H.C. Verma
745
Text
44
B2314
Godan
Premchand
125
Novel
50
Table : Issued
Book_Id
DateOfIssue
Member_ID
B0152
15-12-2010
M008
B2314
25-10-2010
M112
B0001
31-12-2010
M110
With reference to these tables, write commands in SQL for (i) and (ii) and output for (iii) below-
To display the name of the book issued to member M112.
To display the type wise no. of books and total quantity of all type of book.
SELECT Book_Name, Quantity FROM Books WHERE publisher IN(TMH,NULL) ;
Q 7.
a) What is database connectivity? b) Write the societal impact of e-learning? c) Mr. Akshat is working as a booking clerk in Raja Mahal Hotel. He wants to create the forms with the following functions. Choose appropriate controls from Text Field, Label, Radio Button, Check Box, List Box, Combo Box and Command Button and write in the third column.
SNo
Control Used to
Control
1
Choose room type form a list of Room Type
2
Display Room Number
3
To show list of booked room
4
To enter date of checkin
************
EMBED PBrush EMBED PBrush
Worksheet 19
Q.1 Consider the table below:
FURNITURE
S.noNameTypeDate of StockPriceDiscount1WhitelotusDouble bed2002-02-2330000252Pink featherBaby cot2002-01-207000203DolphinBaby cot2002-02-199500204DecentOffice table2002-02-0125000205Comfort zoneDouble bed 2002-02-1225000306DonaldBaby cot2002-02-246500257Royal finishOffice table2002-02-2018000158Royal tigersofa2002-02-2231000309Econo sittingsofa2002-02-13950030 10Eating ParadiseDining2002-02-191150025
Show all the information about the baby cots from the FURNITURE table:
_____________________________________________________________
List the Names which are priced at more than 15000 from the furniture table
_____________________________________________________________
List names & type of those items, in which Dateofstock is before 2002-02-01 from the table in descending order of names.
_____________________________________________________________
Display names and Dateofstock of those items, in which the discount percentage is more than 25 from table.
____________________________________________________
Count the number of names whose type is Sofa from furniture table.
______________________________________________________________
Count the no. of names in each type and display it.
_______________________________________________________________
Display the total price of each type.
_______________________________________________________________
Add a column called total (price*discount).
______________________________________________________________
Display minimum price, maximum price, average price of the type sofa,baby cot and office table .
____________________________________________________________________
Q.2 Predict the output of the queries by considering the table given below: STUDENTS
AdmnoNameClassSectionPhone1237Utkarsh12A453721451328Naresh10C431120001267Sumedha10B534281191345Varun12C324762191434David11ANULL1461Mohini12BNULLSelect class,section.count(*) from students group by class;
Select name,section,count(*) from students group by section;
Select name,phone from students where class=10;
Select count(*) from students group by section;
Select phone,name from students where phone=null;
Q.3 Consider the two tables given below & write the queries for the following:
ITEMS
I_codeNameCategoryRate1001Masala dosaSouth Indian601002Vada sambhar South Indian401003Idli sambharSouth Indian401004Chow meinChineese802001Dim sumChineese602002SoupChineese703001PizzaItalian240 BILLS
BillnoDateI_codeqty12010-04-011001212010-04-011002122010-04-021003322010-04-021004132010-04-022001442010-04-032002352010-04-033001252010-04-032001452010-04-0310033
Display the average rate of South Indian items
Display the no. of items in each category
Display the total quantity sold for each item.
Display total qty of each item sold ,Dont display the data whose total qty is less than 3.
Display the details of bill records along with name of each corresponding item.
Display the details of the bill records for which the item is Dosa.
Display the bill records for each Italian item sold.
Display the total value of items sold for each bill.
*************
EMBED PBrush EMBED PBrush
Worksheet 20
Q.1 Define:
1) Access Specifiers: ___________________________________________________________________________
__________________________________________________________________________
2) Keyword Static:
___________________________________________________________________________
___________________________________________________________________________
3) Public
__________________________________________________________________________
___________________________________________________________________________ 4) Private
___________________________________________________________________________
___________________________________________________________________________
5) Java Libraries
___________________________________________________________________________
___________________________________________________________________________
6) Keyword This
___________________________________________________________________________
___________________________________________________________________________
7) Keyword Static
___________________________________________________________________________
___________________________________________________________________________ 8) Keyword Final
___________________________________________________________________________
___________________________________________________________________________
Q.2 Write functions of the packages given below:
1) Java.applet ___________________________________________
2) java.awt ___________________________________ __________
3) Java.io _______________________________________________
4) Java. Lang ______________________________________________
5) Java.net _______________________________________________
6) Java.util _______________________________________________
Q.3
1) What is friendly access of class members?
________________________________________________________________________
________________________________________________________________________
3) Differentiate between equals ( ) and equalsIgnorecase ( ) string functions?
________________________________________________________________________
________________________________________________________________________
4) Which command creates a package in Java?
________________________________________________________________________
5) Write a program in Java to accept a string & reverse it.
6) Write a program to display date & calendar on your frame.
********************
EMBED PBrush EMBED PBrush
Worksheet 21
Q1. a) Write one disadvantage of the following topologies in network
i) Bus Topologies ________________________________________________________________________
(ii) Star Topologies ________________________________________________________________________
b) Explain in brief of networking needs and goals.
________________________________________________________________________
c) Name two encodings used for Indian Language computing?
________________________________________________________________________
d) Define the following terms:
(i)Hub:
________________________________________________________________________
________________________________________________________________________
(ii) Switch:
_______________________________________________________________________
_______________________________________________________________________
Q2. (a)What is the name of event listener interface for action events?
_______________________________________________________________________
_______________________________________________________________________
(b)What does getpassword () on a password field return?
_______________________________________________________________________
(c) What is inheritance ? Name its various forms. _______________________________________________________________________
_______________________________________________________________________
Q3 .a) Differentiate between CHAR and VARCHAR _______________________________________________________________________
_______________________________________________________________________
Q4. Read the following case study and answer the questions that follow:
1) Write the Code to disable the text fields AmountTF, DiscountTF And NetTF.
2) Write the code for CalcBTN to calculate the amount, discount and net amount as per the given description and conditions
3) Write the code to remove the decimal part from the text field NetTF so that the net amount contains only the integer portion in rupees. Where (in which event handler) would you place this code to have its impact?
4) Write the code for ExitBTN to close the application, but before the application in closed it should check the net amount and if the net amount >10000 the membership of the customer should be upgraded and displayed. For example if the customer already has silver membership it should be upgraded to gold and he should be informed of the same using a message box.
Q5 (a). Given the following code fragment:
If(a==0)
System.out.println (zero);
If(a==1)
System.out.println (one);
If(a==2)
System.out.println (two);
If(a==3)
System.out.println (three);
Write an alternative code (Using if) that saves on number of comparisons.
(b). What will be the output produced by following code fragment?
Float x=9;
Float y=5;
Int z= (int) (x/y);
Switch (z) {
Case1: x=x+2;
Case2: x=x+3;
Default:x =x+1;}
System.out.println (value of x:+x);
(c).Find out errors if any:
M=1;
N=0;
For (; m+n<19;++n)
System.out.println (hello);
M=m+10;
(d). Predict the output of the following code fragments:
Int I, j, n;
N=0; i=1;
Do
{N++;
I++;}
While (i<=5);
**********
EMBED PBrush EMBED PBrush
Worksheet 22
Q.1 Write HTML code to produce these controls
a text box with 10 rows and 30 columns
______________________________________________________________________
a password text box
______________________________________________________________________
Q.2 a) Explain term function overloading along with an example
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
b) What are three transaction control statements n MySQL? Give example?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
(c) Consider the table HOSPITAL given below. Write command in SQL for following questions-
i) To show all information about the patients of cardiology department.
ii) To list the names of female patients who are in orthopedic department.
iii) To display Patients name, charges, age for only male patients
iv) To count the number of patients with age>30.
NO.NAMEAgeDepartmentDateofadmChargesSex1Tarun12Surgery01/01/98300M2Zubin36Orthopedic12/01/98250F3Ankita16Orthopedic24/02/98300F
Q3.(a) Write an SQL command for creating a table student who structures given below
Field NameData typeSizeConstraintRnoNumber3Primary keyClassVarchar5Not NullPercentageNumber5,2Not NullGiven the following teacher relation: Write SQL commands for question.
Teacher Table
No.NameDepartmentDateofJoiningSalarySex1RajaComputer21-5-988000M2SangeetaHistory21-5-979000F3RituSociology29-8-988000F 1) Show the list of Computer and history department.
2) To list the name of female in History department.
3) To list all names of teacher with date of admission in ascending order.
4) To display Teachers name, department and salary of female teachers.
**************
EMBED PBrush EMBED PBrush
Worksheet 23
Section (A)
Answer the following questions:
What is the difference between Star Topology and Bus Topology of network? 2
What is the full form of the following 2
FTP ii) FSF iii) GNU iv) FLOSS
What to you understand by Domain resolution? 2
Why network security is an important aspect over data security 2
Explain the following terms: 2
Linux ii) OSS
(a) What is e-Learning? 1
(b) What is database connectivity? 1
(b) You want to develop an interface for entering your Roll_no, Name, Age and Sex (male or female). Suggest suitable front-end interface tools in NetBeans IDE. 2
(c) Differentiate between front-end and back-end. 2
(d) Acme Education has set up its new branch at Jaipur for its office and web based activities. It has 4 wings of buildings as shown in the diagram:
Wing X to Wing Z
50 m
Wing X
50
Wing Z to Wing Y
70 m
Wing Z
30
Wing Y to Wing X
125 m
Wing Y
150
Wing Y to Wing U
80 m
Wing U
15
Wing X to Wing U
175 m
Wing Z to Wing U
90 m
Center to center distances between various blocks Number of computers
Suggest the most suitable place for Repeater and switch and justify.
Suggest the most suitable place to house the server.
Suggest the most suitable cable layout and topology between various wings. Section (B)
3. (a) What will be the output of the following program code when the user will press JButton: 2
Public class svm
{ int a;
svm(int p)
{ a=p; }
void assign(int no)
{ a=no; }
int disp()
{ return a; }
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
svm os=new svm(15);
System.out.println ( + os.disp ());
os.assign (35);
System.out.println ( + os.disp ());
}
(b) Rewrite the following if-else segment using switch-case statement 2
Char ch='A';
if(ch=='A')
System.out.println ("Account");
if((ch=='C') || (ch=='G'))
System.out.println ("Admin");
if(ch=='F')
System.out.println ("Advisor");
(c) What is Dialog box? 1
(d) Explain the Resultset. 2
(e) In the Design Area, describe the process of setting, two components to the same width. 2
(f) (i) What are the general rules of declare XML element. 2
(ii) Write HTML code for the following page: 2
ProductionMr. Ajay1389Mr. S.N. Krishna1566Mrs. Arti Singh1722SalesMr. Alok2244Mrs. Poonam4533Ms. Anita Sharma5638
(g) (i) Write the HTML code line to set the BGCOLOR as YELLOW. 2
(ii) What do you understand by option VLINK used with tag?
4. Create a java desktop application to find the area of circle, rectangle, circumference of circle and area of square.
Formula to calculate various things are
AreaCircumference/PerimeterCircleRectangleSquareCircleRectangleSquareL x BSide22L + 2B4xSide
Control TypeControl NameJpanelJPanel1, JPanel2,JtextFieldJTxtlength, JTxtbreath, JTxtradius, JTxtside,ButtonJBtnCalculateJradioButtonJrbcircle, Jrbrectangle, JrbsquareJcheckBoxJchkarea, Jchkperimeter, JchkcircumferenceJlabelJlblresult
Write the code for respective radiobutton to make available the display textbox control, which are appropriate for different object (Circle, Rectangle, Square) operation. 2
Write the code for calculate button to calculate the desired operation which you choose from radio button and check box 3
(Section C)
5. (a) Differentiate between CREATE TABLE and DROP TABLE in SQL. 2
What do you mean by attribute? Explain with an example. 2
What is transaction? Which statement is used to disable or enable the transaction? 2
What is the difference between Cartesian product and join? 2
Name the clauses for the following: 2
To display the record in specified range.
To display the record according to the given pattern
6 Write SQL commands for the statements (i) to (vi) and give outputs for SQL queries (vii) to (x) on
the basis of the table Shop. 10
Table: Shop
No.Shop_nameSaleAreaCust_percentRatingCity1West side250000West68.6CDelhi2Pantaloons500000South81.8AChennai3Sirs & Hers300000North79.8BAmritsar4Sports king380000North88.0BBaroda5Biswas stores456000East92.0ADelhi6Big Bazar290000South66.7AKolkota
To display the name of all shops which are in Area South and sale more than average sales.
To display name and Customer Percentage of all the shops having cust_percentage between 77 and 90.
To display list of all the shops with minimum sales, in ascending order of shop name.
To display the city along with sum of sale for each city.
To display all the columns where rating is A in the descending order of area;
To display all the Area where more than one shop is there.
Select min(sale) from SHOP where Sale>300000 Group by Sales;
Select Count(Distinct City ) from Shop;
Select Avg(Sale) from Shop where Area=South;
Select Avg(Cust_percentage), sum(sale) from shop where Rating=A;
(a) Write the SQL command to create the TEACHER and DEPARTMENT tables including its constraints. 2
Table : TEACHER
Column NameData TypeSizeConstraintTNO
TNAME
TADDRESS
SALARY
DEPT_NO
DOJCHAR
VARCHAR
VARCHAR
DOUBLE
CHAR
DATE4
20
25
7,2
4
PRIMARY KEY
Table DEPARTMENT
Column NameData TypeSizeConstraintDEPT_NO
DEPTNAMECHAR
VARCHAR4
10PRIMARY KEY
Write the resulting output of the following: 2
SELECT SUBSTR(TRIM( HELLO HOW*******ARE YOU),5,14);
SELECT FLOOR(65467.8890) + R0UND(1234.88, 1);
SELECT MOD(14*9,90/9);
SELECT SUBSTR(UPPER(SUBSTR(God is great,2,8)),2);
Study the following table TEACHER and SALARY and write the SQL commands for the questions (i) and (ii) and give outputs for SQL queries (iii) and (iv)
Table: TEACHER
SIDNAMEDEPTSEXEXPERIENCE101SiddharthComputerM12104RaghavPhysicsM5107NamanChemistryM10114NupurComputerF3109JanviPhysicsF9105RamaAccountsM10117JamesComputerF3111BinoyAccountsF12130SamuelComputerM15Table : SALARY
SIDBASICALLOWANCEDA1011200010003001042300023005001073200040005001141200052001000109420001700200105189001690300130217002600300Display NAME and DA of all staff who are in Accounts department and having more than 10 years of experience and DA is more than 300. 2
Display the NAME and salary of all staff working in physics department and salary more than average salary. (SALARY=BASIC +ALLOWANCE+ DA) 2
Select NAME, DA, BASIC from TEACHER, SALARY
Where BASIC>20000 and TEACHER.SID=SALARY.SID; 1
Select NAME, DEPT, SEX, BASIC, DA from TEACHER, SALARY
Where DEPT LIKE %o% and DA >=500 and TEACHER.SID=SALARY.SID; 1
***************
EMBED PBrush EMBED PBrush
Worksheet 24
Q.1 a) Mr. Vasu is transferring data to a large distance via cable connection and he wants
To amplify the Signal transmitting over a network. What device will be useful for
Him?
b) What type of network would you suggest for the following type of requirements in
an organization?
i)Around 200 computers in two different buildings adjacent to one another are to be
connected
ii) The cost of network should not be very high.
iii) It should be fairly easy to implement.
c) Distinguish between Free software & Shareware?
d) Arrange the following communication channels in ascending order of their data
transmission rates.
Ethernet Cable, Optical fiber, Telephone Cable, Coaxial Cable.
e) State one example of microwave transmission?
f) Which of the following is not a transmission medium?
i) Telephone Lines ii) Coaxial Cable iii) Modem iv) Microwave Systems
g) Which of the following technologies require line-of site between the transmitter and
receiver ?
a) Satellite b) Fiber Optic c) Microwave d) Co-axial Cable
h) Identify domain name & URL from the following?
http://www.helpingeachother.in/home/aboutus.htm
Q.2 a) Define Super class & Subclass?
b) Write an HTML command to display the following in your Web Page.
X2+Y2
c) If R1 is a relation with 5 rows & R2 is a relation with 3 rows, how many rows will the
Cartesian product of R1 & R2 have?
d) What is the output of the following coding?
double Number = 7583241;
int Firsr = 0, Second = 0, R;
do
{
R = Number % 10;
if ( R % 2 == 0 )
First += R;
else
Second += R;
Number = Number / 10;
} while (Number > 0);
System.out.print (First Second );
Write a JAVA code that takes the cost of a pencil from jTextField1 and number of
Pencils from JTextField2 and calculate total amount as cost*number to be displayed in JTextField3 and also find \
20% service tax out of total amount in jTextField4.
Write a method in java which takes the parameter as string and print the second last
Character?
How many times will the following loops execute? Which one of these is an entry
Control loop and which one is an exit control loop?
Loop 1 Loop 2
int sum=0 ,i=5 ;
do{
sum+=i;
i++;}while(i<5)
int sum=0,i=5;
while(i<5){
sum+=1;
i++;}
Q.3a) Write HTML code to produce these controls.
i) A combobox
ii) A Text Area with 10 rows and 30 columns.
Raja is not able to enter a duplicate value in a column what constraint had he specified
While creaing the table
c) Differentiate between UPDATE and ALTER commands with examples
d) When creating a table Customer Raj forgot to add a column City. Give the
statement which he should write to add the column into the table. Table Customer is
already created?
What is the difference between a WHERE clause and an HAVING clause of SQL
SELECT statement .
A table Stock in a database has 5 columns & contains 17 records.What is the degree
& cardinality of this table?
g) Which keyword is used to make a sub class?
Room_No, Cust_Name, Room Type and Room Rent of table HOTEL are given
Table : HOTEL
Room_NoCust_NameRoom_TypeRoom_Rent204RajeshSingle700308AnujaDouble AC1600105VinamraSingle NAC1000202SomaDouble AC 1600206JackSingle700 Based on this information, find output of the following queries:
a) SELECT Room Type, SUM (Room Rent) FROM hotel GROUP BY Room Type;
b) SELECT Room_no FROM hotel WHERE Cust_Name LIKE %n%;
Q.4 a) A phone number consisting of 10 digits, is stored in a string variable .Now it is
Required to store this phone number in a Long type variable .Write a Java statement
To do this ?
b) What will be the contents of jTextField1 and jTextField2 after executing code:-
String Board=CBSE;
String str=Informatic Practices;
String str1=NetBeans IDE Programming;
jTextField1.setText (Board.concat (str));
jTextField2.setText (str1.substring (9, 13))
The following code has some error(s).Rewrite the correct code underlining all the
Corrections made?
1) : 2) m=1;
f=1; n=0,
for (int a=40;(a);a--) for(;m+n<19;++n)
f*=a; system.out.println(hello\n); : s=0:
for (int a = 1; a <40/a++) m=m+10;
s+= a;
****************
PAGE \* MERGEFORMAT 27
Prepared & Compiled by Alpana Saxena
Wing Y
Wing Z
Wing U
Wing X
Virus S/w Hut
Name of customer
Bill amount
O Cash O Credit Card O Cheque
Discount
Net Amount
Calculate Discount
Stop
Wing Y
Wing X
Wing Z
Wing U
% & ' ( ) 3 4 5 ? O P ͔zj_TLD_TLD_ h3 OJ QJ h} OJ QJ h3 h} OJ QJ h3 hr OJ QJ h3 h3 5CJ OJ QJ aJ h[ 5CJ OJ QJ aJ h+ 5CJ OJ QJ aJ h3 CJ aJ j
h3 h3 5CJ UaJ &jOT
h3 h3 5CJ UVaJ h3 h3 5CJ aJ j h3 h3 5CJ UaJ h+r h3 CJ aJ jOT
h3 UVj h3 Uh3 ) 5 P a 1
\ 7 M + $ $d %d &d 'd N O P Q a$gd3 ( $d %d &d 'd N O P Q gd3
\ 6 7 : < ? L M
6
7
! F R S x y ~
P ] g ʿʿʴʿ톑ʿ h3 hAa OJ QJ hr OJ QJ h3 hFt OJ QJ h3By OJ QJ h1| OJ QJ h3 h1| OJ QJ h3 h
{ OJ QJ h
{ OJ QJ h3 OJ QJ h} OJ QJ h3 h} OJ QJ h3 hr OJ QJ h+ OJ QJ 1 7
S " y h S o Y r
s gd~ g q , E L O ] m n ! + X Y b l r $ / U [ ^ _ ` z6j hxP hxP B*CJ OJ PJ QJ U^J aJ ph h3 h" OJ QJ h3 hA/ OJ QJ h3 h OJ QJ h+ OJ QJ h OJ QJ h# OJ QJ hn OJ QJ h3 h# OJ QJ h3 hAa OJ QJ h3 h~ OJ QJ h~ OJ QJ 0 \ ^ _ / 3 7 8 | | | $d ^a$gdxP $d a$gdxP . $d $d %d &d 'd N O P Q a$gdxP + d $d %d &d 'd N O P Q gdxP $a$gd+ ` o p q r t u ˯v]>!v 9j8 hxP hxP 5B*CJ OJ PJ QJ U^J aJ ph <j?Q
hxP hxP 5B*CJ OJ PJ QJ U^J aJ ph 0hxP hxP 5B*CJ OJ PJ QJ ^J aJ ph 9j hxP hxP 5B*CJ OJ PJ QJ U^J aJ ph 6j hxP hxP B*CJ OJ PJ QJ U^J aJ ph 6j! hxP hxP B*CJ OJ PJ QJ U^J aJ ph 9j!?Q
hxP hxP B*CJ OJ PJ QJ U^J aJ ph -hxP hxP B*CJ OJ PJ QJ ^J aJ ph / 0 3 5 ; = ||tlZM8 (jU
hd hd B*PJ UVph hd hd B*PJ ph "j hd hd B*PJ Uph hd OJ QJ h+ OJ QJ #hxP B*CJ OJ PJ QJ aJ ph =j hxP hxP B*CJ OJ PJ QJ UaJ mH nH ph u)hxP hxP B*CJ OJ PJ QJ aJ ph -hxP hxP B*CJ OJ PJ QJ ^J aJ ph "h[ 5B*OJ PJ QJ ^J ph (hxP hxP 5B*OJ PJ QJ ^J ph 8 9 : ; > ? @ A B C D $
c d $If a$gdxP $d a$gdxP
o o $
c d $If a$gdxP { kd(C $$If l 0
t 0 6 4 4
l a(ytW o o $
c d $If a$gdxP { kdC $$If l 0
t 0 6 4 4
l a(ytW o o $
c d $If a$gdxP { kd8D $$If l 0
t 0 6 4 4
l a(ytW o o $
c d $If a$gdxP { kdD $$If l 0
t 0 6 4 4
l a(ytW
o o $
c d $If a$gdxP { kdHE $$If l 0
t 0 6 4 4
l a(ytW G N Q s s ^ ^ $
c d $If a$gdxP $
c d a$gdxP { kdE $$If l 0
t 0 6 4 4
l a(ytW Q R Y ] o o $
c d $If a$gdxP { kdXF $$If l 0 hP
t 0 6 4 4
l a
ytW ] ^ e h o o $
c d $If a$gdxP { kdF $$If l 0 hP
t 0 6 4 4
l a
ytW h i p s o o $
c d $If a$gdxP { kdhG $$If l 0 hP
t 0 6 4 4
l a
ytW s t u J s s s s s s i i i i i d gdxP $
c d a$gdxP { kdG $$If l 0 hP
t 0 6 4 4
l a
ytW , 3 4 H I ! " k l m d gdxP " # m n o . $d $d %d &d 'd N O P Q a$gd[ + d $d %d &d 'd N O P Q gd[ $d a$gdxP d gdxP B C U V i j : ; h Ϻܙvk_k_k_k_k_k_k_k_k_k_k hd hd 5OJ QJ hd hd OJ QJ hd hd 5PJ h[ 5OJ PJ QJ h[ hd 5OJ PJ QJ hd hd 5B*PJ ph "j_ hd hd B*PJ Uph (jU
hd hd B*PJ UVph hd hd B*PJ ph "j hd hd B*PJ Uph "jxH hd hd B*PJ Uph " / C V j ; i ! Z! ! ! #" e" " " ;# gdd gdd d gdd h i Y! Z! ! ! ! ! "" #" d" e" " " " " " " # # :# ;# 7$ Q$ \$ ]$ l$ m$ ~$ $ $ $ $ $ $ $ $ $ %
% % % i% j% % % % % % % &