computer practical

15
BOARD PRACTICAL EXAMINATION SESSION 2013-2014 SUBJECT COMPUTERSCIENCE (083) CLASS XII Guidelines for evaluation of Practical Duration: 3 hours Total Marks: 30 1. Programming in C++ ………………10 Marks One programming problem in C++ to be developed and tested in Computer during the examination. Marks are allotted on the basis of following: Logic : ……………………………...…….5 Marks Documentation/ Indentation :………… 2 Marks Output presentation :……………….…..3 Marks Notes: The types of problems to be given will be of application type from the following topics Arrays (One dimensional and two dimensional) Array of structure Stack using arrays and linked implementation Queue using arrays (circular) and linked implementation Binary File operations (Creation, Displaying, Searching and modification) Text File operations (Creation, Displaying and modification) 2. SQL Commands ……………………05 Marks Five Query questions based on a particular Table/Reaction to be tested practically on Computer during the examination. The command along with the result must be written in the answer sheet. 3. Practical File…………………….05 Marks Must have minimum 50 programs from the following topics:- Arrays (One dimensional and two dimensional, sorting, searching, merging, deletion’& insertion of elements) Arrays of structures, Arrays of Objects Stacks using arrays and linked implementation Queues using arrays (linear and circular) and linked implementation

Upload: nivesh-singh

Post on 30-Dec-2015

23 views

Category:

Documents


0 download

DESCRIPTION

Class 12

TRANSCRIPT

Page 1: Computer Practical

BOARD PRACTICAL EXAMINATION SESSION 2013-2014

SUBJECT COMPUTERSCIENCE (083)

CLASS XII

Guidelines for evaluation of Practical

Duration: 3 hours                        Total Marks: 30

 1. Programming in C++ ………………10 Marks

One programming problem in C++ to be developed and tested in Computer during the examination. Marks are allotted on the basis of following:Logic : ……………………………...…….5 MarksDocumentation/ Indentation :………… 2 MarksOutput presentation :……………….…..3 Marks

Notes: The types of problems to be given will be of application type from the following topicsArrays (One dimensional and two dimensional) Array of structure Stack using arrays and linked implementation Queue using arrays (circular) and linked implementationBinary File operations (Creation, Displaying, Searching and modification)Text File operations (Creation, Displaying and modification)

2. SQL Commands ……………………05 Marks

Five Query questions based on a particular Table/Reaction to be tested practically on Computer during the examination. The command along with the result must be written in the answer sheet.

3. Practical File…………………….05 Marks

Must have minimum 50 programs from the following topics:-

Arrays (One dimensional and two dimensional, sorting, searching, merging, deletion’& insertion of elements) Arrays of structures, Arrays of ObjectsStacks using arrays and linked implementationQueues using arrays (linear and circular) and linked implementationFile (Binary and Text) operations (Creation, Updation, Query)Any computational based problems15 SQL commands along with the output based on any table/relation: .....3 Marks

4. Project file ………………...05 Marks

5.Viva Voce ………………..05 Marks

Page 2: Computer Practical

Viva will be asked from syllabus covered in class XII .

COMPUTER BOARD PRACTICAL EXAMINATION 2013-2014CLASS XII SET A

Q1. Consider the tables FLIGHTS&FARES. Write SQL commands for the statements (a) to (d)

( 5)

Table : FLIGHTSFNO SOURCE DEST NO_OF_F

LNO_OF_STOP

IC301 MUMBAI BANGALORE

3 2

IC799 BANGALORE

KOLKATA 8 3

MC101 DELHI VARANASI 6 0

IC302 MUMBAI KOCHI 1 4

AM812 LUCKNOW DELHI 4 0

MU499 DELHI CHENNAI 3 3

Table : FARESFNO AIRLINES FARE TAX

IC301 Indian Airlines

9425 5%

IC799 Spice Jet 8846 10%

MC101

Deccan Airlines

4210 7%

IC302 Jet Airways 13894 5%

AM812

Indian Airlines

4500 6%

MU499

Sahara 12000 4%

a) Display flight number & number of flights from Mumbai from the table flights.

b) Arrange the contents of the table flights in the descending order of destination.

c) Increase the tax by 2% for the flights starting from Delhi.

Page 3: Computer Practical

d) Display the flight number and fare to be paid for the flights from Mumbai to Kochi using the tables, Flights & Fares, where the fare to be paid =fare+fare*tax/100.

Q2. Get roll no and marks of the students and stored into a file.(5)

Q3. Write a complete program in C++ to implement a dynamic allocated stack containing names of countries. (5)

COMPUTER BOARD PRACTICAL EXAMINATION 2013-2014CLASS XII SET B

Q1.Consider the following tables Employee and salary. Write SQL

commands for the statements (a) to

(d) (5)

Table : Employee

Eid Name Deptid Qualification Sex

1 Deepali Gupta 101 MCA F

2 Rajat Tyagi 101 BCA M

3 Hari Mohan 102 B.A M

4 Harry 102 M.A M

5 Sumit Mittal 103 B.Tech M

6 Jyoti 101 M.Tech F

Table : Salary

Eid Basic DA HRA Bonus

1 6000 2000 2300 200

2 2000 300 300 30

3 1000 300 300 40

4 1500 390 490 30

5 8000 900 900 80

6 10000 300 490 89

Page 4: Computer Practical

a. To display the frequency of employees department wise.

b. To list the names of those employees only whose name starts with

‘H’

c. To add a new column in salary table . the column name is total_sal.

d. To store the corresponding values in the total_sal column.

Q2:- Write program to read all the records present in an already exiting binary file SPEED.DAT and display them on the screen, also count the number of records present in the file. (5)

Q3.Write a complete program in C++ to implement a dynamically allocated Queue containing names of cities. (5)

BOARD PRACTICAL EXAMINATION 2013-2014CLASS –XII

COMPUTER -CODE NO (083)EVALUATION SCHEME

Board

R.NO.

Name Q. Paper

Set

Program(10)

SQL Command(5)

Practical File

(5)

Project(5)

Viva Voce( 5)

Total marks( 30)

9117960 ABHISHEK JHA A

9117964 AKHIL BHANDARI B

9117967 DIVYA SINGH A

9117977MEENAKSHI

VERMA

B

9117982 NIVESH KR. SINGH A

9117983 PANKAJ GUSAIN B

9117984 POOJA JHA A

9117985 POONAM KUMARI B

Page 5: Computer Practical

9117988 RICHA KASHYAP A

9117996 VIKAS KUMAR B

9118000 PANKAJ KUMAR A

_________________ __________________

Signature of Internal Signature of External

Examiner Examiner

SET A

1 SELECT FNO,NO_OF_FL

FROM FLIGHTS

WHERE SOURCE="MUMBAI

2 SELECT *

FROM FLIGHTS

ORDER BY DEST DESC;

3 UPDATE FARES

SET TAX=TAX+2%

WHERE SOURCE="DELHI";

4 SELECT FNO, FARE

FROM FLIGHTS, FARES

WHERE (FLIGHT.FNO=FARE.FNO)&&

Page 6: Computer Practical

(SOURCE="MUMBAI")&&

(DEST="DELHI")

5 4

6 MC101 6 DECCAN AIRLINES 4210

MU499 3 SAHARA 12000

SETB

1 SELECT DEPTID

FROM EMPLOYEE

GROUP BY DEPTID;

2 SELECT NAME

FROM EMPLOYEE

WHERE NAME LIKE "H%";

3 ALTER TABLE SALARY

ADD(TOTAL_SAL,LONG);

4 UPDATE SALARY

SET TOTAL_SAL=BASIC+DA+HRA;

5 RAJAT TYAGI

HARI MOHAN

HARRY

JYOTI

6 10000

7 F 2

Page 7: Computer Practical

M 4

SET A Q:2 #include<iostream.h>

#include<fstream.h>

void main()

{

ofstream fileout;

fileout.open("marks.dat",ios::out);

char ans='y';

int rollno;

float marks;

while(ans=='y'||ans=='Y')

{

cout<<"\n Enter roll no.";

cin>>rollno;

cout<<"\n Enter marks";

cin>>marks;

fileout<<rollno<<'\n'<<marks<<'\n';

cout<<"\n Want to enter more records?(y/n)....";

cin>>ans;

}

fileout.close();

}

Set B Q:2*Write a function showfile() to read all the records present in an already

exiting binary file SPEED.DAT and display them on the screen ,also count

the number of records present in the file.*/

Page 8: Computer Practical

Void showfile()

{ ifstream fin;

fin.open(“SPEED.DAT”,ios::in|ios::binary);

vehicle v1;

int count=0;

while (!fin.eof())

{ fin.read((char *)&v1,sizeof(v1));

count++;

v1.showdetails();

}

cout<<”Total number of records are “<<count;

}

SET A Q:3#include<iostream.h>

#include<conio.h>

#include<stdio.h>

#include<stdlib.h>

struct node

{ char city[20];

node*link;

};

class queue

{

node*rear,*front;

public:

queue()

{ rear=NULL;

Page 9: Computer Practical

front=NULL;

}

void push();

void pop();

void display();

~queue();

};

void queue::push()

{ node*temp=new node;

gets(temp->city);

temp->link=NULL;

if(rear==NULL)

{

rear=front=temp;

}

else

{ rear-> link=temp;

rear=temp;

}

}

void queue::pop()

{

if(front == NULL)cout<<"UNDERFLOW!!!";

else

{ node*ptr=front;

cout<<front -> city<<"deleted/n";

front=front->link;

delete ptr;

if( front == NULL)

Page 10: Computer Practical

rear =NULL;

}

}

void queue ::display()

{

node*temp=front;

while(temp != NULL)

{

cout<<temp->city<<"->";

temp=temp->link;

}

cout<<"!!!\n";

}

queue::~queue()

{ node*temp;

while(front!=NULL)

{ temp=front->link;

delete temp;

}

}

void main()

{ queue qt;

int ch;

while(1)

{

cout<<"Menu:\n 1)push\n2)pop\n3) display\n4)Exit\n";

cout<<"enter your choice:";

cin>>ch;

switch(ch)

{ case1: qt.push();

Page 11: Computer Practical

break;

case2: qt.pop();

break;

case3: qt.display();

break;

case4: exit(0);

default: cout<<"wrong choice entered";

}

}

}

SET B Q:3#include<iostream.h>

#include<conio.h>

#include<stdio.h>

#include<stdlib.h>

struct node

{ char city[20];

node*link;

};

class queue

{

node*rear,*front;

public:

queue()

{ rear=NULL;

front=NULL;

}

void push();

void pop();

void display();

Page 12: Computer Practical

~queue();

};

void queue::push()

{ node*temp=new node;

gets(temp->city);

temp->link=NULL;

if(rear==NULL)

{

rear=front=temp;

}

else

{ rear-> link=temp;

rear=temp;

}

}

void queue::pop()

{

if(front == NULL)cout<<"UNDERFLOW!!!";

else

{ node*ptr=front;

cout<<front -> city<<"deleted/n";

front=front->link;

delete ptr;

if( front == NULL)

rear =NULL;

}

}

void queue ::display()

{

Page 13: Computer Practical

node*temp=front;

while(temp != NULL)

{

cout<<temp->city<<"->";

temp=temp->link;

}

cout<<"!!!\n";

}

queue::~queue()

{ node*temp;

while(front!=NULL)

{ temp=front->link;

delete temp;

}

}

void main()

{ queue qt;

int ch;

while(1)

{

cout<<"Menu:\n 1)push\n2)pop\n3) display\n4)Exit\n";

cout<<"enter your choice:";

cin>>ch;

switch(ch)

{ case1: qt.push();

break;

case2: qt.pop();

break;

case3: qt.display();

break;

Page 14: Computer Practical

case4: exit(0);

default: cout<<"wrong choice entered";

}

}

}