Académique Documents
Professionnel Documents
Culture Documents
com
INTERNATIONAL INDIAN SCHOOL, RIYADH
CLASS-XII FIRST TERM INFORMATICS PRACTICES
Chapter 1
1. What is MAC Address?
2. Write two advantages of networks.
3. Write two disadvantages of networks.
4. What is communication channel? Name the basic types of communication channels available.
5. What is IP address?
6. What is domain name? How is it alternatively known?
7. What are the various types of networks?
8. What is the difference between MAN and WAN?
9. What is meant by Topology? Name some popular topologies.
10. Define a network
11. What are the similarities and differences between bus and tree topologies?
12. What are the limitations of star topology?
13. What are the goals of network?
14. Write the applications of network?
15. What do you understand by domain name resolution?
16. What are communication channels? Discuss various channels available for networks?
17. Advantages and disadvantages of the followings :
i. optic fiber
ii. coaxial cables
iii. twisted pair cables
iv. radio waves
v. microwaves
vi. Satellites
18. Discuss and compare various types of networks?
14. Name and explain the usage of any one relational and one logical operator in Java.
15. What is the difference between = and == operator in java?
16. Name the two type of selection statement available in Java.
17.. Write the purpose of Switch Statement with the help of an example. Which Java Statement can be
used in place of switch statement? In the switch statement, what happens if every case fails and there is
no default option?
18. What is the purpose of break statement in java?
19. What is the purpose of break statement in java?
20. Find the output of the following code snippet written in java public static void main(String [ ]args)
{
long a=78345,s1=0,s2=0,r;
while(a>0)
{
r=a%10;
if (r%4==0)
s1+= r;
else
s2+=r;
a/=10;
}
System.out.println("S1 ="+ s1);
System.out.println("S2 ="+ s2);
}
21. Correct the errors in the following program segment written in JAVA. You are just required to
write the corrected code, underlying the corrections made.
23. Given the value of a variable, write a statement,without using if construct, which will produce
the absolute value of a variable.
30. Given a pacakage named EDU.student, how would you import a class named Test contained in this
package? Write one line statement.
Chapter :4
1.What does getPassword() on a password field return?
(a) a string (b) an integer (c) a character array.
2.Which of the following component is the best suited to accept the country of the user?
22.How you can determine whether 5th item in a list is selected or not?
23.Which method you would use to insert Hello at 10th position in the Text Area control.
24.Which method you would like to use to insert an Icon (picture) on a Push Button.
25.Which property would you like to set to make a Combo box editable?
26.What is Layout Manager? Name the layout manager s offered by NetBeans?
27. Name three commonly used properties and methods of the following controls.
(a) text field (b) text area (c) Check Box
28.What is dispose() used for ?
29.What is the difference between(a) Text field & Text area
(b) Text field & password field
(c) Radio Button & Check Box
30.What is the significance of following properties of a text area ?
(a) lineWrap (b) wrapStyleword
31.What is the significance of a button group? How do you create a button group?
32.What do you understand by focus?
33.What is meant by scope of a variable?
34.Create a Java Desktop Application to find the incentive (%) of Sales for a Sales Person on the basis of
following feedbacks
Feedback
Maximum Sales
Excellent Customer Feedback
Maximum Count Customer
Note: that the sales entry should not be space.Calculate the total incentive as :Sales amount* Incentive.
The feedback will be implemented in JCheckBox controls.Using a JButtons (Compute Incentive) click
event handler,display the total incentives in a JTextField control. Assume the nomenclature of the swing
components of your own.
Note that the JFrame from IDE window will be shown as given:
35.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 icecream costs
Rs. 30, Strawberry Rs. 35 and Chocolate Rs. 50. A customer can chose one or more ice-creams, with
quantities more than one for each of the variety chosen. To calculate the bill parlor manager selects the
appropriate check boxes according to the verities of ice-cream chosen by the customer and enter their
respective quantities.
Write Java code for the following:
a. On the click event of the button Calculate, the application finds and displays the total bill of the
customer. It first displays the rate of various ice -creams in the respective text fields. If a user doesnt
select a check box, the respective ice-cream rate must become zero. The bill is calculated by multiplying
the various quantities with their respective rate and later adding them all.
b. On the Click event of the clear button all the text fields and the check boxes get cleared.
c. On the click event of the close button the application gets closed
36.Read the following case study and answer the questions that follow. TeachWell Public School wants to
computerize the employee salary section. The School is having two categories of employees : Teaching
(a) Write the code to calculate the Basic salary, deductions, gross salary and net salary based on the
given specification. Add 3000 to net salary if employee is working for more than 10 years.
Gross salary=Basic salary + DA + HRA
Net salary = Gross salary deductions
(b) Write the code to exit the application. (c)Write the code to disable textfields for gross salary,
deductions and netsalary.
37. ABC School uses the following interface built in java to check the eligibility of a student for a
particular stream from science, commerce and humanities. The user first enters the total percentage and
selects the desired stream by selecting the appropriate option button. An
additional 5% is marks is given to students of NCC. Write Java Code for the following
a. On Action event of the button Calc Percentage Net percentage of the student is
calculated and displayed in the appropriate text filed. Net percentage is same as that of
the actual percentage if the student doesnt opts for NCC otherwise 5% is added to actual
percentage.
b. On Action event of the button Result, the application checks the eligibility of the
students. And display result in the appropriate text field. Minimum percentage for science
is 70, 60 for commerce and 40 for humanities.
c. On the Click event of the clear button all the text fields and the check boxes get cleared.
d. On the click event of the close button the application gets closed.
55.The FOR U SHOP has computerized its billing. A new bill is generated for each customer. The
shop allows three different payment modes. The discount is given based on the payment mode.
a.Write the code for the CmdClear Button to clear all the Text Fields.
b) Write the code for the CmdCalc Button to display the Discount Amount and Net Price in
the TxtDisc and the TxtNet Text Fields respectively
Chapter 5
1. In java, methods reside in __________.
(a) Function (b) Library (c) Classes (d) Object
2. The number and type of arguments of a method are known as _____________.
(a) Parameter list (b) Calling (c) Definition (d)None to these.
3. The first line of method definition that tells about the type of return value along with number and type of
arguments is called_____________.
(a) Class (b) Object (c) Prototype (d) Datatype
4. A member method having the same name as that of its class is called______method.
(a) Destructor (b) Constructor (c) Object (d) Variable
5. A constructor method has__________return type.
(a) float (b) void (c) no (d) int
6. A_________constructor takes no arguments.
(a) Copy constructor (b) Non-Parameterized constructor (c) Parameterized constructor
7. A_________constructor creates objects through values passed to it.
(a) Copy constructor (b) Default constructor (c) Parameterized constructor
8. The keyword_________refers to current object.
(a) void (b) goto (c) this (d) null
9. Define a method. What is method prototype and signature?
Chapter 6
1. Which keyword can protect a class in a package from accessibility by the classes outside
thepackage?
2. We would like to make a member of a class visible in all subclasses regardless of what package
theyare in. Which one of the following keywords would achieve this?
3. Which of the following keywords are used to control access to a class member?
(a) default (b) abstract (c)protected (d) interface (e) public.
4. The public members of objects are accessed through which operator.
(a) arrow (b) dot (c) this (d) none of these
5. The private members are accessible only inside their _______class.
(a) own (b) sub (c) super (d) none of these
6. Which command is used to import packages and their classes?
(a) include (b) import (c) public (d) inline
7. Which statement is used to create a package in Java?
(a) Class (b) super (c) this (d) package
8. In Java, all strings are objects?
(a) True (b) False (c) dont say
9. What do you understand by Package in Java?
10. .Given a package named EDU. Student, how would you import a class named Test contained in
thispackage? Write one line statement.
13. What is the output of the following code fragment if abc is passed as argument to the func()?
Public static void func(string s1)
{
String s = s1 + xyz;
System.out.println(s1= + s1);
System.out.println(s = +s);
}
a) Write the code to declare an abstract class Figure with an abstract method area( Notice that the class
should declare the possible variables for area operation.
b) Write the code to declare two classes called Rectangle and Triangle which will calculate the area for
both rectangle and triangle using the abstract method area( ). Use suitable constructorsfor both
classes.
c) Write the code for Calculate button to access the abstract method for both triangle and rectangle.
d) Write the code for cmdExit to exit the application.
15. Write a program to demonstrate constant in an interface to find the area of circle. Notice that the
interface should declare the value of pie as a constant. That is:
interfacevaluePie {
double PIE= 3.14;
}
Using class, implement the interface constant and find the area of circle. The following is the screen used
to find area of circle using interface constant.:
a) Write the code to declare an interface for constant with implementation class method area().
b) Write the code for FindArea button to acecess the abstract method and display the area ofcircle in
textbox.
c)Write the code for cmdExit to exit to exist the application.
17.What members of a class out of private, protected and public are inheritable?
18. When do we declare a method or class final?
18. What is an abstract class?
19. When do we declare a method or class abstract?
2.What is DriverManager ?
3.What is the purpose of connection.close() method?
4. Name the four components of JDBC.
5. What are the steps involved in establishing a connection?
6. What is ResultSet ?
7. What type of parameter that used in executeQuery( ) method?
8. What is Connection? What is its role?
9. What all JDBC classes/objects are used in a database connectivity application?
10. What is JDBC? What is its basic functionality?
11. What is the JDBC-ODBC Bridge?
12. Explain the purpose of DriverManager
.
13.Name the methods which are useful for executing SQL statements.
14.Differentiate between JDBC and ODBC ?