Informatics Practices 2017 CBSE [Delhi] Set IV
To Access the full content, Please Purchase
-
Q1
(a) How do Computer networks reduce hardware costs of an organization? Explain with the help of example.
(b) Compare BUS topology with STAR topology. Give example.
(c) (i) Why is a switch called an intelligent hub?
(ii) When is a repeater used in a computer network?
(d) Expand following term:
(i) OSS
(ii) HTTP
(e) Explain the term Firewall and Cyber Law.
Marks:10Answer:
(a) Networking promotes sharing of Hardware resources thereby reducing the hardware costs for each node in the network.
Example: Suppose in a computer network of six systems. A single CPU can be used for processing of all the six systems through networking. Also single printer can be configured with all the nodes and can be accessed from any of the terminals (nodes).Thus reducing printer and CPU cost in the network.
(b) Bus topology is a network type in which every computer and network device is connected to single cable.
Features of Bus Topology
- It transmits data only in one direction.
- Every device is connected to a single cable
Advantages of Bus Topology
- Cable required is least compared to other network topology.
- Easy to expand joining two cables together.
STAR Topology
In this type of topology all the computers are connected to a single hub through a cable. This hub is the central node and all others nodes are connected to the central node.
Features of Star Topology
1.Every node has its own dedicated connection to the hub.
2. Hub acts as a repeater for data flow.
Advantages of Star Topology
1. Fast performance with few nodes and low network traffic.
2. Only that node is affected which has failed, rest of the nodes can work smoothly.
(c) (i) The switch is called an intelligent hub due to the reason :-
With a regular hub, packets being sent simultaneously collide, causing re-transmissions (and thus delays). A switch, on the other hand, looks at the destination address, and sends the packet to that address on a separate wire, so no collision.
(ii) A repeater is a network device that is used to regenerate or replicate signals that are weakened or distorted by transmission over long distances The purpose of a repeater is to extend the LAN segment beyond its physical limits.
d)
(i) OSS – Open Source Software
(ii) HTTP – Hyper Text Transfer Protocol
(e)
Firewall: A firewall is a network security system that protects from unauthorized access. A firewall acts as a barrier between a trusted network and an untrusted network.
Cyber Law: Cyber law deals with the legal issues related to use of the internet and the World Wide Web. All the regulatory mechanisms the legal infrastructures come within the domain of Cyber law.
-
Q2
(a) Write the value that will be assigned to variable C after executing the following statement:
C = 25-5*4/2-10+4;
(b) Consider the statement:
frist_name = "Ayana";
i) What is the datatype of first_name?
ii) Is 325 the same as "321"? Give reason.
(c) Radhika changed the "Text" property of a Checkbox named jCheckBox1 to "reading". What change (if any) will be reflected in its name property?
(d) Ariya has typed the following comments. Write the comments using another way.
//This is a comment spreading
//over two lines
(e) Given below is HTML code. Rewrite the correct code underlining all the corrections done.
< o1 type = "A" start="D" >
< li >Bake in oven for an hour
< li >Remove from oven
< li >Serve
(f) Explain the meaning of the following statement with the help of example.
"Tags are not predefined in XML"
(g) Name two properties and two methods that are common in jTextField and JLabel.
Marks:10Answer:
(a) The value of c = 9.
(b) (i) The datatype is - String
(ii) No, because 325 is a numeric value whereas “321” is a String.
(c) The name property will remain unchanged.
(d) The other way is:-
/* This is a comment spreading
Over two lines */
(e) < ol type= “A” >
< li >Bake in oven for an hour
< li >Remove from oven
< li >Serve
< /ol >
(f) XML tags are not predefined; rather these are to be created by the author to describe the content in appropriate manner.
Example:-
< Questionpaper >
< question category = “MCQ” >
< title > Who is the author of book XYZ < /title >
< optA > Hamlet < optA >
< optB > Ruskin bond< /optB >
< Ans > B< /Ans >
< /question >
< /Questionpaper >
(g) The two properties in common are:-
i)Text
ii)Border
The two methods in common are:-
i)void setText(String);
ii)string getText();
-
Q3
(a) What is the relationship between SQL and MySQL?
(b) Write SQL statement that gives the same output as the following SQL statement but uses 'IN' keyword.
SELECT NAME FROM STUDENT WHERE STATE = ‘VA’
(c) Which one of the following SQL queries will display all Employee records containing the word "Amit", regardless of case (whether it was stored as AMIT, Amit, or amit etc.)?
(i) SELECT * from Employees WHERE EmpName like UPPER '%AMIT%';
(ii) SELECT *from Employees WHERE EmpName like '%AMIT%' or '%AMIT%' OR '%amit%';
(iii) SELECT * from Employees WHERE UPPER (EmpName) like '%AMIT%';
(d) If there are 10 rows in 'Emp' table and 5 rows in 'Department' table, how many rows will be displayed by the following query?
SELECT * FROM Emp, Department;
Write the term used for the join being used on the two tables mentioned above.
(e) Kunal has entered the following SQL command on Table 'STUDENT' that has TotalMarks as one of the columns.
SELECT COUNT (*) FROM STUDENT;
The output displayed is 20.
Then, Kunal enters the following command:
SELECT COUNT (*) FROM STUDENT WHERE TotalMarks < 100;
The output displayed is 15.
Then, Kunal enters the following command:
SELECT COUNT (*) FROM STUDENT WHERE TotalMarks >= 100;
He predicts the output of the above query as 5. Do you agree with Kunal? Give reason for your answer.
(f) In a hospital, patients are allocated to wards. A database named 'Hospital' is created. One table in this database is: WARD with WArdId, WardName, NumofBeds as columns and WardId as the primary key.
Write another suitable table you could expect to see in 'Hospital' database, with 3 suitable columns identifying Primary key and Foreign key.
(g) Give below is the 'Department' table:
DEPCODE
DEPNAME
101
ADMIN
102
RECEPTION
103
PERSONNEL
SET AUTOCOMMIT = 0;
UPDATE Department SET DEPNAME = 'OFFICE' WHERE DEPNAME = 'ADMIN';
INSERT INTO Department VALUES (104, 'HRD');
UPDATE Department SET DEPNAME = 'FRONT OFFICE' WHERE DEPNAME = 'RECEPTION';
COMMIT;
DELETE FROM Department WHERE DEPNAME = 'FRONT OFFICE'; ROLLBACK;
SELECT * FROM Department;
What will be the output of the above given SELECT statement?
Marks:10Answer:
(a) MySQL is a freely available open source RDBMS that uses Structured Query Language (SQL). SQL is the actual language that is defined by the ISO and ANSI. MySQL is a specific implementation of SQL.
(b) SELECT NAME FROM STUDENT WHERE STATE IN (“VA”);
(c) (iii) SELECT * from Employees WHERE UPPER (EmpName) like ‘%AMIT%; ’ . This SQL Query will display the desired result.
(d) No. of Rows = 50;
Cartesian Product will be used.
(e) Yes, we agree with Kunal because the first query gives the total number of records having TotalMarks=20.
The second query gives the count of students having total marks less than 100=15
Therefore for the third query to count students scoring more than or 100 will be 20-15=5.
(f) Table: PATIENT
Column - PatientId, PatientName, WardId
Primary key : PatientId
Foreign key : WardId
(g) The output is:-
DEPCODE
DEPNAME
101
OFFICE
102
FRONT OFFICE
103
PERSONNEL
104
HRD
-
Q4
Consider the table given below:
Write Answer to (i). Write SQL queries for (ii) to (viii) and output for SQL queries (ix) and (x).
(Table: Salesperson)
SID
Name
Phone
DOB
Salary
Area
S101
Amit Kumar
98101789654
1967-01-23
67000.00
North
S102
Deepika Sharma
99104567834
1992-09-23
32000.00
South
S103
Vinay Srivastav
98101546789
1991-06-27
35000.00
North
S104
Kumar Mehta
88675345789
1967-10-16
40000.00
East
S105
Rashmi Kumar
98101567434
1972-09-20
50000.00
South
Note: Columns SID and DOB contain sales Person ID and Date of Birth respectively.
(i) Write the date types of SID and DOB columns.
(ii) Display names of Salespersons and their Salaries who have salaries in the range 30000.00 to 40000.00
(iii) To list names, Phone numbers and DOB (Date of Birth) of Salespersons who were born before 1st November, 1992.
(iv) To display Names and Salaries of Salespersons in descending order of salary.
(v) To display areas in which Salespersons are working. Duplicate Areas should not be displayed.
(vi) To display SID, Names along with Salaries increased by 500. (Increase of `500 is only to be displayed and not to be updated in the table)
(vii) To display area along with number of Salespersons working in that area.
(viii) To display Names of Salespersons who have the word 'Kumar' anywhere in their names.
(ix) Select Name, LENGTH (Name) FROM Salesperson;
(x) SELECT Area, COUNT (*)
FROM Salesperson
GROUP BY Area
HAVING COUNT (*) > 1;
Marks:10Answer:
(i) SID- char
DOB - date
(ii) SELECT Name, Salary FROM Salesperson WHERE Salary BETWEEN 30000 AND 40000;
(iii) SELECT Name, Phone, DOB FROM Salesperson WHERE DOB < ‘1992-11-01’;
(iv) SELECT Name, Salary FROM Salesperson ORDER BY Salary DESC;
(v) SELECT DISTINCT(Area) FROM Salesperson;
(vi) SELECT SID, Name, Salary+500 FROM Salesperson;
(vii) SELECT Area, COUNT(*) FROM Salesperson GROUP BY Area;
(viii) SELECT Name FROM Salesperson WHERE Name LIKE ‘%Kumar%’;
(ix) Amit Kumar 10
Deepika Sharma 14
Vinay Srivastav 15
Kumar Mehta 11
Rashmi Kumar 12
(x) North 2
South 2
-
Q5
(a) "ABC" Event Management Company requires data of events that are to be organized. Write SQL query to create a table 'Event' with the following structure:
Field
Type
Constraint
EventId
Integer
Primary key
Event
Varchar(50)
DateEvent
Date
NumPerformers
Integer
(b) Consider the table given below and answer the questions that follow
Table : Workshop
WorkshopId
Title
NumSpeakers
MeantFor
Fee
551
Time Management
3
Senior Manager
7000
553
Add Development
1
Computer Programmer
9000
554
Planning
2
Senior Manager
8000
556
Marketing Strategies
2
Junios manager
9000
Table: Participant
ParticipantId
Name
WorkshopId
100
Prabhu Shankar
551
101
Dev Sen
554
102
Fauzia Khan
551
103
Tom Winters
553
(i) WorkshopId '552' is missing in the table workshop. Is there any discrepancy (something not correct)? Give reason for your answer.
(ii) WorkshopId '552' is present twice in the table Participant. Is there any discrepancy? Give reason for your answer.
With reference to the above tables (in Q.6-(b)), write commands in SQL for (i) to (iii) given below:
(c) With reference to the above tables (in Q.6-(b)), write commands in SQL for (i) to (iii) given below:
(i) To display names of Participants along with workshop titles for only those workshops that have more than 2 speakers.
(ii) To display PartipantId, Participant's name, WorkshopId for workshops meant for Senior Managers and Junior Managers.
(iii)To display WorkshopId, title, ParticipantId for only those workshops that have fees in the range of 5000.00 to 8000.00
Marks:10Answer:
6. (a) CREATE TABLE ABC
(
EventId integer Primary key,
Event varchar(50),
DateEvent date,
NumPerformers integer );
(b) (i) No,there is no discrepancy as workshop id ‘552’ has not been entered in the table workshop.
(ii) No, there is no discrepancy as there can be multiple participants in a single workshop.
(c) (i) SELECT Name,Title FROM Workshop w, Participant p WHERE w.WorkshopId=p.WorkshopId AND NumSpeakers>2;
(ii) SELECT ParticipantId,Name, w.WorkshopId FROM Workshop w, Participant p WHERE w.WorkshopId=p.WorkshopId AND MeantFor IN(‘Senior Manager’,’Junior Manager’);
(iii) SELECT w.WorkshopId, Title, Name FROM Workshop w, Participant p WHERE w.WorkshopId=p.WorkshopId AND Fee BETWEEN 5000.00 AND 8000.00;
-
Q6
(a) Write the values of c and d after execution of following code:
int a = 1 ;
int b = 2 ;
int c;
int d;
c = ++b;
d = a++;
c++;
(b) What is the difference between getSelectedIndex( ) and getSelectedItem( ) methods?
(c) What will be displayed in jTextField1 after the following code is executed? Also write how many times the loop will execute.
a = 5;
b = 2;
While (b !=0)
{
r = a%b;
a = b;
b = r;
}
jTextField1.setText(" "+a);
(d) Write the values that will be assigned to x, y, z and t after executing the following Java code:
String s1, s2, s3, x, y, z;
int t;
S1 = "classxii";
S2 = "cbseboard";
S3 = " aisse2016 ";
x = s1.substring(5, 8);
y = s2.concat (s1);
z = s3.trim();
t = z.length();
(e) Write the value that will be stored in variable num and sum after execution of following code:
int sum=0, num = -2;
do
{
sum = sum + num;
num++;
}
while (num < 1);
(f) The following code has error(s). Rewrite the correct code underlining all the corrections made:
integer counter = 0;
for (num =i; num >= 1; num--);
{
If i%num = 0
{
counter = counter + 1;
}
}
(g) Ms. Angela works as a programmer in a Bus Tour Company named "Heritage Experiences". Groups of people come and reserve seats. There are 3 stopovers for the bus. First stop is at Alwar, second at Jaipur, third at Udiapur. A group may choose any one destination out of Alwar, Jaipur and Udaipur.
Ms. Angela has designed a software to compute charges to be paid by the entire group. A screenshot of the same is shown below:
A group can opt for one destination out of Alwar/Jaipur/Udaipur. If the group is
"Frequent Traveller Group", the group gets a 10% discount on Total charges.
Help Ms. Angela in writing the code to do the following:
(i)After selecting appropriate Radio Button and checkbox (if required), when 'Calculate Charges' button is clicked, 'Total Charges', 'Discount Amount', 'Amount to Pay' should be calculated and displayed in the respective text fields. The Charges per person for various destinations are as follows:
Destination
Amount (in `)
Alwar
200.00 per person
Jaipur
500.00 per person
Udaipur
900.00 per person
'Total Charges' is obtained by multiplying 'Number of People in Group' with Amount per person.
If 'Frequent Traveller Group' checkbox is selected. 'Discount Amount' is calculated as 10% of 'Total Charges'. Otherwise 'Discount Amount' is 0.
'Amount to Pay' is calculated as:
Amount to Pay = Total charges - discount Amount.
(ii) When 'CLEAR' button is clicked, all the textfields, radio button and checkbox should be cleared.
(iii) When 'EXIT' button is clicked, the application should close.
Marks:15Answer:
(a) The value of c = 4 and d =1;
(b)
- getSelectedIndex() returns the smallest selected cell index.
- getSelectedItem() returns returns the current selected item.
(c) jTextField1 =1
The loop will execute 2 times.
(d) x = xii
y= cbseboardclassxii
z= aisse2016
t = 9
(e) The value of num = 1
The value of sum = -3
(f) int counter =0,i;
for(num=i; num>=1;num--)
{
if ( i%num ==0)
{
counter =counter + i;
}
}
(g) (i) double total=0,discount=0,amount=0;
int people=Integer.parseInt(JTextField2.getText());
if(jRadioButton1.isSelected()==true)
total= people*200;
if(jRadioButton2.isSelected()==true)
total= people*500;
if(jRadioButton3.isSelected()==true)
total= people*900;
jTextField3.setText(“”+total);
if(jCheckBox1.isSelected() = = true)
discount= 0.1*total;
jTextField4.setText(“”+discount);
amount = total-discount;
jTextField5.setText(“”+amount);
(ii) jTextField1.setText(“ “ );
jTextField2.setText(“ “ );
jTextField3.setText(“ “ );
jTextField4.setText(“ “ );
jTextField5.setText(“ “ );
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);
jCheckbox1.setSelected(false);
(iii) system.exit(0);
-
Q7
(a)
(i) Define e-governance.
(ii) List two advantages of e-governance to a disabled person.
(b) How does E-business help organizations to provide better customer services?
(c) Ms. Fauzia is creating a form for an application to be used in a Gym. Help her to choose most appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and Command Button for the following entries:
S. NO.
Function
1
To enter NAME
2
To enter EMAIL ID
3
To allow user to choose any one MEMBERSHIP DURATION out of 1 Month, 3 Months, 6 Months, 1 year.
4
To choose PRE-EXISTING MEDICAL CONDITIONS out of Diabetes, Heart Disease, Chest Paie, Shortness of Breath, Epilepsy, Others.
Marks:5Answer:
(a) (i) e-governance is the application of Information and Communication Technology (ICT) for delivering government services, exchange of information, between government-to-customer (G2C), government-to-business (G2B), government-to-government (G2G).
(ii) The two advantages are:-
- Saves waiting time in queues in government department.
- Relaxation in cost in online transactions for senior citizens.
(b) E-Commerce helps organization to provide better customer services by providing 24x7 support. Customer can do transactions for the product or enquiry about any product/services provided by a company anytime, anywhere from any location.
(c) 1- TextField
2- TextField
3- RadioButton
4- ListBox