Monday, 2 January 2017

XII A Computer science - Half yearly descriptive answer key

76.    Switch over from insert mode to type over mode
By pressing Insert key  we can toggle from insert mode to type over mode and vice versa
77.     Types of Page orientation
1         Portrait           : Length of the page is more than the Width
2         Landscape    : Width of the page is more than the Length
78.     Spreadsheet packages
1.    VisiCalc  first commercial spreadsheet in 1979
2.    Lotus 1-2-3 in 1982 from Lotus Corporation
3.    Excel   from  Microsoft
4.    Quattro Pro from Borland International
5.     ‘Improve’  from Lotus Corporation
6.    ‘StarOffice Calc’ from Sun Microsystems
79.     Range
A continuous group of cells in a worksheet is called a Range. Example the cells A4, A5, A6, B4, B5 and B6 can be referred to as A4:B6
80.    Database
A database is repository for collections of related items or facts. It arranges them in a structure.
81.    Report
A report is printed information based on a query that gathers criteria-matching data and, in some cases, performs mathematical calculations.
82.     Compression and its Types
  Compression is a technique by which a recurring set of information is identified and replaced by a single piece of information. There are two types of video compressions:
·         Lossless compression – Retains the exact image throughout the compression.
·         Lossy compression – Provides a comparatively higher ratio of compression but results in some loss of quality.
83.     Steps involved in creating a 3D animation
1.       Modeling – creating the broad shapes and structures of the 3-D objects
2. Animating - defining their motion
3. Rendering - giving attributes, such as colors, and textures, to the objects
84.    Different ways  to start presentation
We can start presentation by any one of the following ways
1.       click the Slide Show icon on the Presentation Toolbar
2.       choose Slide Show _ Slide Show
3.       Press F5.
85.      To insert a picture in a slide
Choose Insert à Picture à From File or click the Insert Picture icon  from the Insert toolbar.
86.     Encapsulation
v  The mechanism by which the data and functions are bound together within an object definition is called as ENCAPSULATION.
v  The binding of data and functions together into a single entity is referred to as encapsulation
87.     Conditional Operator
Ø  ? : is conditional operator also known as ternary operator
Ø  The general syntax is E1 ? E2 : E3 where E1,E2,E3 are operands. Example
max = (num1 > num2) ? num1 : num2;
Ø  The variable max will take the value of num1 if num1 is greater than num2, otherwise max will be assigned with the value of num2.
88.     Type cast
Ø  Refers to the process of changing the data type of the value stored in a variable.
Ø  Achieved by prefixing the variable or value with the required data type.
Ø  Restricted only to fundamental or standard data types.
Ø  Example   (float) 7 , converts the numeric constant 7 to float type.
X=8%7.7 is erogenous since division can be done only by integer only. This can be rectified by x=8%(int)7.7 
89.    Impact of modifiers in c++
Ø  unsigned modifies the range of the integer values as the sign bit is also used to store data.
Ø  long increases the bytes for a particular data type, thus increasing the range of values.
90.     Difference between break   and continue statement
break
continue
A loop’s execution is terminated when the test condition evaluates to false.
The continue statement forces the next iteration of the loop to take place, skipping any code following the continue statement in the loop body.
Under certain situations one desires to terminate the loop, irrespective of the test expression.

Ø  break statement would exit the current loop.
Ø  break statement accomplishes jump from the current loop


91.     The information provided by function prototype to the compiler 
1. Number and type of arguments - (char name [ ] - is an argument)
2. The type of return values –
Example
          void fun( ) – void is the return type.
          int fact(int) – int is the return type
92.    Syntax and example for strlen( )
Returns the number of characters stored in the array.
Syntax :  strlen(char *);
For example,
                Name[ ] = “Nightingale”;
                n=strlen(name);  will return 11 in the variable n.
93.    Array and its types
An array is a collection of variables of the same type that are referenced
by a common name.                   
Arrays are of two types:
One dimensional: comprising of finite homogenous elements
Multi dimensional: comprising of elements, each of which is itself a one- dimensional array

94.      Class  and  its specification
Ø  A class is a way to bind data and functions together.            
Ø  A class is a new way of creating and implementing a user defined data type. Classes provide a method for packing together data of different types.

Ø  A class specification has two parts:
1) Class declaration
2) Class Function Definitions
95.    Static data members
A data member of a class can be qualified as static
The static member variable
Ø  Is initialized to zero, only when the first object of its class is created. No other initialization is permitted
Ø  Only one copy of the member variable is created (as part of the common pool) and is shared by all the other objects of its class type
Ø  Its scope or visibility is within the class but its lifetime is the lifetime of the program.
96.      Invoking functions while function overloading
The compiler adopts BEST MATCH strategy.
ü  As per this strategy, the compiler will look for the exact match of a function prototype with that of a function call statement
ü  In case an exact match is not available, it looks for the next nearest match. That is, the compiler will promote  integral data promotions and then match the call statement with function prototype.
97.    Functions of Constructor
1) The constructor function initializes the class object
2) The memory space is allocated to an object
98.    Multiple Inheritance
When a derived class inherits from multiple base classes it is known as multiple inheritance

99.     Areas of health care where computers are used
· Hospital Management System
· Patient Tracking System
· Exchange of diagnostic records between healthcare units
· Tracking and Monitoring Communicable Diseases
· Decision support systems with highly advanced computing techniques
100.            Computer Virus
ÿ  A virus is a self-replicating program that can cause damage to data and files stored on your computer.
ÿ  These are programs written by programmers with great programming skills who are motivated by the need for a challenge or to cause destruction.
ÿ  57000 known virus programs are in existence. 6 new viruses are found each day.


Part III
101.            Steps to save a document in star writer
To save a document for a first time, following steps are used:

ÿ  FileàSave command is selected   or  icon is clicked. A Save As dialog box appears on the screen.
ÿ  To select a drive, up one level icon   is clicked, then a list of drives will be displayed. On the list of drives, a double click is made on the required drive. Now a list of folders available on that drive is displayed.
ÿ  A double click is made on the required folder and the file name is given in the File name list box.
ÿ  Choose the required document type from the Save as type list box and click on the Save button to save the document in that type. The document is now saved and a file name appears in the title bar.
Once a file is saved under a name, to save it again the name need not be entered again. The file can be saved simply by selecting the FileàSave command or by clicking the Save button. Ctrl + S is the keyboard shortcut for saving the document.
102.            Carrying out Spell check after the entire document is typed
The following steps are used for a spell check.
ÿ  Tools àSpelling àCheck is selected or is clicked. To check a part of the document only that portion is selected.
ÿ  The F7 key may also be pressed to select the spelling command.
ÿ  In the appeared spell check dialog box Not in dictionary text area displays the misspelled word and the Suggestions list displays any alternative spellings.
ÿ  Any of the following can be done:
       To skip this occurrence but stop on the next one. Ignore Once button is clicked. To skip all occurrences of this word. Ignore All button is clicked.
       To replace the word with one of the selected spellings, in the suggestions list that spelling is clicked, and Change button is clicked to change this occurrence and Change All button is clicked to replace all occurrences of the world.
       If none of the replacements is correct, correction can be made manually in the Not in dictionary text area. Add button is clicked to add the word to the dictionary.
103.            Functions in Star office calc
ÿ  StarOffice Calc has a wide variety of functions that allow you to perform several frequently done calculations.
ÿ  Functions are predefined formulae that are available in StarOffice Calc.
ÿ  These functions are available in StarOffice Calc in the pull down menu of Function Wizard window.
ÿ  The functions available are divided into different categories. The categories are listed in the category pull down menu.
ÿ  To select a function, go to Insert menu and Select the Function option.
ÿ  The Function Wizard dialog box appears. A list of all functions is displayed in the Function box when All is selected in the Category box. If a category is selected (e.g. Mathematical) the functions related to that category alone will be displayed in the function box.
ÿ  To select a function:
       Select the category in the Category box.
       Scroll down the list to find the function you want. Click once on the function name to see a short description of that function on the right side of the window. Double – click on it to insert it into the worksheet.
ÿ  The Function Wizard shortcut icon on the formula bar can also be used to select and insert functions.
ÿ  For example, to insert the SQRT function (a function to find the square root of a number),
1.       place the cursor in the cell where you want to insert the function
2.       click on the Function Wizard icon.
3.       Select Mathematical from Category.
4.       Select the SQRT function from the list of functions, which appears by double clicking on it.
5.       The Function Wizard displays a brief description of the function and prompts you to enter the number or the cell address on which the function should work. Enter the number 64.
104.            Various icons in the Insert object tool bar
ÿ  StarOffice Calc provides tools for inserting objects like charts, images from image editor, formula, etc. in a worksheet.
ÿ  For this purpose, click on the Insert Object from View àToolbar. A floating toolbar appears with the following icons in the order listed below:
 
1. Insert Chart Icon
2. Insert Formula Icon
3. Insert Floating Frame Icon
4. Insert Movie and Sound Icon
5. Insert OLE Object Icon
6. Insert Applet Icon
ÿ   It is to be noted that some of the icons are used in very advanced applications that are beyond the scope of this book.
o    Insert Chart Icon
H   This icon is used for presenting the data in the worksheet in from of charts of different kinds such as Bar Chart, Pie Chart, Lines, XY plot, etc. More details on charting are given in a later section.
o    Insert Formula Icon
H   This icon is used for inserting a formula in the worksheet for performing calculations.
o    Insert Floating Frame Icon
H   This icon provides to generate a scrolling screen within a worksheet.
o    Insert Movie and Sound Icon
H   This icon is used to insert sound or video files into the current worksheet.
o    Insert OLE Object Icon
H   This icon is used to insert objects from other application into a worksheet.
o    Insert Applet Icon
H   This icon is used to import Applets written in Java programming language into the worksheet.
105.              Various types of Databases
Based on the conceptual structures, the databases can be classified as follows:
1. Flat – File database
2. Relational database
3. Hierarchical database
4. Network database
5. Object-Oriented database
 Flat – File Database
ÿ  A database file that consists of a single data table is a Flat-file database.
ÿ  Quite useful for certain single user or small-group situations, especially for maintaining lists such as address lists or inventories.
ÿ  Data that is stored, managed, and manipulated in spreadsheet is another example of a flat-file database.
ÿ  More complex requests are not allowed. This is fine if you merely need to locate a part or verify an address.
ÿ  Accessing multiple data tables is not possible in flat-file databases.
Relational database
ÿ  A database made up of a set of related tables.
ÿ  In a relational database, one or more common fields existing in two or more tables create a relationship between these tables.
ÿ  The common field or fields are called the Keys. A primary key is a key that uniquely identifies a record in a database table. In relational databases, a primary key can consist of one or more fields. For instance, in employee table Emp.No. is a primary key, since it uniquely identifies an employee record.
ÿ  The relational database structure is the most prevalent database in today’s business organizations.
Hierarchical database
ÿ  Structures were primarily used on Main Frame computers.
ÿ  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.
Network database
ÿ  Very similar to the hierarchical structure
ÿ  But any one record type can relate to any number of other record types.
Object Oriented database
ÿ  An Object Oriented database is a newer structure that has been generating a great deal of interest in recent years.
ÿ  It represents very different approach to the way data is treated by database developers and users. The object oriented structure groups data items and their associated characteristics, attributes, and procedures into complex items called objects.
ÿ  Physically an object can be anything: a product, or event, such as a house, an appliance, an art piece, a customer complaint, or even a purchase.
ÿ  An object is defined by its characteristics, attributes and procedures.
ü  An object’s characteristics can be text, sound, graphics, and video.
ü  Examples of attributes might be colour, size, style, quantity, and price.
ü  A procedure refers to the processing or handling that can be associated to the object.
106.             ****
107.            *****
108.Rules for overloading operators:
ü  Only existing operators can be overloaded. New operators cannot be created. One cannot overload C++specific operators like membership operator (.), scope resolution operator (::), sizeof operator and conditional operator.
ü  The overloaded operator must have at least one operand of user defined type.
ü  The basic definition of an operator cannot be replaced or in other words one cannot redefine the function of an operator.One can give additional functions to an operator
ü  Overloaded operators behave in the same way as the basic operators in terms of their operands.
ü  When binary operators are overloaded, the left hand object must be an object of the relevant class
ü  Binary operators overloaded through a member function take one explicit argument.
109.             
Line No
Error statement
Correction
Error description
1
$include<iosteam.h>
#include<iostream.h>
Preprocessor directive operator and header file name  are wrong
5
Private:
private :
Wrong case is used (C++ is case sensitive)
6
int a;b;
int a,b;
Comma should be used to separate list of variables
7
Public
public:
Use of wrong case
Missing colon at the end
11
cout>>”Constructor”;
cout<<”Constructor”;
Misplaced use of >> in cout statement
12
};
}
Misplaced semicolon
13
-simple()
~simple()
Destructor should proceed with ~ tilde character
15
cout<<”Destructor”;
cout<<”\nDestructor”;
Need to get the stated output from the question
20
cin<<a>>b;
cin>>a>>b;
Misplaced use of << in cin statement
25
cout>>”\nThe sum of variables….”<<a+b;
Cout<<”\nThe sum of variables….”<<a+b;
Misplaced use of >> in cout statement
28
void main[]
void main( )
[ ] is the array bracket. Function header should use parenthesis for arguments.


110.            Output of the given program
Add constructor….
Subtract constructor…
Enter your choice
1.Add…
2.Subtract… 1
Enter the two numbers…10  15
The sum of two numbers are…25



Add constructor….
Subtract constructor…
Enter your choice
1.Add…
2.Subtract… 2
Enter the two numbers…20  15
The difference of two numbers are…5

No comments:

Post a Comment