CBSE Sample Papers for Class 12 Home Science Paper 1

CBSE Sample Papers for Class 12 Home Science Paper 1 are part of CBSE Sample Papers for class 12 Home Science. Here we have given
CBSE Sample Papers for Class 12 Home Science Paper 1.

CBSE Sample Papers for Class 12 Home Science Paper 1

BoardCBSE
ClassXII
SubjectHome Science
Sample Paper SetPaper 1
CategoryCBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme as prescribed by the CBSE is given here. Paper 1 of Solved CBSE Sample Papers for Class 12 Home Science is given below with free PDF download solutions.

Time: 3 Hours
Maximum Marks: 70

General Instructions

There are total 25 questions. All questions are compulsory.

  • Question nos  1-6 are of 1 mark, to be answered in one or two lines.
  • Question nos 7-13 are of 2 marks, to be answered in 10-20 words.
  • Question nos 14-15 case study and picture based are of 3 marks.
  • Question nos 16-21 are of 4 marks, to be answered in 40 words.
  • Question nos 22-25 are of 5 marks, to be answered in 50-60 words.

Questions.

Question 1.
Define immunization.

Question 2.
Sonu and Rinku are siblings. Sonu is a normal child while Rinku is mentally retarded. How do they differ?

Question 3.
These days selection of clothes has become a big problem. Give reason behind it.

Question 4.
Shreya is very particular about her eating habits. She observed that in winters she is eating more than her normal diet. What can be the reason behind this?

Question 5.
The lifestyle led by a man also influences his meal planning in a positive or negative way. What are the factors of lifestyle that affect meal planning?

Question 6.
Siddhartha is not a member of any group. State any one disadvantage he will suffer from.

Question 7.
Rahul is suffering from diarrhea. What things are to be kept in mind while you planning a meal for him?

Question 8.
Within 15 days of getting your juicer-mixer repaired, it stopped working. State the two ways to deal with this problem.

Question 9.
Mention a list of rights that are given to the consumer.

Question 10.
Why do school-going children require more liquid?

Question 11.
While taking tea, Rahul spilled it on his cotton shirt and it left a stain on the shirt. Suggest him two ways to remove this stain.

Question 12.
People suffering from jaundice need to be very careful about their diet. Give any two dietary points they should adopt.

Question 13.
Why would Mrs Verma prefer to leave her 2 years old child with her mother-in-law at home and not in a creche? Give two reasons.

Question 14.
Ankita is a college-going girl. Her father runs a tea stall and her family income is not high. She wants to support her family. Suggest three ways to Ankita for supplementing her family income.

Question 15.
The figure given below is the logo of FPO. What does it stand for and write the year in which rt came into force?

CBSE Sample Papers for Class 12 Home Science Paper 1 1

Question 16.
Mother of 3 years old Saksham is worried due to his jealous behavior. What could be the two possible causes of this jealousy and state four ways in which he may express his feeling?

Question 17.
What eight ways can a college-going student adopt to help himself in supplementing his real income?

Question 18.
“Money is one of the deciding factors in the selection of clothes.” Justify the statement.

Question 19.
Naresh is a labourer who does hard physical labour for about 12 hours a day. Enumerate four factors that his wife must keep in mind while preparing his lunch.(

Question 20.
What is the difference between Growth and Development?

Question 21.
Give the concept of psychic income. On which factor does it depend?

Question 22.
Rehman cannot walk hence is on wheel chair. He is studying in a regular school. In what five ways can teacher help him to meet his emotional needs?

Question 23.
Though there are many good dress designers in the posh vicinity of South Delhi where Shambhavi lives, yet she prefers to buy only readymade garments. What are the reasons that prompt her to buy readymade garments?

Question 24.
Namrata is a graduate in Home Science and is very enthusiastic about applying her Home Science lessons in practical life. Suggest some ways in which she can make use of her Home Science knowledge in everyday life.

Question 25.
Why consumers encounter problems while making purchases and also mention various problems faced by them?

Answers.

Answer 1.
The process of developing immune bodies or anti-bodies in an individual by injecting artificially controlled number of germs into the body is called immunisation.

Answer 2.
The difference between them is that Rinku being mentally retarded child is one whose mental capabilities are not developed like his brother Sonu who is a normal child.

Answer 3.
Selection of clothes has become a big problem these days because new inventions and developments are taking place in the field of textiles.

Answer 4.
She is eating more in winters than in normal times because one needs more energy in winters to maintain body temperature.

Answer 5.
The factors of lifestyle include profession, personal activities, income and physical status. These factors influence both the content and composition of nutrients in meal planning.

Answer 6.
Siddhartha will not be able to learn social skills which he would have learnt being in group such as leadership and team working.

Answer 7.
I will considered about the following points :

  • Small amount of food should be given to him at a regular intervals.
  • Avoid use of extremely hot, cold, fried and spicy foods.
  • More liquid would be given.

Answer 8.
Two ways to deal with this problem are

  1. If the shopkeeper has given any guarantee period, then we can give the juicer-mixer to the shopkeeper for repairing again.
  2. We can approach district forum, state commission or national commission for redcessal of consumer grievances against sale of defective goods or deficient services or adoption of unfair or restrictive trade practices.

Answer 9.
Rights of Consumer are defined as Right to Be Heard, Right to Information, Right to Safety, Right to Choose, Right of Compensation, Right to Consumer Education and Right to Information Act.

Answer 10.
School-going children require more liquid because they engage in more physical activities which causes more perspiration and results in the loss of water and minerals.

Answer 11.
Rahul should follow these methods

  • He should first soak the shirt in glycerine and then wash.
  • He should rub washing soda and suhaga on the stain and then wash it with hot water.

Answer 12.
People suffering from jaundice should adopt following diet

  • They should avoid fried and fatty food including meat, tea, coffee and pickles.
  • They should include raw vegetable salad, steamed vegetables, fresh fruits, coconut water or sugarcane juice in their diet.

Answer 13.
There are two reasons behind leaving a child with her grandmother which are mentioned below

  1. The grandmother will be able to teach the child family values such as affection, care and respect for elders.
  2. It is economical as it saves the money spent on a creche.

Answer 14.
Ankita can supplement her family income in the following ways

  • She can take tuitions.
  • She can do part time work in a shop or company.
  • She can work in fast food joints on holidays or in the evening.

Answer 15.
FPO stands for Food Products order. This mark is a certification mark which is mandatory on all processed fruit products sold in India. It is effective since 1955, but became mandatory in 2006.
FPO Mark is given to pickles, jams, jellies, fruit juices, ketchups, frozen and canned foods. It also gives instructions for packaging, labeling and temperatures of food containers.

Answer 16.
A 3 years old child may feel jealous due to the following two reasons

  • Arrival of New Born When a younger brother or sister is born, mother gives more attention to the new born baby. It develops a feeling of jealousy in the child.
  • Feeling Neglected When mother is working and she cannot devote much time to her child, the child feels neglected and develops the feeling of jealousy.

The child may express his/her emotions in the following ways

  1. The child tries to hurt the new born baby.
  2. He may start sucking his thumb.
  3. He does not listen to his parents.
  4. He tries to get attention of his parents.

Answer 17.
A college-going student can adopt the following ways to help himself in supplementing his real income.

  • He can use library books instead of buying books.
  • He can share transport with others.
  • He can help in domestic chores instead of hiring servants.
  • He can grow vegetables in pots and kitchen garden.
  • He can share rental accommodation.
  • He can do part time job or take tuitions.
  • He can apply for some scholarship to meet his educational expenses.
  • He can cut down on any wasteful or unnecessary expenditure.

Answer 18.
The statement that “money is the deciding factor in the selection of clothes” can be justified in the following points

  1. Before purchasing clothes, priority should be given to the requirement and the income. Type of fabric, type of weave, exclusive designing, handwork, the finishes are some of the factors which affect the cost of clothes.
  2. The prices of clothes should be checked at various shops before purchasing in order to know the right cost of the clothes.
  3. It is also important to know whether the price is according to the printed price or not. If we buy clothes without any requirement, it leads to wastage of money, time and energy. Shopping in haste also causes the same problem.
  4. Generally, it is said that expensive clothes are of best quality, it may be true to some extent because they are durable and retain their attraction for a long time. But judicious purchase of less expensive clothes may also serve the same purpose.

Answer 19.
Balanced lunch for a labourer

Menu

Measurement

Ingredients

Bajra ki Roti

5-6Bajra Aatta

Vegetable

1 bowl

Potato, Carrot, Spices, Onion, Oil

Gur, Lassia bit, 1 glass

Gur, Curd

Four factors to be considered while planning his lunch are as follows

  1. Meal should include food items from all food groups.
  2. Seasonal vegetables should be selected as they are cheaper and nutritious.
  3. High calorie diet should be given as they need more energy to do work.
  4. Cheap proteins like soyabean should be included in their diet.

Answer 20.
Growth Refers to a positive change in size over a period of time.
Development It is the act or process of growing to maturity and more advanced over a period of time.

Growth

Development

(i)  Growth is quantitative.(ii) Development is quantitative as well as qualitative.
(ii) It comprises of height, weight, size and shape of body organs like brain etc(i)  In this, with the physical changes cognitive, social and emotional changes are included.
(iii) It occurs due to cell division.(iv) It happens due to motor and adjustmental processes and their interplay.
(v) Growth can be measured.(iv) it can be observed by matured behaviour

Answer 21.

  • Psychic Income It s that flow of satisfaction that arises out of everyday experiences, derived largely from use of money and real  income. Unlike money and real income, it’s intangible. As its name signifies, it cannot be measured in monetary terms as the mental satisfaction it brings is an abstract idea. It can be described as subjective and is the most important income in terms of quality of living.
  • Factors Affecting Psychic Income It depends on the way the members of a family use their skills in order to utilise their money and commodities judiciously. Irrespective of income, one gets satisfaction from the way the money is spent.

Answer 22.
A polio-affected child requires extensive care and special attention.
A teacher can help him to meet his emotional needs in the following ways

  1. He needs love, sympathy and security, so the teacher should treat him with same behaviour as of others.
  2. Make atmosphere congenial for him so that he has the opportunity to develop himself.
  3. He should be trained with some special skills so that he becomes confident, independent and do not develop an inferiority complex.
  4. He should be included in group activity. It will make him socially adaptable.
  5. The classes for polio students should be organised on ground floor so that they do not have to walk up and down stairs.

Answer 23.
Most of the people are more inclined to buy readymade garments due to the following reasons:

  1. Life is busy with more and more people taking up outside employment. Families resort to purchase readymade clothing due to short of time.
  2. Very often, the lack of stitching time, designing, styling skills make the individual purchase readymade garments.
  3. Readymade clothes are available in such a wide range of prices and quality, that they are preferred by all the classes.
  4. Consumer prefers readymade garments as these are easy to wear, wash and maintain.
  5. Readymade clothes can be tried for fitting before purchasing. One can select a dress of suitable design and colour out 6f many available.

Answer 24.
Home Science knowledge helps in everyday life in the following manner

  1. A person with Home Science knowledge can manage house very well and can be an efficient home maker.
  2. Home Science skills enable a person to decorate his/her house in an aesthetic manner.
  3. Home Science knowledge can be applied in making nutritious and appetising meals and snacks for family.
  4. It enables a person to maintain a record of family income and expenditure.
  5. Home Science knowledge can also be applied in providing nursing and first-aid at home.
  6. It helps a person to become conscious and alert consumer, and thus prevents him from various malpractices of the shopkeepers.
  7. A consumer also becomes aware of his rights to seek redressal in case of dissatisfaction.
  8. It can prove quite beneficial in the upbringing of children as it teaches about the physical, mental, social and emotional development of children.
  9. It guides in proper selection and maintenance of clothes.
  10. The knowledge of Home Science also helps in managing and using time, energy, skills and interest in right direction.

Answer 25.
We can purchase items of daily use from different places like a shop, footpath seller, super bazar, wholesale dealer or from central stores. Normally, consumer does not have the proper information about the market. He does not know how many new products are available in the market and from where he can get cheap and good quality products. In this manner, the seller earns more profit but the consumer does not get maximum satisfaction despite spending money. Therefore, the consumers face number of problems while making purchases.
Some major problems faced by the consumers are as under:

  • Variation in Prices The consumer has to pay different prices for the same item at different places. Big shops are often expensive as they spend some money on the maintenance of shop,
    advertisements and free home delivery which is hidden in the expenses of the consumers.
  • Non availability of Items in the Market Sometimes daily-consumed items like butter, potatoes, onions, rice etc are not easily available in the market, then one has to pay higher price in order to get these things.
  • Adulteration Adulteration of goods is one such problem which is faced by the consumers in day-to-day purchases. In present times, the biggest problem of adulteration is found in products like ghee, milk, spices, maida, besan etc even if they are proposed to pay higher price.
  • Unfair Means of Measurement Incorrect measurement is another problem faced by the consumers in addition to adulteration. Often standard weights and measurements are not used in market.

We hope the CBSE Sample Papers for Class 12 Home Science Paper 1 help you. If you have any query regarding CBSE Sample Papers for Class 12 Home Science Paper 1, drop a comment below and we will get back to you at the earliest.

CBSE Sample Papers for Class 12 Informatics Practices Paper 3

CBSE Sample Papers for Class 12 Informatics Practices Paper 3 are part of CBSE Sample Papers for Class 12 Informatics Practices. Here we have given CBSE Sample Papers for Class 12 Informatics Practices Paper 3.

CBSE Sample Papers for Class 12 Informatics Practices Paper 3

BoardCBSE
ClassXII
SubjectInformatics Practices
Sample Paper SetPaper 3
CategoryCBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme, as prescribed by the CBSE, is given here. Paper 3 of Solved CBSE Sample Paper for Class 12 Informatics Practices is given below with free PDF download solutions.

Time : 3 hrs
Maximum Marks : 70

General Instructions

  • All questions are compulsory.
  • Answer the questions after carefully reading the text.

QUESTIONS

Question 1.
(a) Name any two transmission medium for networking.
(b) How would you extract Manufacturer_Id and Card_No from a MAC address?
(c) What is the geological scope of LAN, MAN, and WAN?
(d) In how many ways can you type Indian scripts on a computer?
(e) Identify the type of topology from the following:
(i) In it, each node is connected with the help of a single coaxial cable.
(ii) In it, each node is connected with the help of independent cable and central switching (communication controller) node.
(f) Which of the following are open standards and which are proprietary standards?
(i) OGG
(ii) WMA
(iii) DOC
(iv) JPEG
(g) Repeaters are used over long network lines. Explain.

Question 2.
(a) Samarth created a program. He wants that variables used in the class can only be accessed by class’s subclass and not by unrelated classes. Help him by providing the solution.
(b) Write the output in jTextFieldl if stucode is 70.

switch(stucode)
{ 
case 30 :
Mark = 80;
break ; 
case 50 :
Mark = 40 ;
break ;
default :
Mark = 10 ;
}
j TextFieldl.set Text ("'+Mark) ;

(c) (i) Identify the error(s) in the following HTML code. Also, write the correct code.

<BODY color="yellow" text="white">

(ii) Consider the following XML document. Check this for well-formedness.

<name>Sahil</name>
<name>Dishu</name>

(d) What will be the content of the jTextAreal after executing the following code (assuming that the j TextAreal had no content before executing this code)?

for (int i=1;i<=4; i++)
{
j TextAreal.setText ( j TextAreal.getText ()+" "
+Integer. toString (i  + i )) ;
}

(e) (i) Rewrite the following code using SWITCH statement :

if (test = = 1)
System.out.println("Hello") ;
else if(test==2)
System.out.println("Hi i") ; 
else if(test= =3)
System.out.print1n("Good") ; 
else 
System.out.println("No Match Found") ;

(ii) Write a method in Java that takes two numbers as input from two text fields and display which is greater in another text field.

Question 3.
(a) A table named OFFICE has 6 rows and 10 columns and another table named STAFF has 3 rows and 5 columns. How many rows and columns will be there if we obtain the Cartesian product of these two tables?
(b) Give one difference between CEIL ( ) and FLOOR ( ) functions.
(c) Explain the use of UNIQUE constraint. How is it different from primary key constraint?
(d) Consider the table ‘COMPANY’.
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 1
(e) (i) Aryan a student of class XII created a table ANNUAL. Grade is one of the column of this table. To find the details of students whose grades have not been entered, he wrote the following MySQL query, which did not give the desired result

SELECT * FROM ANNUAL WHERE GRADE = "NULL"

Help Aryan to run the query by removing the errors from the query and write the correct query.
(ii) Given below is the ‘STUDENT table:
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 2

SET AUTOCOMMI T = 0 ;
INSERT INTO STUDENT VALUES (104,'Yash') ;
COMMIT:
INSERT INTO STUDENT VALUES (106,'Muskan') ;
SAVEPOINT A :
UPDATE STUDENT SET Name = 'Sahil' WHERE SId=102 ;
SAVEPOINT B ;
What will be the output of the following SQL query now?
SELECT * FROM STUDENT ;

Question 4.
(a) Sahil created a program using switch case. He used the data type double for selection variable. Is it correct to define selection variable as double? Give reason.
(b) (i) Consider the following code and given output:

String s1 = new String ("Aryan") ;
String s2 = new String ("Aryan") ; 
if (s1.equals (s2)) .
System.out.println ("si is equal to s2"); 
if (s1 == s2)
System.out.println ("s1 is equal to s2");

(ii) Find out tbe error (s) in the following code fragment:

interface Student 
{
public void method ( ) ;
}
public class extends Student
{
public void method ( ) :
}

(c) (i) “The variable/expression in the switch statement should either evaluate to an integer value or string value”. State Thie or False.
(ii) Write statement to increase the value assigned to variable K by 2 and then to display the value.
(iii) What will be displayed in jTextAreal after the execution of the following loop? Also, write that how many times this loop will be execute?

for (int K=4; K<=20; K+=4) 
j TextAreal . setText (j TextAreal.getText ( )+" "
+ Integer . to String (2 * K)) ;

(d) Ronit Roy is a programmer at LINC Enterprises. He created the following GUI in NetBeans. Help him to write code for the following:
(i) To display series of odd or even numbers (depending on starting number- j TextField 1 is even or odd) in the j TextArea 1 on click of command button [Display The Series].
e.g. If the start number is 5 and last number is 11.
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 5

Then, TextArea content will be 5 7 9 11. If the start number is 2 and last number is 10. Then, Text Area content will be 2 46 8 10.
(ii) To clear both the text fields and text area, on clicking [Reset] button.
(iii) To terminate the application on the click of [Stop] button.

Question 5.
(a) By using which clause, you can specify a condition to specify the values that you want to view in a particular range?
(b) Table FURNITURE has 7 rows and 10 columns. What is the cardinality and degree of this table?
(c) Explain the following functions and give output of each of the statement.

(i) SELECT INSTR('Computer', ’ P') ; 
(ii) SELECT RIGHT( 'Computer'. 3) ;

(iii) How is left join different from a natural join?

(d) Table “BOOK” is shown below. Write commands in SQL for (i) and (ii) and output for (iii) and (iv)
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 6

(i) Display the Book name, price and page of ‘BOOK table whose author name is Priyanka.
(ii) Display the Book_id and Author_Name of Book whose price above 150.

(iii) SELECT C0UNT(*), Price FROM BOOK WHERE Price = 350 ;
(iv) SELECT SUM(Price) FROM BOOK WHERE Page<200 ;

Question 6.
(a) (i) Create table CUSTOMER as per following Table structure :
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 10
(ii) Consider the following tables PRODUCT and CLIENT :
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 11

I. Which column is used to relate the two tables?
II. Is it possible to have a primary key and a foreign key both in one table? Justify your answer with the help of tables given above.

(b) With reference given to the above tables in Q 6 (a) (ii), write SQL commands for the statements (i) and (ii) and give output for SQL query (iii).
(i) To display the details of products whose Price is in range of 50 to 100 (both values included).
(ii) To display the ClientName, City from table CLIENT and ProductName, Price from table PRODUCT with their corresponding matching P_ID.

(iii) SELECT Manufacturer, MAX(Price), MIN (Price), C0UNT ( * )
FROM PRODUCT GROUP BY Manufacturer ;

Question 7.
(a) How is E-Commerce beneficial to businessmen? Write one point.
(b) What issues are still to be worked out for E-Governance to meet all its objectives?
(c) Ridhi is creating a form for registration of annual function. Help her to choose most appropriate controls out of ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox and CommandButton for the following entries :
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 13

ANSWERS

Answer 1.
(a) Two transmission medium for networking are as follows :
(i) Co-axial cable
(ii) Radiowave

(b) The first three bytes of a MAC address represent Manufacturer Jd and the last three bytes of a MAC address represent Card_No.

(c) LAN is confined to relatively small areas such as a building or a group of buildings.
WAN spans a large area, possibly several continents. MAN is between LAN and WAN,
i.e. spanning a small city or town.

(d) Indian scripts can be entered in two different ways which are as follows:
(i) Using phonetic text entry
(ii) Using keymap based text entry

(e) (i) Bus topology (ii) Star topology

(f) Open Standards (i) OGG and (iv) JPEG
Proprietary Standards (ii) WMA and (iii) DOC

(g) When the transmitted data has to travel over a long distance, the signals start degrading after a certain distance. If the signals degrade too much, the data will be lost and it will fail to reach the destination. Therefore, repeaters are used. Repeater is a device that is used to replicate and amplify a signal over long distance transmission.

Answer 2.
(a) He should declare those variables.as protected in the superclass. Since, by declaring the variables as protected they can only be accessed by the subclasses of that class.

(b) j TextFieldl will contain 10.

(c) (i) color is not an attribute of <BODY> tag. To specify background color of the Web page, we use bgcolor attribute of the <BODY> tag. Correct code is:

<BODY bgcolor = "yellow" text = "white">

(ii) Given XML document is not well-formed, because it has a number of root elements. Whereas an XML document must have only one root element.
(d) j TextArea1 will contain 2 4 6 8
(e)

(i) switch(test)
{
case 1:
System.out.println("Hello") ; 
break ;
case 2 :
System.out.println("Hii");
break ; 
case 3 :
System.out.println("Good"); 
break ; 
default :
System.out.println ("No Match Found") ;
}


(ii) public void findGreater ()
{ 
int a = Integer . parselnt ( jTextField1 . get Text () ) ; 
int b = Integer . parselnt ( jTextField2 . getText () ) ; 
if (a > b)
j TextField3 . setText ("a is greater") ; 
else
jTextField3 . setText ("b is greater") ;
}

Answer 3.
(a) Number of rows = 6 × 3 = 18 and number of columns = 10 + 5 = 15
If we obtain Cartesian product of these two tables, we would get 18 rows and 15 columns.
(b) CEIL ( ) function returns the smallest integer value that is not less than passed numeric expression, while FLOOR ( ) function returns the largest integer value that is not greater than passed numeric expression, e.g.
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 3
(c) The UNIQUE constraint on a column ensures that all values in a column are distinct, i.e. no two tuples/rows can have same value in that particular column. A column having UNIQUE constraint can have NULL (until explicitly mentioned as NOT NULL), whereas column having a PRIMARY KEY constraint, implicitly means that the field is required to be UNIQUE and NOT NULL

(d) SELECT DISTINCT C_City. SUM (Price) FROM COMPANY GROUP BY C_City ;

(e) (i) The correct query is :

SELECT * FROM ANNUAL WHERE GRADE IS NULL ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 3 4

Answer 4.
(a) No, he cannot use double datatype as selection variable in switch as it is not good for exact comparisons. Generally, int, short, byte, or char are only used as selection variable in switch.

(b) (i) Here, only first, System.out.println will work because equals method compares the content of string object, where = = operator compares reference of string object. So output will be: s1 is equal to s2.
(ii) I. A class cannot extend an interface. It should only implement.
II. Definition of method should be given in class or it should be declared as abstract.

(c) (i) True

(ii) int K ;
K = K + 2 ;
System.out.println(K) ;

(iii) Output
j TextAreal will display = 8 16 24 32 40
Loop will be 5 times execute.

(d) (i) We have to double click at the Display The Series button (jButton 1) and type the following code:

int start = Integer . parselnt ( jTextFieldl.getText( ) ); 
int last = Integer.parselnt ( jTextField2.getText( ) ); 
for( int i=start; i<=last; i=i+2)
{
jTextAreal.append(" " + i):
}

(ii) We have to double click at the Reset button (jButton2) and type the following code :

jTextFieldl.setText (" ") ; 
jTextField2.setText(" ") ; 
jTextAreal.setText(" ") ;

(iii) We have to double click at the Stop button (jButton3) and type the following code :
System. exit (0) ;

Answer 5.
(a) BETWEEN clause.
(b) Cardinality = number of rows = 7
Degree = number of columns = 10

(c) (i) lNSTR (str,substr) function is used to return position of first occurrence of substr in str.

SELECT INSTR ('Computer'. 'p') ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 3 7

(ii) RIGHT (str, len) function returns the specified Ten’ number of characters from the right of the string ‘str’.

SELECT RIGHT ('Computer' ,3) ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 3 8

(iii) Left join is a form of join where all the rows(even non-matching ones) from the first table are returned in the result.
Whereas in natural join, the result consists of only the matched rows.

(d)

(i) SELECT BName, Price, Page FROM BOOK
WHERE Author_Name = 'Priyanka' :
(ii) SELECT B00K_id, Author_Name FROM BOOK WHERE Price >150 ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 3 9

Answer 6.
(a)

(i) CREATE TABLE CUSTOMER
(
CId INTEGER PRIMARY KEY,
CName VARCHARC30) NOT NULL,
CAddress VARCHAR (20),
Pincode INTEGER,
Contact_No VARCHAR(10)
) ;
(i) I. P_ID

II. Yes, it is possible to have primary key and foreign key columns in one table.
Primary key column is used to uniquely identify each record of the table while foreign key column is used to maintain referential integrity.

As in the given table CLIENT, C_lD column is a primary key while P_lD may act as a foreign key.

(b) (i) SELECT * FROM PRODUCT WHERE Price BETWEEN 50 AND 100 ;
(ii) SELECT CLIENT. ClientName, CLIENT.City, PRODUCT. ProductName, 
PRODUCT.Price FROM CLIENT, PRODUCT 
WHERE CLIENT.P_ID = PRODUCT.P_ID ;
CBSE Sample Papers for Class 12 Informatics Practices Paper 3 12

Answer 7.
(a) E-Commerce advantage is acquisition of new customers and increased sales.

(b) The following issues need to be worked out in order to make E-Governance meet all its objectives:

  1. All the services of Government offices should be made available through online portals.
  2. Awareness programs should be conducted to make people aware about the availability of the services available online.
  3. Efforts should be made to remove E-literacy.
  4. The available technology in terms of hardware, software and broadband services should be made within reach of all the people.

CBSE Sample Papers for Class 12 Informatics Practices Paper 3 14

We hope the CBSE Sample Papers for Class 12 Informatics Practices Paper 3 help you. If you have any query regarding CBSE Sample Papers for Class 12 Informatics Practices Paper 3, drop a comment below and we will get back to you at the earliest.

CBSE Sample Papers for Class 12 Computer Science Paper 5

CBSE Sample Papers for Class 12 Computer Science Paper 5 are part of CBSE Sample Papers for Class 12 Computer Science. Here we have given CBSE Sample Papers for Class 12 Computer Science Paper 5.

CBSE Sample Papers for Class 12 Computer Science Paper 5

BoardCBSE
ClassXII
SubjectComputer Science
Sample Paper SetPaper 5
CategoryCBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme, as prescribed by the CBSE, is given here. Paper 5 of Solved CBSE Sample Paper for Class 12 Computer Science is given below with free PDF download Answers.

Time: 3 Hours
Maximum Marks: 70

General Instructions:

  • All questions are compulsory within each Section.
  • Programming Language in SECTION A : C++.
  • Answer the questions after carefully reading the text.

SECTION A

Question 1.
(a) Find out the reserved keywords which are commonly used in C++ out of the following:
char, Void, virtual, NEW, struct, Throw, auto, iF
(b) Which C++ header file(s) are essentially required to be included to run/execute the following C++ source code?

void main()
{
char Txt[50];
strcpy(Txt, "COMPUTER");
cout<<Text;
}

(c) Rewrite the following program after removing the syntax error(s), if any. Underline each correction.
Note: Assume all required header files are already being included in the program.

void main()
{
One = 10, Two = 20;
func(0ne;Two);
func(Two);
}
void func(int x, int y = 20)
x = x+y;
cout<>y;
}

(d) Find and write the output of the following C++ program code:
Note: Assume all required header files are already being included in the program.

#include<iostream.h>
struct Company
{
int Salary,Bonus;
};
void Work(Company &C, int N=10)
{
C.Salary++;
C. Bonus += N;
}
void main()
{
Company C = {100, 25};
Work(C, 15);
cout<<C.Salary<<":"<<C.Bonus<<endl;
Work(C);
cout<<C.Salary<<":"<<C.Bonus< Work(C,20);
cout<<C.Salary<<":"<<C.Bonus<<endl:
}

(e) Write the output of the following program:
Note: Assume all required header files are already being included in the program.

class Inc
{
private:
unsigned int count:
public:
Inc()
{
count = 0;
}
void inc_count()
{
count++;
}
int get_count()
{
return count;
}
};
void main()
{
Inc C1, C2;
cout<<"\tC1 = "<<C1.get_count():
cout<<"\tC2 = "<<C2.get_count();
C1.inc_count();
C2.inc_count():
cout<<"\tC1 = "<<C1.get_count():
cout<<"\tC2 = "<<C2.get_count();
}

(f) In the following program, find the correct possible output(s) from the options (i) to (iv) following it. Also, write the maximum and minimum values that can be assigned to variable ‘ToGo’.
Note: Assume all required header files are already being included in the program.
random(n) function generates an integer between 0 to n-1

void main()
{
randomize();
char Name[][10] = {"Naksh","Saurish","Eashita", "Varun"};
int ToGo;
for(int I=0; I<3; I++)
ToGo = random(2)+1;
cout<<Name[ToGo]<<":";
}
}

Outputs
(i) Saurish: Eashita: Saurish:
(ii) Naksh: Saurish: Eashita:
(iii) Saurish: Eashita: Varun:
(iv) Saurish: Eashita: Eashita:

Question 2.
(a) Differentiate between a data type struct and a data type class in C++.
(b) Observe the following C++ code, answer the questions (i) and (ii).
Note: Assume all necessary header files are included.

class TestMeOut
{
public:
~TestMeOut() //Function1
{
cout<<"Leaving the examination hall”<<endl;
}
TestMeOut() //Function2
{
cout<<"Appearing for examination''< 
}
void MyWork() //Function3
{
cout<<"Attempting Questions"<<endl;
}
};

(i) In Object Oriented Programming, what is Functiona1 referred to as and when does it get invoked/called?
(ii) In Object Oriented Programming, what is Function2 referred as and when does it get invoked/called?
(c) Define a class Taxi in C++ with the following description:
Private members

  • A data member Taxino of type integer
  • A data member Taxiname of type string
  • A data member Destination of type string
  • A data member Distance of type float
  • A data member Fuel of type float
  • A member function CALC() to calculate the value of fuel as per the following criteria:

CBSE Sample Papers for Class 12 Computer Science Paper 5 1
Public members

  • A function INPUT() to allow the user to enter values for Taxino, Taxiname, Destination, Distance and call function CALC() to calculate the quantity of Fuel.
  • A function SHOW() to allow the user to view the content of all the data members.

(d) Answer the questions (i) to (iv) based on the following code:

class Cars
{
char DCode[5];
protected:
float Price:
void CalcPrice(float);
public:
Cars():
void CInput();
void CShow();
};
class Jeep:public Cars
{
char JName[20];
float Weight;
public:
Jeep();
void JInput();
void JShow();
};
class ElectronicCars:public Cars
{
char ECName[20];
char BatteryType[10];
int Batteries;
public:
ElectronicCars();
void ECInput();
void ECShow();
}

(i) Which type of inheritance out of the following is illustrated in the above example?
I. Single Level Inheritance
II. Multi-Level Inheritance
III. Multiple Inheritance
IV Hierarchical Inheritance
(ii) How many bytes will be required by an object of the class ElectronicCars?
(iii) Write the names of all the data members, which are directly accessible from member functions of the class Jeep.
(iv) Write the names of all member functions, which are directly accessible by an object of the class ElectronicCars.

Question 3.
(a) Write a function void Merge(int A[ ], int B[ ], int C[ ], int n) in C++, which combines the contents of two equi-sized arrays A and B by computing their corresponding elements with the formula 2 * A[i] + 3 * B[i], where value i varies from 0 to n-1 and transfers the resulting content in the third same sized array namely C.
CBSE Sample Papers for Class 12 Computer Science Paper 5 2
(b) An array VAL([1…20] [1…15]) is stored along the row in the memory with each element requiring 4 bytes of storage. If the base address of array VAL is 1500, determine the location of VAL[10] [9], when the array VAL is stored.
(c) Write a function in C++ to print the sum of all the values, which are either divisible by 4 or are divisible by 5 present in a two dimensional array passed as the argument to the function.
e.g. If the array contains:
5 4 3
6 7 8
10 2 9
Output will be
The sum is: 27
(d) Convert the following infix expression to its equivalent postfix expression showing stack contents for the conversion
(P + Q * (R – S)/T)
(e) Write a function in C++ to perform push operation on a dynamically allocated stack containing real numbers. Consider the following definition
of node in the code:

struct Node
{
float info;
Node * Next;
};
class Stack
{
Node * Top;
public:
stack(); {Top=Null;}
void Push();
void Pop();
~Stack();
};

Question 4.
(a) Find the output of the following C++ code considering that the binary file “s1data.dat” exists on the hard disk with records of 500 members.

class Subject
{
int sid;
char Name[20];
public:
void Enter();
void Result();
};
void main()
{
fstream f;
f.open("sIdata.dat", ios::binary | ios::in);
Subject S;
int c=0;
while(c<=2)
{
f.read((char*)&S.sizeof(S));
C++;
int POS=f.tellg()/sizeof(S);
cout<<"\nPresent Record:"<<POS<<endl; 
f.close(); 
}

(b) Write a function in C++ to count and display the number of lines that are not starting with alphabets ‘c’ or ‘C’ present in a text file “COM.TXT’. e.g. If the file “COM. TXT” contains the following lines: Computer is must I like computer Students are sitting Come and use computer Characters are not allowed in the password The function should display the output as 2.
(c) Write a function in C++ to add new objects at the bottom of & binary file “COLLEGE.DAT”, assuming the binary file is containing the objects of the following class:

class COLLEGE 
{ 
int Regno: 
char Name[20]; 
public: 
void Input() 
{ 
cin>>Regno;
gets(Name);
}
void Show()
{
cout<<Regno<<Name< 
}
};

SECTION B

Question 5.
(a) Observe the following table CLASS and answer the following questions which are asked:
CBSE Sample Papers for Class 12 Computer Science Paper 5 3
(i) Write the most appropriate primary key for the above table and justify your answer.
(ii) What is the degree and the cardinality of the above table?
(b) Consider the following CLUB and COACHES tables. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii).
CBSE Sample Papers for Class 12 Computer Science Paper 5 4
To show all information about the swimming coaches in the CLUB.
(ii) To list names of all coaches with their date of appointment (DateofApp) in descending order.
(iii) To display a report showing CoachName, Pay, Age and bonus (15% of pay) for all the coaches.
(iv) To display the CoachName, SportsPerson from table CLUB and COACHES with their nfatching CoachID.
(v) SELECT COUNT(DISTINCT Sports) FROM CLUB;
(vi) SELECT MIN(Age) FROM CLUB WHERE Sex = ‘F’;
(vii) SELECT A.CoachID, A.CoachName, B.SportsPerson FROM CLUB A, COACHES B
WHERE A.CoachID = B.CoachID AND SportsPerson =’VINOD’;
(viii) SELECT CoachName, Age, Sports, SportsPerson, Pay FROM CLUB, COACHES WHERE CLUB.CoachID = COACHES.CoachID AND Pay>1000;

Question 6.
(a) Prove algebraically X.Y + \(\bar { X }\).Z + Y.Z = X.Y + \(\bar { X }\).Z
(b) Obtain the Boolean expression for the logic circuit shown below:
CBSE Sample Papers for Class 12 Computer Science Paper 5 5
(c) Write the POS form of a Boolean function G, which is represented in a truth table as follows:
CBSE Sample Papers for Class 12 Computer Science Paper 5 6
(d) Reduce the following Boolean expression using K-map
H(X Y, Z, W) = Σ (0, 1, 2, 3, 5, 7, 8, 9, 10, 14, 15)

Question 7.
(a) What is the important property of circuit switching?
(b) Which protocol provides an error-free connection, which is always faster than the latest conventional modems?
(c) “Mesh topology is excellent for long distance networking”. Justify the statement.
(d) Differentiate between bridge and router.
(e) Give two examples of Web browser and Web server.
(f) Categorize the following under guided media and unguided media:
(i) Bluetooth
(ii) Ethernet
(iii) Infrared
(iv) Fiber
(g) The computer organization has set-up its new branch at Mizoram for its office and Web-based activities. It has 4 wings of building as shown in the diagram.
CBSE Sample Papers for Class 12 Computer Science Paper 5 7
CBSE Sample Papers for Class 12 Computer Science Paper 5 8
(i) Suggest the most suitable cable layout of connections between the wings and topology.
(ii) Suggest the most suitable place (i.e.Wing) to house the server of this organization with a suitable reason with justification.
(iii) Suggest the placement of the following devices with justification:
I. Repeater
II. Hub/Switch
(iv) The organization is planning to link its head office situated in Delhi with the office at Mizoram. Suggest an economical way to connect it, the company is ready to compromise on the speed of connectivity. Justify your answer.

Answers

Answer 1.
(a) Reserved keywords are char, virtual, struct, auto

(b) (i) → strcpy()
(ii) → cout()

(c) Correct code is:

void func(int x, int y=20);
void main()
{
int One = 10, Two = 20;
func(One, Two);
func(Two);
}
void func(int x, int y)
{
x = x + y;
cout<<x<<y:
}

(d) Output
101 : 40
102 : 50
103 : 70
(e) C1 = 0 C2 = 0 C1 = 1 C2 = 1
(f) The possible outputs are:
(i) Saurish : Eashita : Saurish:
(iv) Saurish: Eashita: Eashita:
The minimum value of ToGo is : 1
The maximum value of ToGo is : 2

Answer 2.
(a) Differences between data type struct and data type class are as follows:

struct data typeclass data type
Data type struct is a logical collection of related dissimilar data items that can be used as a single unit for input/output operation.A class is a collection of not just related data items but also a collection of functions that Operate on those data items.
It is composed of only structural constituents.It is composed of structural as well as behavioral constituents.
All members of the struct are public by default.All members of the class are private by default.
We cannot call a function by using the reference of class.We can call a function by using the reference of class.

(b) (i) The Function1 is referred as destructor and is automatically invoked when the object goes out of scope.
(ii) The Function2 is referred as constructor and is automatically invoked as soon as the object is allocated memory.

(c) class Taxi
{
int Taxino;
char Taxiname[20];
char Destination[20];
float Distance,Fuel;
void CALC();
public:
void INPUT():
void SHOW();
};
void Taxi::CALC()
{
if(Distance<=300)
Fuel=300;
else if(Distance<=700)
Fuel=700;
else
fuel=1000;
}
void Taxi::INPUT()
{
cout<<"Enter Taxi number:"; cin>>Taxino;
cout<<"Enter Taxi name:";
gets(Taxiname);
cout<<"Enter Destination:";
gets(Destination);
cout<<"Enter Distance:"; cin>>Distance;
CALC();
}
void Taxi::SHOW()
{
cout<<"Taxi number:"<<Taxino<<endl;
cout<<"Taxi name:"<<Taxiname<<endl;
cout<<"Destination:"<<Destination<<endl;
cout<<"Distance:"<<Distance<<endl;
cout<<"Fuel:"<<Fuel<<endl;
}

(d) (i) IV. Hierarchical Inheritance
(ii) 41 Bytes
(iii) JName, Weight, Price
(iv) ECInput(), ECShow(), Clnput(), CShow()

Answer 3.

(a) void Merge(int A[], int B[], int C[], int n)
{
int i;
for(i=0; i<n; i++)
C[i] = 2*A[i]+3*B[i ];
cout<<"Elements of array C are"<<endl;
for(i=0; i<n; i++)
cout<<C[i]<<" ":
}

(b) Base address, B = 1500
Storage, W= 4 bytes
Row Lower Bound, Ir = 1
Row Upper Bound, Ur = 20
Column Lower Bound, Ic = 1
Column Upper Bound, Uc = 15
Number of columns, Nc = 15
The number of rows, NR = 20.
I = 10
J = 9
Using Row Major
VAL [I][J] = B + [(I-Ir) * Nc + (J-Ic)] * W
i.e. VAL [10][9] =1500 + [(10-1) * 15 + (9-1)] * 4
= 1500 + (135 + 8) *4
= 1500 + 143 *4
= 1500 + 572
= 2072

(c) void SumArr(int A[]C30], int R, int C)
{
int Sum = 0;
for(int i=0; i<R; i++)
for(int j=0; j<C; j++)
{
if(A[i][j]%4==0 || A[i][j]%5==0)
Sum+=A[i][j];
}
cout<<"The sum is: "<<Sum<<endl;
}

(d) Given expression as (P + Q * {R – S)/T)
CBSE Sample Papers for Class 12 Computer Science Paper 5 9
So, postfix expression PQRS-*T/+

(e) void Push()
{
Node *Temp;
Temp=new Node;
cout<<"Enter information for new node"; cin>>Temp->info:
if(Top==NULL)
Top=Temp:
else
{
Temp->Next=Top;
Top=Temp:
}
}

Answer 4.
(a) Output
Present Record : 3

(b) void CountNonC()
{
ifstream Fin("COM.TXT", ios::in);
char line[255];
int count=0;
while(!Fin.eof())
{
Fin.getline(line, 255);
if(line[0]!='c' && line[0]!='C')
count++;
}
Fin.close():
cout<<"Total lines not starting with c/C are";
cout<<count<<endl;
}
(c) void Addob()
{
fstream FILE;
FILE.open("COLLEGE.DAT", ios::app | ios::binary);
COLLEGE C;
char ans;
do
{
C.Input();
FILE.write!(char *)&C, sizeof(C));
cout<<"Want to enter more records(Y/N)?"; cin>>ans;
while(ans!='N' && ans!='n');
FILE.close();
}

Answer 5.
(a) (i) Primary key is ID because it ensures that a column have an unique identity.
(ii) Degree 4 and cardinality 5

(b) (i) SELECT * FROM CLUB WHERE Sports = "SWIMMING";
(ii) SELECT CoachName FROM CLUB ORDER BY DateofApp DESC;
(iii) SELECT CoachName, Pay, Age, 0.15* Pay AS Bonus FROM CLUB;
(iv) SELECT CoachName, SportsPerson FROM CLUB, COACHES
WHERE CLUB.CoachID=COACHES.CoachID;
CBSE Sample Papers for Class 12 Computer Science Paper 5 10
CBSE Sample Papers for Class 12 Computer Science Paper 5 11

Answer 6.
CBSE Sample Papers for Class 12 Computer Science Paper 5 12
CBSE Sample Papers for Class 12 Computer Science Paper 5 13

Answer 7.
(a) The important property of the circuit switching technique is to set-up an end-to-end path (connection) between computers before any data is transmitted.
(b) Telnet
(c) The mesh topology is excellent for long distance networking because it provides extensive back-up, rerouting and pass-through capabilities.
(d) Differences between bridge and router are as follows:

BridgeRouter
A bridge connects networks with same standards.A router works like a bridge but can handle different protocols.
Bridge uses physical addresses.Router uses logical addresses.

(e) Web browser → Google Chrome, Mozilla Firefox
Web server → Apache HTTP server, Internet Information Services
(f) Guided media
(ii) Ethernet
(iv) Fiber
Unguided media
(i) Bluetooth
(ii) Infrared
(g) (i) Cable Layout
CBSE Sample Papers for Class 12 Computer Science Paper 5 14
(ii) According to the situation, the server can be housed in Wing Zas it has the maximum number of computers, i.e. 130 and if any other wing will house the server the network traffic will be more.
(iii) I. The repeater as per one layout (shown in (i)), the repeater can be avoided as all distance between the wings are <= 100m.
II. HUB/Switch will be required for connecting computers inside each wing since each wing have many computers.
(iv) To connect the head office in Delhi to the office at Mizoram, Wide Area Network (WAN) will be used. Since it has no physical medium but the air channel, no lengthy and expensive cabling system will be required. The connectivity can be done by using satellite transmission since its area coverage is quite large.

We hope the CBSE Sample Papers for Class 12 Computer Science Paper 5 help you. If you have any query regarding CBSE Sample Papers for Class 12 Computer Science Paper 5, drop a comment below and we will get back to you at the earliest.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 are part of CBSE Sample Papers for Class 12 Informatics Practices. Here we have given CBSE Sample Papers for Class 12 Informatics Practices Paper 2.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2

BoardCBSE
ClassXII
SubjectInformatics Practices
Sample Paper SetPaper 2
CategoryCBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme, as prescribed by the CBSE, is given here. Paper 2 of Solved CBSE Sample Paper for Class 12 Informatics Practices is given below with free PDF download solutions.

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions

  • All questions are compulsory.
  • Answer the questions after carefully reading the text.

Question 1.
(a) Name any two Indian scripts included in UNICODE.
(b) Write one basic difference between free software and open source software.
(c) Name the factors that affect the performance of the network.
(d) Which protocols are used to send and retrieve messages via electronic mail?
(e) Koshin analysis that a switch cannot stop traffic (data packets) destined for different LAN segment from travelling to all other LAN segments. What is the solution to this problem?
(f) Smitha has started a small business with 50 employees. She needs to do certain activities on daily basis like meeting circulars, file sharing, sending invoices to outside companies. Someone has told her that networking is the solution of all the stated problems. In the light of this statement mention the benefits and preventive measures of opting networking in business.
(g) How many types of font categories are used by Indian language computing?

Question 2.
(a) How many times the following while loop get executed?

int a = 10; 
while(a <= 30)
{
a = a+10;
}

(b) Write any two applications of XML.
(c) Rewrite following while loop into a for loop:

int stripes =0; 
whi1eCstripes <= 13)
{
if(stripes%2 == 2)
{
System.out.println("color code Red"):
else
{
System.out.println("color code Blue");
}
System.out.println("New stripe”); 
stripes = stripes+1;
}

(d) In Java, a class Fruit has a sub class Mango. Which of the following statement true and why?
(i) Class Mango can have no sub class.
(ii) Class Mango can have no other parent than Fruit.
(iii) Class Fruit can have at most one sub class.
(iv) Class Mango can have no sibling classes.
(e)
(i) Use a definition list to show that word “Happy” means “joyous, cheerful, delighted” and the other word “Funny” means “comical, amusing, entertaining”.
(ii) What will be display in jTextArea 1 after the execution of the following loop?.

forCint n=5; n<=25; n+=5)
jTextAreal. setText(jTextAreal. getTextC)+" " +Integer.toString(2*n));

Question 3.
(a) What will be the output of the following code?

mysql> SELECT CONCAKL0WER('CLASS'), UPPER('xi i'));

(b) What is the query called that combines rows in two or more tables?
(c) Brachi created the following table with the name ‘PROJECT’:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 2
(i) Now, Prachi wants to delete the ‘Faculty_Name’ column. Write the MySQL statement.
(ii) Write a query to add another column name ‘Role’ as varchar(20).
(d) Malvika wants to add the Salary and Commission for all the salesmen whose details are stored in table SALES as shown below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 3
But when she issues the query as:
SELECT SN, Salary + Commission FROM SALES;
The result shown is
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 4
She is getting total only for salesmen Raghav, Navjot and Anand and for others, she is not getting the total rather just NULL.
(i) What is the problem with the query?
(ii) What is the solution to this problem?
(e)
(i) State difference between date functions NOW( ) and SYSDATE( ) of MySQL.
(ii) Given below is the table ‘GAME’:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 5
The following statements are entered:

SET AUTOCOMMIT = 0;
INSERT INTO GAME VALUES(4, 'Tennis');
COMMIT ;
UPDATE GAME SET Game_Name='Chess' WHERE SNo=4; 
SAVEPOINT A;
INSERT INTO GAME VALUES(5, 'Football'); 
SAVEPOINT B;
INSERT INTO GAME VALUES!6, 'Baseball'); 
SAVEPOINT C;
ROLLBACK TO B;

Now, what will be the output of the following statement?

SELECT * FROM GAME;

Question 4.
(a) What will be displayed in jTextAreal after executing the following statement?

jTextAreal.setText("Unity\n In\n Diversity\tlndia");

(b) (i) Consider the following code snippet:

if(aNumber>=0)
if(aNumber==0)
System.out.pri ntl n("fi rst string"); 
else
System.out.println("second string"):
System.out.println("third string"):

I. What output do you think the code will produce if aNumber is 3?
II. Use braces, {and}, to further clarify the code.
(ii) What will be displayed after the following code is executed?

String str="A horse is a horse, of course, of course":
System.out.pri ntl n("Char's'at first occurrence:"+str.indexOf('s')): 
System.out.println("Char's'at last occurrence:"+str. 1astIndexOf(’s')):
System.out.println("String\"horse\"at first occurrence:"+str. indexOf("horse"));
System.out.println("First occurrence of Char 's' from 6th indexonwards:" +str.indexOf('s',6));
System.out.println("First occurrence of StringV'rseV'from 16th , in string:" +str.indexOf(”rse",16));

(c)
(i) Manvi created an application with three radio buttons. Now, Manvi has found that more than one radio button can be selected. How can Manvi correct this error?
(ii) The following code has some errors. Rewrite the correct code underlining all the corrections made:

public Class XYZ
{
Int a=3;
public void show(int b)
{
System.out.println("b=”+b);
System.out.println("a="+a);
}
public void show(int x)
{
System.out.println("a="+a)
}
}

(d) Design an application that performs arithmetic operations (+, -, *, /). The sample screens shot is given below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 9
The specifications for above application are given below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 10
(i) Write code to add, divide the two numbers for the respective buttons.
(ii) Write code to clear contents of all the text fields when Clear button is clicked.
(iii) Write code to allow only numbers in the two text fields nl and n2.

Question 5.
(a) Write two examples of DML commands to SQL.
(b) EMPLOYEE table has 5 rows and 2 columns and DEPARTMENT table has 3 rows and 4 columns.
A person writes a SQL command as

SELECT * FROM EMPLOYEE, DEPARTMENT;

What would be the degree and cardinality of the resultant relation?
(c) Write SQL command for (i) and (ii) and output for (iii) and (iv) on the basis of given table PUBLISHER.
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 11
(i) To display the details of all PUBLISHERS, which have PDate in between 1975-01-01 and 1998-01-01.
(ii) To list name of publisher whose location is ‘London’.

(iii) SELECT PID, Name, Location FROM PUBLISHER WHERE TitlesNo <=1;
(iv) SELECT PID, Name FROM PUBLISHER WHERE Name LIKE ’ ne’ ;

(d) Explain the following functions and give output of each of the statement.

(i) SELECT LOWER!’INFORMATION’) ;
(ii) SELECT SORT! 16) ;
(iii) SELECT LENGTH! ’ COMPUTER’) ;
(iv) SELECT INSTR! ’ Programming ’ , ’ming’) ;

Question 6.
(a)
(i) Write the MySQL command to create the EVENT table with the following specification:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 18
(ii) Consider the following tables CONSIGNOR and CONSIGNEE.
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 19
I. Which column is used to relate these two tables?
II. Which column is used to primary key for table CONSIGNEE?
(b) With reference to the above given tables(in Q6 (a)(ii)), write SQL commands for the statements (i) and (ii) and give output for SQL query (iii).
(i) To display the CneelD, CnorName, CnorAddress, CneeName, CneeAddress for every consignee.
(ii) To display number of consignors from each City.
(iii) SELECT CneeName, CneeAddress FROM CONSIGNEE WHERE CneeCity NOT IN ( ‘Mumbai’, ‘Kolkata’ ) ;

Question 7.
(a) How is back-end linked to a database and a server?
(b) Name any three B2B applications area in the world.
(c) Varsha is creating a form for the hotel where she works, help her to choose most appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and CommandButton for the following entries:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 21

Answers

Answer1.
(a) Bengali, Devnagari
(b) Difference between free software and open source software is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 1
(c) The following are the factors that affect the performance of the network:
(i) Number of users
(ii) Types of transmission medium
(iii) Hardware
(iv) Software
(d) Post Office Protocol (POP) and Simple Mail Transfer Protocol (SMTP) are used to send and retrieve message via electronic mail.
(e) The solution to the given problem is to use a router. The routers filter network traffic based on IP addresses. The IP address tells the router which network traffic (data packets) belongs to which LAN segment.
(f) Benefits of networking are as follows: .
(i) The potential advantage of networking is sharing peripherals, data and information, processor etc., can be shared over the network.
(ii) Easy to access remote database such as a person sitting at his PC to make reservation for aeroplanes, trains, hotels and so on anywhere in the world with instant confirmation.
Preventive measures of networking are as follows:
(i) Implement proper security policy for your organisation.
(ii) Use proper file access permissions when sharing files on the Internet.
(iii) Disconnect from the Internet when away.
(g) Fonts can be categorised on the basis of two parameters which are as follows:
(i) On the basis of technical specifications, fonts can be categorised as: True Type Font (TTF) It is normally 8 bits font and used with the Windows and Mac operating systems. Open Type Font (OTF) It is 16 bits font that allows the handling large glyph sets using UNICODE encoding.
(ii) On the basis of font configuration, fonts can be categorised as: Static Fonts They will appear all times in identical shapes and are stored in font files. Dynamic Fonts The handwritten fonts or calligraphic letters are dynamic fonts because of they generate individual variations.

Answer 2.
(a) 3 times
(b) The applications of XML are as follows:
(i) Web publishing
(ii) Web searching and automating Web tasks.

(c)

forCint stripes = 0; stripes <= 13;stripes++)
{
if(stripes%2 == 2)
{
System. out. println("color code Red”);
}
else
{
System.out.println("color code Blue");
}
System.out.println("New stripe");
}

(d) Only statement (ii) is true, because Java does not support multiple inheritance, which means a class have just one super class and not more than one super class.
(e)

(i) 
<HTML>
<B0DY>
<DL>
<DT> Happy </DT>
<DD> joyous </DD>
<DD> cheerful </DD>
<DD> delighted </DD>
<DT> Funny </DT>
<DD> comical </DD>
<DD> amusing </DD>
<DD> entertaining </DD>
</DL>
</B0DY>
</HTML>

(ii) Output of the given loop will be displayed as in the jTextAreal. 10 20 30 40 50

Answer 3.
(a)
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 6
(b) Join Query
(C)

(i) ALTER TABLE PROJECT DROP Faculty_Name;
(ii) ALTER TABLE PROJECT ADD Role VARCHAR(20);

(d)
(i) The problem is that when NULL value is added/subtracted/multiplied/divided with any
other value, the result is always NULL. Hence, for Salary + Commission expression, if the commission is NULL the result is also NULL.
(ii) Solution to this problem is that first the NULL values in the Commission column should be replaced with 0 (zero) using UPDATE command given below and then the given SELECT query be re-issued.
UPDATE SALES SET Commission=0 WHERE Commission IS NULL;
(e)
(i) Differences between NOWQ and SYSDATEQ of MySQL are as follows:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 7
(ii) Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 8

Answer 4.
(a) Output will be displayed in jTextAreal as follows:
Unity
In
Diversity India
(b)
(i) Output
I. second string
third string

II. if(aNumber>=0)
{
if (aNumber==0)
{
System.out.println("first string");
}
else 
{
System.out.printlnC'second string"); .
}
}
System.out.println("third string");

(ii) Output

Char ' s ' at first occurrence: 5
Char 's' at last occurrence:38 
String "horse” at first occurrence: 2
First occurrence of Char 's' from 6th index onwards: 9 
First occurrence of String "rse" from 16th in string: 26

(c)
(i) The correct code should be as:

<F0RM>
<input type="radio" name="course" value="BA" checked>BA</input> 
<input type="radio" name="course" value="MA">MA</input>
<input type="radio" name="course" value="BSC">BSC</input>
</F0RM>

(ii) The correct code is:

public class XYZ 
{
int a=3;
public void show(int b)
{
System.out.println("b="+b);
System.out.println("a="+a);
}
public void show()
{
System.out.println("a="+a) ;
}
}

(d)
(i) private void jAddActionPerformed(java.awt.event.ActionEvent evt)

{
int numl=Integer .parselnt(nl .get.Text()); 
int num2=Integer.parseInt(n2.getText()); 
int sum=numl +num2 ;
result.setText(sum+" ") ;
}
private void jDivActionPerformed(java.awt.event.ActionEvent evt)
{
float numl=Fl oat.parseFloat(nl.getText()); 
float num2=Float.parseFloat(n2.getText()); 
float div=numl/num2; result.setText( div+" " ) ;
}

(ii) private void jClearActionPerformedCjava.awt.event.ActionEvent evt)

{
n1. setText(" "); 
n2. setText(" "); 
result.setText(" ");
}

(iii) To ensure that only number keys are typed in the text field, KeyTyped event handler should be written for the text field.
private void nlKeyTyped (java.awt.event.KeyEvent evt)

{
char kp = evt.getKeyChar() ;
if(!((kp>=’0’)&&(kp<=’9′))||kp == KeyEvent.VK_BACK_SPACE||kp = KeyEvent.VK_DELETE)
evt.consume() ;
}
private void n2KeyTyped(java.awt.event.KeyEvent evt)
{
char kp = evt.getkeyChar() ;
if(I ((kp>=’0′) && (kp<=’ 9′))||Kp == KeyEvent.VK_BACK_SPACE – ||kp = KeyEvent.Vk_ DELETE)
evt.consume() ;
}

Here, consume( ) method of KeyEvent object reject the key, if the key pressed is not between ‘0’ to ‘9’ or BACKSPACE or DELETE.

Answer 5.
(a) Two examples of DML commands are: SELECT, INSERT
(b) Degree = 2 + 4 = 6
Cardinality = 5 x 3 = 15
(C)

(i) SELECT * FROM PUBLISHER
WHERE PDate BETWEEN 1975-01^01 AND 1998-01-01;
(ii) SELECT Name. Location FROM PUBLISHER .
WHERE Location= ’London’ ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 12
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 13
(d)

(i) LOWER (str) converts the characters in string ’str’ in lowercase.

SELECT LOWER ( ’INFORMATION’ ) ;

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 14
(ii) SORT (value) returns the square root of a non-negative number, ‘value’.

SELECT SORT(16);

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 15
(iii) LENGTH (str) returns the length of the string in bytes.

SELECT LENGTH(’COMPUTER');

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 16
(iv) INSTR (str, substr) function is used to return the position of first occurrence of substr in str.

SELECT INSTR( 'Programming',’ming' ) ;

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 17

Answer 6.
(a)

(i) CREATE TABLE EVENT ,
(Id INTEGER(4) PRIMARY KEY,
Company_name VARCHAR(10) NOT NULL.
Company_code VARCHAR(20),
Host_name VARCHAR(30),
Client_address VARCHAR(20),
DateOfEvent DATE 
);

(ii)
I. CnorlD
II. CneelD
(b)

(i) SELECT CneelD, CnorName, CnorAddress, CneeName, CneeAddress FROM CONSIGNOR, CONSIGNEE WHERE CONSIGNOR.CnorlD = CONSIGNEE.CnorlD ;
(ii) SELECT CneeCity. C0UNT( * ) FROM CONSIGNEE GROUP BY CneeCity;

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 20
Answer 7.
(a) The back-end is responsible for serving all the user requests. To serve the user requests, it has to interact with database to obtain data and to server to get the work done. After processing the given requests and queries, the server returns the results, which the back-end first interrupts and then passes them over to front-end.
(b) Three B2B applications area in the world are as follows:
(i) Supplier management
(ii) Payment management
(iii) Distribution management
(c)
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 22

We hope the CBSE Sample Papers for Class 12 Informatics Practices Paper 2 help you. If you have any query regarding CBSE Sample Papers for Class 12 Informatics Practices Paper 2, drop a comment below and we will get back to you at the earliest.

CBSE Sample Papers for Class 12 Informatics Practices Paper 1

CBSE Sample Papers for Class 12 Informatics Practices Paper 1 are part of CBSE Sample Papers for Class 12 Informatics Practices. Here we have given CBSE Sample Papers for Class 12 Informatics Practices Paper 1.

CBSE Sample Papers for Class 12 Informatics Practices Paper 1

BoardCBSE
ClassXII
SubjectInformatics Practices
Sample Paper SetPaper 1
CategoryCBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme, as prescribed by the CBSE, is given here. Paper 1 of Solved CBSE Sample Paper for Class 12 Informatics Practices is given below with free PDF download solutions.

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions

  • All questions are compulsory.
  • Answer the questions after carefully reading the text.

Question 1.
(a) The network administrator of ABC Inc. wants to prevent traffic overload within the network of the company. For this purpose, he needs to divide the company network into the subnetworks (LAN segments). Suggest him a
(b) Explain the purpose of domain name system.
(c) Give one advantage and one disadvantage of a star topology.
(d) When would you prefer hubs over repeaters?
(e) Explain the packet switching technique.
(f) Write any four criteria for distribution of OSS.
(g) What is the significance of anonymous user in FTP?

Question 2.
(a) While working in Netbeans, Ms. Riya has designed a login page, where she wants to display table. Help her in choosing more appropriate control out of ‘JTextField’ and ‘JTextArea’. Give a reason for your choice.
(b) In the code fragment given below, what output display when a user is equal 30?

if(user<=18)
{
System.out.println("User is younger"):
}
else if(user>18 && user<40)
{
System.out.println("User is between 19 and 39");
}
else 
{
System.out.println("User is older than 40");
}

(c) Predict the output of the following HTML code :

<HTML>
<TABLE border = ”4">
<TR align = "right” valign="middle">
<TH colspan="2">Production</TH>
<TH rowspan="3">Sales</TH>
</TR>
<TR>
<TD>Naveen</TD>
<TD>458</TD>
</TR>
<TR>
<TD>Neelam</TD>
<TD>896</TD>
</TR>
</TABLE>
</HTML>

(d) Differentiate between the following code fragments and also give their output:

(i) 
int f = l,i = 2; 
while(++i< 5)
f *= 1;
System.out.print!n(f);

(ii) int f = l,i = 2; 
do
{
f *= i;
}whi!e(++i< 5);
System.out.println(f);

(e) (i) Write a function in Java that takes two numbers as parameters. It then returns that number whose square is greater than the square of other numbers.
(ii) Rewrite the following switch code using if else statement.

switch(roll)
{
case 1:
Section='A'; 
break; case 2:
Section='B'; 
break; default:
Section='C';
}

Question 3.
(a) Identify the output of the following query:
mysql> SELECT MID(‘FINANCE’, 3, 2);
(b) Mr. Shivam created two tables with ID as primary key in Table 1 and foreign key in Table2. While inserting a row in Table2, he is not able to enter a value in the column ID. What could be the possible reason for it?
(c) Consider the table ‘LAB’.
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 2
Write SQL statement to obtain the following output:
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 3
(d)
(i) You need to add a NOT NULL constraint to the E-MAIL column in the table EMPLOYEES. Which clause should you use? Give an example.
(ii) You need to remove the column named EMP_FK_DEPT that is FOREIGN KEY constraint from the table EMPLOYEES in your schema. What statement should you use?
(e) Define the following:
(i) Domain
(ii) Relation
(iii) Tuples
(iv) Attribute

Question 4.
(a) What is following code doing?

String db = JOptionPane. showInputDialog("Enter name of your MySQL database . . . ");
String DB_URL=" jdbc:mysql://local host/"+ db;
Class. forName ("com.mysql. jdbc. Driver");
Connection con = DriverManager.getConnection(DBJJRL, "root"," " );

(b) Swagatika is a programmer at xyz enterprises. She created the following GUI:
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 5
Help her to write code in Java for the following:
(i) The percentage marks are to be entered in the text field (marksTF) and upon clicking the button (calcBTN) corresponding grade (as per following rules) should be displayed in the Table (resultLbl) below command button:
Marks%                    Grade
> = 90                        A + +
80 – 90                        A +
75 – 80                        A
60 – 75                        B
50 – 60                        C
40 – 50                        D
< 40                            Fail

(ii) Write the code for FocusLost event of text field (marksTF) to ensure that the user does not enter a negative or zero value. If a negative or a zero value is entered, then the text field should be made blank and a warning message should be displayed.
(iii) If you are asked to add a clear button to the application, which code would you write for it so that the text field marksTF and label resultLbl get cleared when it is clicked?

(c)
(i) What will be display in jTextArea 1 after the execution of the following code?

int a=4;
do
{
jTextAreal. setTextlInteger. toString(++a)); 
a=a+l;
}whi1e(a<=8);

(ii) Find output of the following Java code snippet:

String b="Monkey";
String c="No jump";
String d=b+c;
System.out.println(d); 
d=b.concat(c);
System.out.println(d);

(d) A class Person with the data members name and id. Another class Employee with the data member salary. Write definitions for classes Person and Employee for the following situations:
(i) Objects of both class are able to access all the data members of both the classes individually.
(ii) Only the members of class Employee can access all the data members of both the class.

Question 5.
(a) Write MySQL command to open an existing database.
(b) Ms. Meera wants to remove the entire content of a table “EMPLOYEE” alongwith its structure to release the storage space. Which MySQL statement should she use?
(c) Wiite the output of the following SQL queries:

(i) SELECT RIGHT ('COMPUTER' , 2);
(ii) SELECT INSTR ('Family’, 'mi');
(iii) SELECT DAY0FM0NTH('2016 - 05 - 25');
(iv) SELECT ROUND(76, 987, 2);

(d) Ihble “EMP” is shown below. Wiite commands in SQL for (i) and (ii) and output of query for (iii) and (iv).
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 6
(i) lb display list of all employees below 25 years old.
(ii) lb count the numbers of employees with names starting with ‘P’.

(iii) SELECT Name. Age FROM EMP WHERE Sex ='F';
(iv) SELECT Name, Contact FROM EMP WHERE Contact LIKE ’99%’;

Question 6.
(a)
(i) Write MySQL command to create the table PRODUCT including its constraints.
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 9
(ii) In a database ’BigBajar’ there are two tables with a sample data given below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 10
I. Identity the foreign key in the table Product.
II. P_Id column in the PRODUCT table is the …………… key.
Cust ld column in the CUSTOMER table is the ……………. key.
(b) With reference to the above-given tables (in Q6 (a) (ii)), write SQL commands for (i) and (ii) and output for(iii).
(i) To display Cust_Id, C_Name, P_Name, Price where price is greater than 50000.
(ii) To add a column P_Type with datatype VARCHAR and size 20 in the table PRODUCT.

(iii) SELECT P.P_Name, C.C_Name FROM PRODUCT P, CUSTOMER C WHERE P.Cust_Id=C.Cust_Id;

Question 7.
(a) What do you think about the most outstanding feature of E-Leaming?
(b) Which all features would you suggest for an effective front-end?
(c) Madhvi works for a shipping mart. She wants to create controls on a form for the following operations. Choose most appropriate controls out of TextBox, Label, RadioButton, ListBox, ComboBox, CheckBox and CommandButton.
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 12

Answers

Answer 1.
(a) A switch would serve the required purpose. Along with that, a switch is also responsible for filtering, i.e. transforming data in a specific way and for forwarding packets between LAN segments.
(b) Domain Name System (DNS) is a network service that translates domain name to the associated IP address.
(c) An advantage of star topology In star topology, the central node is connected directly to every other node in the network means that faults are easily detected and isolated.
A disadvantage of star topology If the central node in the star network fails, the entire network goes down.
(d) Hubs should be preferred over repeaters when more than two computers are to be connected in a network while repeaters are only used for signal modification.
(e) In packet switched networks, the message gets broken into small data packets. These packets are sent out from the computer and they travel around the network seeking out the
most efficient route to travel as circuits become available.
(f) Four criteria for distribution of OSS are as follows:
(i) No discrimination against person on groups.
(ii) No discrimination against fields of endeavor.
(iii) License must not be specific to a product.
(iv) License must not restricted other software.
(g) In order to use FTP effectively, one need to be an authorised user. However, anonymous FTP (i.e. logging in as an anonymous user) is a method whereby FTP server allows the general public to access files on an FTP server. Uploading of files refer to the transfer of files from one’s computer onto FTP server. An anonymous user generally is not allowed to upload files.

Answer 2.
(a) ‘JTextArea’ is best option to display the multiple rows table because JTextField accepts only single line of text whereas JTextArea accepts multiple line of text.
(b) Output
User is between 19 and 39
(c) Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 1

(d) The difference in the given code fragments is code
(ii) executes one time more than code
(i) because code
(ii) is implemented using do-while loop, do-while loop executes at least once even if the while condition is false, whereas, in while loop, it first checks the condition and then enter the loops, if the condition is true.
Output of code
(i) 12 (ii)2 4
(e)

(i) private int compareSqr (int a, int b) 
{
if( (a*a) > (b*b)) 
return a; 
else
return b; 
}

(ii) if (ro11 == 1)
Section='A’; 
else if(roll == 2)
Section=’B’;
else
Section='C';

Answer 3.
(a)
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 4
(b) Mr. Shivam must be trying to enter a value of ID in Table2, which is not present in the ID column of Tablel.

(c) SELECT Project_Code FROM LAB WHERE Name = 'Arun';

(d)
(i) MODIFY, clause of ALTER TABLE statement should be used to add NOT NULL constraint to column E-MAIL in the table EMPLOYEES as given below:

ALTER TABLE EMPLOYEES MODIFY E-MAIL VARCHAR(IO) NOT NULL;
(ii) ALTER TABLE EMPLOYEES DROP FOREIGN KEY EMP_FK_DEPT;

(e)
(i) Domain A domain is a collection of all possible values from which the values for a given column or an attribute is drawn. A domain is said to be atomic if elements are considered to be individual units.
(ii) Relation A relation is a table with columns and rows which represent the data items and relationships among them. Relations have three important properties a name, cardinality and a degree.
(iii) Tuples The rows in a relation are also known as tuples. Each row or tuple has a set of permitted values for each attribute.
(iv) Attribute The heading columns of a table are known as attributes. Each attribute of a table has a distinct name.

Answer 4.
(a) This code is creating a connection object namely con for MySQL database, whose name is obtained from the user using an InputDialog. UserlD of the database is root,
(b)

(i) private void calcBTNActionPerformedtjava.awt.event.ActionEvent evt)
{
float num = FI oat. parseFloat (marksTF. getText());
String S = "You get":
if(num >= 90)
S += "A++"; 
else if(num >= 80)
S += "A+"; 
else if(num >= 75)
S += "A";
else if(num >= 60)
S += "B";
else if(num >= 50)
S += "C";
el se if(num >= 40)
S += "D";
else
S = "Fail"; 
resultLbl. setText (S);
}
(ii) private void marksTFFocusLost(java.awt.event.FocusEvent evt)
{
int marks = Integer.parseInt(marksTF. getText()); 
if(marks <= 0)
{
marksTF.setText(" ");
JOptionPane.showMessageDialog(nul1,"Marks 
cannot be negative or zero");
}
}
(iii) marksTF. setText(" "); 
resultLbl.setText(" ");

(c)
(i) jTextarea will display
5
7
9
(ii) MonkeyNo jump
MonkeyNo jump
(d)

(i) class Person
{
public:
String name; 
public: 
int id;
}
class Employee
{
public:
int salary;
}
(ii) class Person 
{
protected:
String name ;
}
class Employee extends Person 
{
private:
int salary:
}

Answer 5.

(a) USE <database name>; 
(b) DROP TABLE EMPLOYEE;
(c)
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 7
(d) 
(i) SELECT * FROM EMP WHERE AGE<25';
(ii) SELECT COUNT(*) FROM EMP WHERE NAME LIKE 'P%';
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 8

Answer 6.
(a)

(i) CREATE TABLE PRODUCT
{
P_Id DECIMAK (4) PRIMARY KEY,
P_Name VARCHAR(20),
P_Company VARCHAR(20),
Price DEC IMAL(8) NOT NULL
};
(ii) I. Foreign key: Custjd
II. Primary, Primary

(b)

(i) SELECT Cust_Id, C_Name, P_Name, Price FROM PRODUCT P, CUSTOMER C
WHERE P.Cust_Id=C.Cust_Id AND Price>50000;
(ii) ALTER TABLE PRODUCT ADD P_Type VARCHARC20);
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 11

Answer 7.
(a) The most outstanding feature of E-Learning is that it has opened door for skill enhancement to the people of all age groups and skill levels.
(b) Features of an effective front-end are as follows:
(i) Ease of use
(ii) Simple and uncluttered look
(iii) Easy to understand
(iv) Proper visual feedback
(c)
CBSE Sample Papers for Class 12 Informatics Practices Paper 1 13

We hope the CBSE Sample Papers for Class 12 Informatics Practices Paper 1 help you. If you have any query regarding CBSE Sample Papers for Class 12 Informatics Practices Paper 1, drop a comment below and we will get back to you at the earliest.