coimbatore educational district · 86. definition : polymorphism the ability of an object to...
TRANSCRIPT
COIMBATORE EDUCATIONAL DISTRICT
REVISION EXAMINATION JANUARY 2015
STD-12COMPUTER SCIENCE ANSEWR KEY
G. JAGADEESWARAN M.C.A., M.Phil., M.Ed.,
COMPUTER INSTRUCTORSRI RAMAKRISHNA MISSION VIDYALAYA
SWAMI SHIVANANDA HIGHER SECONDARY SCHOOLSRKV POST, PERIYANAICKENPALAYAM
[email protected] 98423-42797 94438-42797
PART-I Choose the Correct Answer
QNo Answer QNo Answer1 B Absolute Cell Addressing 39 C Void
2 D Database Management System 40 C : :
3 A Flat-File Database 41 D Private
4 D Datum 42 B Attributes
5 A 20 43 A Private
6 D Star Office Writer 44 D Functions
7 A Ctrl + X 45 A Overloading
8 A Backspace 46 B Data Management
9 B Enter 47 C Data Digitization
10 B Ignore Once 48 C Physical
11 C Formula 49 C Computer Time
12 D ! (inter-section) 50 C Encapsulation
13 A Cell Pointer 51 A Polymorphism
14 B mm/dd/yy 52 A Bjarne Stroustrup
15 B Edit 53 A Auto
16 C Table -> Insert -> Rows 54 C - 32768 to 32767
17 C Tab 55 C ~ (Tilde)
18 D View 56 B Base Class
19 D Portrait 57 C Private
20 C VisiCalc 58 C Abstract
21 D All the above 59 A Word Processing
22 C Vector Graphics Card 60 BThe return type of overloaded functions may be the same data type
23 B GIF 61 D All the above
24 B Multimedia Messaging System 62 B Destructors
25 D Warping 63 A Constructor
26 A F5 64 A Destructor
27 D Shift + Ctrl + N 65 B Pointers
28 A Rename Slide 66 B #
29 B F11 67 B Continue
30 B Insert OLE Object 68 B 29
31 B Structured Query Language 69 A for
32 C Filter 70 A Positive
33 B Edit ->Paste Special 71 D 8
34 C Computation 72 D Strcmp()
35 D Record 73 B 1
36 C Variables should be separated by comma 74 C Both (a) and (b)
37 C Return 75 B 1992
38 B Call by Reference
PART-II Answer any 20 of the following
76. Working with multiple documents in Star Office Writer
In Star Writer, we can able to use more than one document same time and working with several document are also possible. (1) Once the documents are open, we can switch between them in the following two ways. Way 1 : Click on the Window menu option and select the file from the list of documents displayed. (1) Way 2 : Click on the document button visible on the taskbar.
77. Header and Footer
Header : Header is an area at the top of the page. ( 1 )Footer : Footer is an area at the bottom of the page. ( 1 )
78. Four advantages of Electronic Spreadsheet (take any 4 points) ( ½ + ½ + ½ + ½ )
Calculations are automated through the built-in mathematical, financial and statistical functions. (any 4 points enough) Accurate results to any desired level of decimal points are possible. Worksheets can be quite big in size. Any part of the worksheet can be viewed or edited. Worksheet can be saved and retrieved later. Any part or whole of an existing worksheet can be merged with any existing or new worksheet. Any part or whole of the worksheet can be printed in a desired format. Worksheet data can be viewed in the form of graphs or charts. The worksheet information can be transferred to any database or word processing software.
79. Date Arithmetic
In spreadsheets, date calculations become very simple. Hence, using date arithmetico We can add a number to a date and arrive at a new date.o Find the difference between two dates .o Use a wide variety of function and formats to get what we want.
For example, DATE ADD ( 1 )o Enter the two dates in mm/dd/yy format as, 03/13/15 say A1 and 2 say A2.o In a third cell say A3, enter the formula = A2+A1.o The result will be displayed on A3 as 03/15/15.
For example, DATE SUBTRACT ( 1 )o Enter the two dates in mm/dd/yy format as, 03/13/15 say A1 and 03/15/15 say A2.o In a third cell say A3, enter the formula = A2-A1.
The result will be displayed on A3 as 2.
80. Hierarchical Database :
The hierarchical database structures were primarily used on Main-Frame computers. ( ½ ) In hierarchical databases, records are organized in a tree like structure by type. ( ½ ) The relationship between record types is said to be a parent-child relationship. ( ½ ) In which any child type relates only to a single parent type. ( ½ )
81. DBMS :
A DMBS is a software tool that allows any number of users to access data, modify it. ( ½ ) A Data Base Management System (DBMS) constructs simple and complex requests to obtain and work with selected records. ( ½ ) A DBMS has the ability to provide extremely quick access and retrieval from large databases. ( ½ ) A DBMS when running on powerful hardware, can find any data in minutes – sometimes even in seconds. ( ½ )
82. Definition : Compression
Compression is a technique by which a recurring set of information is identified and replaced by a single piece of information. (1)
Type of Compression:
There are two types of compressions. Namely, they are, Lossy Compression (Ex:JPEG) and Lossless Compression (Ex:GIF).
83. Inline Sound and Video
When sound or video is included as part of a web page, then it is called inline sound or video. (1) While using inline sound or video is a part of a webpage, it plays automatically when web page loads without the viewer control. (1) You can add inline sound to a web page by using the <bgsound> and the <img> tags.
84. Slide Transition:
Slide Transition is a page that displays various transition effects that can be attached to a slide along with other options ( 1 )that allows us to control the transition of the slides.
Using this option we can add a different transition for each slide in the presentation. ( 1 )
85. Insert, Delete and Rename a slide
Insert a slide
To insert a slide, click the Slide button in the Presentation toolbar or choose Insert Slide from the menu bar. ( 1 + 1 ) The new slide uses the page layout of the previous slide.
Delete a slide
If we want to delete a slide, select the slide, which we want to delete in the Slides Pane and press Delete key or right click on the slide, and choose Delete Slide.
Rename a slide
To rename a slide, select the slide, which we want to rename and choose Slide Rename Slide or right click on the slide and choose Rename Slide.
86. Definition : Polymorphism
The ability of an object to respond differently to different messages is called as POLYMORPHISM. ( 2 )
87. Identifiers in C++
Identifiers are identifies the data to the compiler with data type. Identifiers may also call as variables. Hence, variables are memory boxes that hold values or constants. For example, int a = 20; float c = 30.31; char cg = ‘g’; char nm[6 ] = “SSHSSH”;
88. Four Punctuators : (Take any 4 symbols) ( ½ ) + ( ½ ) + ( ½ ) + ( ½ )
Punctuators are characters with a specific function. Each symbol represents some special purpose usage in the program.
Symbol P U R P O S E; Terminates every C++ statement.
// Treats a command as single line comment./* */ A block of comments.{ } Action Block.[ ] Index value for an element in an array.‘ ’ It is used to enclose a single character.
“ ” It is used to enclose a set of characters or a string.
89. Impact of Modifiers
unsigned modifies the range of the integer values as the sign bit is also used to store data. ( 1 ) long increases the bytes for a particular data type, thus increasing the range of values. ( 1 )
90. Break and Continue ( 1 + 1 )
BREAK CONTINUEIt will stop the program execution, unconditionally. It will not stop, but take the control to next step.The break statement exit from the current loop only. It means, it will stop the action block, where it is present.
The continue statement will take the current loop to the next iteration.
The keyword break may present anywhere in the program, but, the commands beyond to the keyword, break will not execute.
The keyword, continue may present anywhere in the program, but, the commands beyond to the keyword continue will not execute.
91. Syntax and Example of Function Prototype : ( 1 + 1 )
Purpose : Function prototype is a pre-declaration of a function and its variables. Syntax : < Data type > < function identifier > < arguments or parameters > ; Examples : void fun (char); int max (int, int); int max (int a, int b);
92. Write() Function ( 1 + 1 )
There are, two parameters required for write () function. Namely, they are, o Identifier string characterso Number of characters to be displayed
Syntax is, cout . write ( string , number of characters ) ; Example is, char name[5]=”SSHSS”; cout . write (name ,3); The output is, “SSH”.
93. Array behavior when passed it to a function : ( ½ ) + ( ½ ) + ( ½ ) + ( ½ )
Arrays can be passed on as arguments to the functions. The actual parameter is passed only by the identifier (array name), ignoring dimensions. Array parameters by default behave like a reference parameter (only as variables). Array parameters represent the base address of the array.
94. Definition : Data Hiding
The members and functions declared under private are not accessible by members outside the class, ( 1 )this is referred to as Data Hiding.
Data hiding of data provides security to data. ( 1 )
95. Static Data Members in C++ ( 1 +1 )
The static variable count is initialized to zero only once. The static variable is a kind of storage class variable. The values stored on the static variable will be static. But, it is little differ from qualifier const.
96. Functions invoked in Function Overloading
The functions are invoked for function overloading; the compiler adopts BEST MATCH technique. ( 1 ) As per this technique, the compiler will do, ( 1 )o Look the exact match of a function prototype with function call statement.o In case an exact match is not available, it looks for the next nearest match. o That is, the compiler will promote integral data promotions and then match the call statement with function prototype.
97. Four Functions of Constructor (any 4 ) ( ½ ) + ( ½ ) + ( ½ ) + ( ½ )
The constructor function initializes the class object. The memory space is allocated by constructor, to the class members and objects. The constructors are created by the compiler automatically, even the user forget to create. The constructors are special functions of classes. The constructor function name has the same name as the class name. The constructor functions return nothing.
98. Advantages of Inheritance ( ½ ) + ( ½ ) + ( ½ ) + ( ½ )
Inheritance has the following 3 basic advantages.o Reusability of code : This saves a lot of software development time.o Code sharing : The methods of the base class can be shared by the derived class.o Consistency of interface : The inherited attributes and methods provide a similar interface to the calling methods.
99. Definition : eBanking ( 1 +1 )
eBanking permits us banking from the comfort of the home by using internet facilities. We can do all kind of banking activities from our home itself using internet is called e-banking. eBanking has truly improved the reach and services of banks.
100. Theft of Computer Time ( 1 +1 )
Most of the computer time (that is, running time of computers after it switched ON) in an organization is not in use. Some other software runs on an idle computer without the knowledge of the organization. This is called theft of ‘computer time’.
PART-III Answer any 7 of the following 7 X 5 = 35
101. Spell check after the entire document is typed
Purpose of spell checking ( 1 ) Tools -> Spelling -> Check or F7 key and Spell Check Dialog Box. ( 1 ) Not in Dictionary, Suggestions , Ignore Once, Ignore All, Add, Change, Change All and Auto Correct buttons explanation. ( 3 )
102. Table Formatting Toolbar
Purpose of Table Formatting Toolbar and View -> Toolbars -> Table and Table Formatting Toolbar with 19 icons ( 1 )
Explanation of 13 icons inside Table Formatting Toolbar ( 4 )
103. Generate Series of Values
Purpose of Fill Series ( 1 ) Shortcut : Edit -> Fill -> Series and Fill Series Dialog Box and explanation ( 1 ) Example:1 - Generate Date Series ( 1 ) Example:2 - Generate Linear Series ( 1 ) Example:3 - Generate Growth Series ( 1 )
104. Formatting Options in Star Office Calc
This is the Bold icon and is used to display data in bold.
This icon is used to display the data in italics.
This is used to underline the data in highlighted cells.
This is the Change Font icon.
This icon is used to change the font size of the data. To do so, select the data and click on this icon.
This is the Font Colour icon. This can be used to change the font colour.
These are the Align Left, Align Center, Align Right and Justify icons. They are used to align the contents of cells.This is the Number Format: Currency icon. Display the contents of the selected cells in currency format.This is the Number Format: Percent icon. Clicking on this icon will display the current contents in percentage format. This is the Number Format: Standard icon. Clicking on this icon will display the contents of the selected cells in default format.These are the Number Format: Add Decimal and Number Format: Delete Decimal icons : They are used to increase or decrease the number of decimal digits.
105. Manipulation of Database (any 5 points enough) ( 1 + 1 + 1 + 1 + 1 )
Searching - a process to select a desired specific data from a database. Sorting - is the process of arranging the data in a filed in the table either in ascending or in descending order. Merging - a process of joining data from two or more tables of the same or different databases. Filtering - a way of limiting the information that appears on screen. Editing - process of performing corrections, deleting the existing data, adding or changing the format of the database. Report Generation - is a process of taking records in hardcopy (paper printout) or viewing softcopy (screen display). Performing Calculations - do any kind of arithmetic calculations on the data stored in the database.
106. Entry Check Loops
Definition of Loop and Classification ( 1 ) for(;;) loop syntax and explanation with a suitable example ( 2 ) while(;;) loop syntax and explanation with a suitable example ( 2 )
107. Function Overloading
Definition of Function Overloading ( 1 ) Best Match strategy with a suitable example ( 1 ) 5 Rules of Function Overloading ( 3 )
108. Types of Inheritance
Definition of Inheritance ( 1 ) 5 Types of Inheritance ( 1 )o Single Inheritanceo Multiple inheritanceo Multilevel inheritanceo Hybrid inheritanceo Hierarchical inheritance
Single Inheritance with diagram example ( 1 ) Multiple Inheritance with diagram example ( 1 ) Multilevel Inheritance with diagram example ( 1 )
109. OUTPUT
110. DEBUGGING
Error No
ERROR CODE CORRECT CODE REASON
1 class sum() class sum Parenthesis is not allowed in the class identifier
2 private; private: Colon need and Semi-colon not allowed
3 sum(); sum() Semi-colon not allowed
4 a=b=5 a=b=5; Semi-colon missing
5 cout>>”\n constructor” cout<<”\n constructor”; Cout statement need insertion operator
6 cout>>”\n constructor” cout<<”\n constructor”; Semi-colon missing
7 sum(); ~sum() Tilde symbol need
8 sum(); ~sum() Semi-colon not allowed
9 cout>>”\n destructor” cout<<”\n destructor”; Cout statement need insertion operator
10 cout>>”\n destructor” cout<<”\n destructor”; Semi-colon missing
11 void inputdata (int n1, int n2); void inputdata (int n1, int n2) Semi-colon not allowed
12 display() void display() Data type missing
13 cout<<”\n The sum =” a+b cout<<”\n The sum =”<< a+b; Cout statement need insertion operator
14 cout<<”\n The sum =” a+b cout<<”\n The sum =”<< a+b; Semi-colon missing
15 } }; Class body should be terminated by a semi-colon
16 void main(); void main() Semi-colon not allowed
17 s.inputdata(10); s.inputdata(10,20); Parameter value 20 missing
18 s.display(20) s.display(); Parameter value 20 no need here
19 s.display(20) s.display(); Semi-colon missing
20 }; } No need of semi-colon to void main()
~ ALL THE BEST ~
constructor without parametersparameterized constructor…enter the data…23object a:The numbers are… 2 3The sum of the numbers are 35