Computer Science
1. What will be the output of the following program:
#include <iostream.h>
void Secret(char Str[ ])
{ for (int L=0;Str[L]!='\0';L++);
for (int C=0;C<L/2;C++)
if (Str[C]=='A' || Str[C]=='E')
Str[C]=Str[L-C-1];
else
{ char Temp=Str[C];
Str[C]=Str[L-C-1];
Str[L-C-1]=Temp;
}
}
void main()
{ char Message[ ]="PreboardExam";
Secret(Message);
cout<<Message<<endl;
}
2. Find the output of the following program:# include <iostream.h># include <conio.h># include <stdlib.h>void main (){ char serial[] = {'A', 'B', 'C', 'D'}; int number[] = { 2, 6, 7, 3}; clrscr(); randomize(); cout << " The winner is : "; cout << serial [random(3)]; for (int i = 0; i < 4; i++) cout << number[sizeof(int) + random(2) - 1 ]; getch();
}Outputs:
(i) The winner is : A2776(ii) The winner is : D6766(iii) The winner is : B6767(iv) The winner is : C3672
3. Define a class Taxpayer, whose class description is given below:-Private Members:-
int pan - to store the personal account no.
char name[20] - to store the name
float taxableinc - to store the total annual taxable income.
float tax - to store the tax that is calculated.
computetax ( )- A function to compute tax from the following rule:-
Total Annual Taxable Income Rate of Taxation
Up to 60000 0%
Greater than 60000, less than = 150000 5%
Above 150000, upto 500000 10%
Above 500000 15%
Public Members :-
inputdata ( ) - A function to enter the data and call the compute tax( ) function.
display( ) - To display the data.
4. Define a class Library in C++ with with the following specification`Private Members:
B_code of type integers
Description of type string
No_of_pages of type integer
Price of type integer
A member function calculate( ) to calculate and return the price as
(No_of_pages* Price)
Public Members
(i) A function Enter( ) to allow user to enter values for B_code, Description, No_of_pages & call function calculate( ) to calculate the price of the books.
(ii) A function Disp( ) to allow user to view the content of all the data members.
5. Define a class Travel in C++ with the following descriptions : Private Members :
TravelCode of type long
Place of type character array (string)
No_of_travellers of type integer
No_of_buses of type integer
Public Members :
A function NewTravel() which allows user to enter TravelCode, Place and
No_of_travellers. Also, assign the value of No_of_buses as per the following
conditions :
No_of_travellers No_of_buses
Less than 20 1
Equal to or more than 20 and less than 40 2
Equal to 40 or more than 40 3
A function ShowTravel( ) to display the content from all the data members on screen.
HOLIDAY HOME WORK FOR SUMMER VACATION FOR SESSION 2017-18
SUBJECT: - HISTORY CLASS: - XIID
1. Complete the Answers of Chapter no. 3 of First book of History.
2. Choose any one topic out of your History book for Project and make a Project on that as per CBSE Guidelines for AISSCE 2018.
3. Practice all the Map work as per CBSE Map list.4. Read all the Sources of all three books and made at least
four questions on it, frame answers also.
SUMMER VACATION HOMEWORK 2017-18
CLASS: XIISUBJECT : BIOLOGY
1. A working model based on 45th JNNSMEE by individual student.2. An investigatory project based on 25th NCSC 2017/ CBSE SYLLABUS. Themes
are as : a. Natural Resource Management b. Food and Agriculture
c. Energy d. Health, Hygiene & Nutrition e. Lifestyle and Livelihoodf. Disaster Management g. Traditional Knowledge System
3. Last five years AISSCE questions related To Unit- I.
Holiday Homework
INFORMATICS PRACTICES (065)
1.(a)Identify the topology - If the node is connected with the help of cable and a central switching controller.
(b)What is the importance of Unicode in IT
(c)How is Trojan horse harmful to a Computer network
(d)Define Shareware
(e)Write one advantage each of Star and Bus Topologies
(f)Differentiate between Switch & Hub(Active,Passive Hub)
(g)Expand CAPTCHA, GNU
2. (a) While creating a frame Mr Rohan included a listbox in it. Help him to enable the multiple selection property of list box
(b).What is the use of Default clause in a switch statement
(c)What will be the output of the following{ a=1;
do{ if(a>5) jTextArea1.setText(" " + a); else jTextArea1.setText(" " + a);
a+=2}while(a<10);
(g) Write statement to increase the value assigned to variable A by 5 and then to display the value.
3.(a) Which sql command is used to work with an existing database LIBRARY
(b) Ajay sharma created a relation “EMPLOYEE” in the database and and later he found that one columan named PRODUCTION to be removed from the relation, help him to write the code
(c)Which are the Wild card characters used along with LIKE in SQL
(d)Table1 contains 6 rows and 3 columns, Table2 contains 2 rows and 3columns how many columns and rows will be there in the Cartesian product of these two tables.
(e)Differentiate between foreign key and alternate key
(f) John wants to modify the table “Inventory” and he want to change the column name “ITM” instead of “INM”.Specify the command in MySQL.
(g) The NAME columnof the table “Employee” as shown below.
NAME
shyam
meera
lakshmi
athul
Based on the above the above information ,give output of the following sql query.
(i) SELECT NAME FROM EMPLOYEE ORDER BY NAME;
(ii) SELECT NAME FROM EMPLOYEE WHERE NAME LIKE '%r_’;
(a) What will be displayed in jTextField1 after executing the following code
int X=15;
X= X-X
if(X>15)
jTextFiled1.setText(Integer.toString(X)+ “ *** PROGRAMMING *** “ );
else
jTextFiled1.setText(Integer.toString(X+X) + “ * PROGRAMMING * “ );
(b)Rewrite the program using switch
if(ch= =1)
option=" ARMY";
else if(ch= =2)
option="NAVY";
else if(ch= =3)
option="AIR FORCE";
else
option=”Wrong choice”;
(c) How many times the following loop will get executed
for(int W=3, L=40; W<=L;W=W * 3)
jTextArea1.setText(jTextArea1.getText() + " "+W);
(d)What will be displayed in jTextArea1 after executing the following code
jTextArea1.setText("***\n***\tPreBoard\t***");
(e).The following code has some error(s). Rewrite the correct code underline all the
corrections made
int i=5,j=10;
while j>i
{
jTextField1.getText("j is greater");
j--,++i:
}
JOPTIONPane.showMessageDialog("Error Corrected");
(f)What will be the output of the following if Price value = "2500"
JOptionPane.showMessageDialog(null, " " + Price.length() +"3" + Integer.parseInt(Price));
(g). Write the necessary java codes to develop the following application
(i) When you select a type like Circle or Rectangle or Triangle, it should automatically hide the facilities which are not appropriate for selected option in Find panel and various text boxes
Displayed ( Write code for each option button)
(ii) Write the code for calculate button to calculate the desired operation which you choose from the panel for the selected type
5.b)In a relation book contains 16 rows and 5 columns. Mr John altered the table by adding 3 rows and 2 columns. What is the degree and cardinality of the table?
(c) Given the the following family relation FAMILY . Write SQl commands for Question(i) to (iv) and output for (v) to (vii).
FLCODE START DESTINATION NO_STOPS NO_FLIGHTSIC101 DELHI AGARTALA 1 5IC102 MUMBAI SIKKIM 1 3IC103 DELHI JAIPUR 0 7IC105 KANPUR CHENNAI 2 2IC107 MUMBAI KANPUR 0 4
IC431 INDORE CHENNAI 3 2IC121 DELHI AHMEDABAD 2 6
(i) Display details of all flights starting from Delhi. (ii) Display details of flights that have more than 4 number of flights operating.
(iii) Display flight codes, starting place, destination, number of flights in descending order of number of flights.
vi) Display destinations along with flight codes of all the destinations starting with ‘A’.
(v) SELECT MAX(NO_FLIGHTS) FROM FLIGHT;
(vi) SELECT DISTINCT(NO_STOPS) FROM FLIGHT;
(vii) SELECT START, COUNT(*),START FROM FLIGHT GROUP BY Start;
6.(a) Write Mysql command to create the Table Employee with the given constraints.
Table: EMPLOYEE
Column Name Data type Size Contraint
Ecode Varchar 5 Primary Key , NOT NULL
Ename Varchar 15 -
Desig Varchar 10 -
DOB Date - NOT NULL
(b)Consider the two tables given below
PRODUCT
Itemcode Itemname Price
111 Refrigerator 1500
22 TV 2500
333 Computer 3500
444 Refrigerator 1600
COMPANY
Brandcode Brandname
111 TOSHIBA
222 SAMSUNG
333 HCL
444 SAMSUNG
Answer the following
(i) Write a query to display Itemcode,Itemname and brandname of Brandcode>150
(ii) Write a query to display the Itemname, Price and Brandname of Refrigerators
(iii) Write a query to display Itemname(s) of the brand SAMSUNG
(c)(i) Which field can be used as the primary key in the above given PRODUCT table
(ii)Write a query to add a new column Serialnumber of Varchar with a size of 20 in
the table COMPANY
7.(b)Write about E - Governance, Give 2 E-Governance portals
(c)Maya Sen is working as a Software engineer in Sysco systems .She wants to create a form
with the following functions. Help her to choose suitable controls from Text Field, TextArea, Label, Option button, Check Box, Combo Box, Command Button
Sno Control Used To Suitable Control
1 Enter the Name, age, basic salary
2 choose hobbies
3 Select Nationality
4 Choose gender
Q Vipin wants to transfer data from one computer to another computer by using telephone cable.Tell him the device which he will use for this purpose.
Q What is the difference between Switch and Hub.
Q Write the name of the physical address which is assigned to each NIC by its manufacturer.
QSanya wants to connect her computer with the LAN but she is unable to connect it. Suggest her the device which she will fix in her computer so that she will be able to connect LAN cable with her computer.
Q Compare Freeware and Proprietary software.
QHow is Coaxial cable different from Optical Fiber?Q What are Denial of Services Attacks?
Q Yuvan has created a login form to input username and password. He wants $ sign to be
displayed instead of * in the password area. Which property of password component
should he change to do the same?
Q State the methods used to make Textfield 1)disable 2)uneditable?
Q Ram is not able to repeat a name in the NAME field of the STUDENT table. What is the constraint he has used to achieve this?
Q If a database “Library” exists, which MySql command helps you to start working in that database. Also write the command to display the tables in database.
Q Differentiate between DDL and DML commands.
Q What is the purpose of following SQL query?
SELECT COUNT(ENO) FROM ELECTION GROUP BY PARTY;
QA table Employee in a database has 4 columns and 2 rows in it. After adding 3 more rows in the table What is its cardinality and degree?
Q Find out is the error(s) in this MySQL query
SELECT * FROM ELECTION WHERE PLACE = NULL;
QThe ENAME column of the table “ELECTION” as shown below.
ENAME
GIRISH
AKSHAY
RAJESH
SHAKSHI
TARANG
Based on the above information give the output of the following SQL query.
a) SELECT ENAME FROM ELECTION ORDER BY ENAME;b) SELECT ENAME FROM ELECTION WHERE ENAME LIKE ‘%H’;
QThe Admission No. of a student is stored in a string variable strAdmno. Sugandha wants to store this admission no. in an Integer type variable intAdmno. What java statement should she write to do this?
Q What will be displayed in jTextField1 after executing the following statement:
String str = "" ;
for( int i = 1 ; i <= 5 ; i++ )
str = str + i ;
jTextField1.setText( str ) ;
Q What will be displayed in jTextField1 after executing the following statement:
jTextField1.setText( "Hello".subString( 2 ).length( ) + "" ) ;
Q How many times the following while loop get executed?what is the value of p after the execution?int p=5;int q=36;while(p<=q){ p+=6;}
QRewrite the following code using for loop:
int i = 1 ;
while( i < 5 )
{
System.out.println( "i = " + i ) ;
i++ ;
}
Q Following code has some error(s). Rewrite the correct code underlining all the corrections made:
int a = jTextField1.getText( ) ;
int b = 20 ;
{ a = a + b ;
b - = 5 ;
} while ( b >= 0 )
jTextField1.setText( a ) ;
Q The following GUI form is created in Netbeans for a Book Store where customers are
given discount as follows:
Book Type Discount %
Magazine 2%
General 3%
CBSE 4%
An additional discount of 2% is given if the total amount exceeds 1999.
i) What should be done so that only one of the radio button can be selected at a timeii) Write java code for Calculate Total button (calcTotalBTN) which calculates total amount from priceTF and qtyTF and
display the total value in totalTF.(total amount=price*qty)iii) Write java code for Calculate Discount % button (calcDiscPerBTN) which determines the discount percentage as per
the given criteria and display the discount percentage in the discPerTF textfield.iv) Write java code for Calculate Net Amount button (calcNetAmtBTN) which calculates the net amount by reducing the
discount amount from total and display the net amount in the netAmtTF textfield.QWrite the output of the following SQL statements :
(i) Select Round(23.7589,2);(ii) Select Concat(“amit”,”jain”) “FullName”;(iii) Select Dayofyear(‘2009-02-23’);(iv) Select mid(“Informatics Practices”,3,5);
Q Write the SQL commands for the i) to iv) and write the output of the v) on the basis of tableCLUB.
Table: CLUB
COACH_ID COACHNAME AGE SPORTS DATOFAPP PAY SEX
1 KUKREJA 35 KARATE 27/03/1996 10000 M
2 RAVINA 34 KARATE 20/01/1997 12000 F
3 KARAN 34 SQUASH 19/02/1998 20000 M
4 TARUN 33 BASKETBALL 01/01/1998 15000 M
5 ZUBIN 36 SWIMMING 12/01/1998 7500 M
6 KETAKI 36 SWIMMING 24/02/1998 8000 F
7 ANKITA 39 SQUASH 20/02/1998 22000 F
8 ZAREEN 37 KARATE 22/02/1998 11000 F
9 KUSH 41 SWIMMING 13/01/1998 9000 M
10 SHAILYA 37 BASKETBALL 19/02/1998 17000 M
(i) To show all information about the swimming coaches in the club.(ii) To list names of all coaches with their date of appointment (DATOFAPP) in descending order.(iii) To display a report, showing coachname, pay, age and bonus (15% of pay) for all the coaches.(iv) To count the number of coaches in each sports.(v) Give the output of following SQL statements:
(a) SELECT COUNT( DISTINCT SPORTS) FROM CLUB;(b) SELECT SUM(PAY) FROM CLUB WHERE DATOFAPP> ‘31/01/1998’;(c) SELECT LCASE(SPORTS) FROM CLUB;(d) SELECT AVG(AGE) FROM CLUB WHERE SEX= ‘F’;
Q Create table Employee as per following Table Instance Chart.
Column Name EmpID EmpName EmpAdd EmpPhone EmpSal DeptID
Key Type Primary
Null/Unique Not Null Unique
Data type Integer Char Char Integer Double Integer
Length 6 20 30 10 9,2 2
In a database there are two tables ‘Customer’ and Bill as shown below:
Table: Customer
CustID CustName CustAdd CustPhone
1 Akhilesh C4, JanakPuri, Delhi 9444428755
2 Purnima B1, AshokVihar, Delhi 8015825964
3 Sumedha 33, South Ext., Delhi 9043557672
Table: Bill
BillNo CustID BillAmt
1 2 12000
2 1 15000
3 2 13000
4 3 13000
5 2 14000
(i) How many rows and how many columns will be there in the Cartesian product of these two tables?(ii) Which column in the Bill table is the foreign key?
Q Write SQL Commands for the statement (i) to (iv) and give outputs for SQL queries (v) to (viii).
TABLE: SENDER
SenderID SenderName SenderAddress SenderCity
ND01 R Jain 2,ABC Appts New Delhi
MU02 H Sinha 12,Newtown Mumbai
MU15 SJha 27/A,Park Street Mumbai
ND50 T Prasad 122-K,SDA New Delhi
TABLE: RECIPIENT
(i) To display the names of all senders from Mumbai(ii) To display the RecID, SenderName, SenderAddress, RecName, RecAddress for every recipient(iii) To display Recipient details in ascending order of RecName(iv) To display recipients details from the cities kolkata and Mumbai(v) Select DISTINCT SenderCity From Sender;(vi) Select A.SenderName, B.RecName From Sender A, Recipent B where A.SenderID = B.SenderID AND
B.RecCity = ‘Mumbai’;(vii) Select RecName, RecAddress from Recipient where RecCity NOT IN(‘Mumbai’,’Kolkata’);(viii) Select RecID,RecName From Recipient where SenderID = ‘MU02’ OR SenderID = ‘ND50’;
Q Give Domain names of two most commonly used e-Commerce websites?
Q What are the social impacts of e-governance? Write any 2 positive and 2 negative impacts.
Q Vineeth developing one application for Sales Department. He want to create some controls on a form for the following functions. Choose appropriate controls from Text field, Text Area, Label, radio button, check box, list box, combo box, button, Option pane, dialog box, menu items.
S. No. Control used to Control
1. Select Customer name form list
2. Select type of sales (cash / credit)
3. Enter quantity and price
4. Calculation of total amount
RecID SenderID RecName RecAddress RecCity
KO05 ND01 R Bajpayee 5,Central Avenue Kolkata
ND08 MU02 S Mahajan 116,A Vihar New Delhi
MU19 ND01 H Singh 2A,Andheri East Mumbai
MU32 MU15 P K Swamy B5,C S.Terminus Mumbai
ND48 ND50 S Tripathi 13,B1 D,MayurVihar New Delhi
Top Related