2015-16
AISSCE EXAMINATION
SUBMITTED BY:
Name:
Boards Roll No:
Class: XII
School:
Acknowledgement
I am extremely thankful to the Principal for her
encouragement and for all the facilities that she provided
for this project work and Computer teachers XYZ, of ABC
for giving me the opportunity for this project work.
I am very thankful to them for their advice and guidance
during the course of my project work.
Signature of Candidate
Certificate
This is to certify that X, student of class XII of ABC School
has completed the Computer Practical during the
academic year 2015-2016 towards partial fulfillment of
credit for the Computer Project of AISSCE 2016 and
submitted the satisfactory report as completed in the
following pages under my supervision and does not
involve in plagiarism of any kind. The reference taken in
making this project has been declared at the end of this
report.
___________________
Teachers Signature
Index
Sl.
no
Date
Programs
21/8/15
28/8/15
5/9/15
12/9/15
Page
no.
19/9/15
12
string
6
26/9/15
15
29/9/15
Bubble Sort
18
1/10/15
20
4/10/15
25
10
7/10/15
Insertion in Queue
29
11
15/10/15
Deletion in Array-Queue
32
12
17/10/15
13
19/10/15
14
25/10/15
15
27/10/15
36
40
43
46
Signature
Remarks
16
31/10/15
49
2/11/15
53
5/11/15
19
10/11/15
20
21/11/15
55
58
61
25/11/15
64
22
1/12/15
23
7/12/15
24
7/12/15
K-Map (SOP)
K-Map (POS)
66
70
71
p=a*b;
}
void SumProduct::showp()
{
cout<<\nProduct=<<p;
}
void main()
{
SumProduct s;
s.getdata();
s.calc();
s.pro();
s.show();
s.showp();
getch();
}
switch(opt)
{
case 1:cout<<"\nEnter radius of the circle:";
cin>>r;
area(r);
break;
case 2:cout<<"\nEnter the length and breadth of the rectangle:";
cin>>l>>b;
area(l,b);
break;
case 3:cout<<"\nEnter side 1:";
cin>>x;
cout<<"\nEnter side 2:";
cin>>y;
cout<<"\nEnter side 3:";
cin>>z;
area(x,y,z);
break;
default:cout<<"Wrong Option!!";
}
cout<<"\nDo you wnat to continue?(Y/N):";
cin>>ch;
}
getch();
}
Program to create a text file and then create another text file by
converting each line of the newly created text file into an
uppercase string:
# include <fstream.h>
# include <stdio.h>
# include <conio.h>
# include <ctype.h>
void main()
{
char fname[20];
char str[80], ch = 'y';
int count;
cout << "\n Enter the name of the file ";
gets(fname);
ofstream oldfile(fname);
while ((ch == 'Y') || (ch == 'y'))
{
cout << "\n Enter a line of text ";
gets(str);
oldfile << str << "\n";
cout << "\n Want to add more lines (Y/N) ";
cin >> ch;
}
oldfile.close();
// Copy each line after converting into the upper case
ofstream temp("temp.dat");
ifstream newfile(fname);
while (newfile)
{
newfile.get(ch);
if (ch != '\n')
ch = toupper(ch);
temp.put(ch);
}
newfile.close();
temp.close();
clrscr();
cout<< "\n The output file is \n";
ifstream yfile("temp.dat");
count = 0;
while (!yfile.eof())
{
yfile.getline(str,80);
cout << str << "\n";
count++;
// Check whether the number of lines on the display exceed 22 or
not
if ((count % 22) == 0)
{
cout << "\n Press any key to continue ";
cin >> ch;
}
}
yfile.close();
}
Output of the program to create a text file and then create another text file
by converting each line of the newly created text file into an uppercase
string:
void putdata()
{
cout<<name<<, roll:<<rollno<<has<<marks<<% marks
and<<grade<<grade.<<endl;
}
int getrno()
{
Return rollno;
}
}s1;
void main()
{
clrscr();
ofstream of(stu.dat,ios::app);
char ans=y;
while(ans==y)
{
s1.getdata();
of.write((char*) & s1,sizeof(s1));
cout<<Record added to file\n;
cout<<Want to enter more records(y/n)?;
cin>>ans;
}
of.close();
getch();
}
Bubble Sort:
#include<iostream.h>
#include<conio.h>
void main()
{
int i,a[10],t,j;
clrscr();
cout<<"Enter 10 elements=";
for(i=0;i<10;i++)
{
cin>>a[i];
}
for(i=1;i<10;i++)
{
for(j=0;j<10-i;j++)
{
if(a[j]<a[j+1])
{
t=a[j];
a[j]=a[j+1];
a[j+1]=t;
}
}
}
cout<<"Sorted array in descending order=";
for(i=0;i<10;i++)
{
cout<<a[i]<<"\n";
}
getch();
}
if(rear==-1)
{
front=rear=0;
q[rear]=num;
}
else if(rear==s-1)
{
cout<<Queue is full;
}
else
{
rear++;
q[rear]=num;
}
}
void delete_Q(int q[])
{
if(front==-1)
{
cout<<Queue is empty;
}
else
{
cout<<Elements deleted=<<q[front];
if(front==rear)
{
front=rear=-1;
}
else
{
front=front+1;
}
}
}
cin>>ch;
}
system(cls);
do
{
cout<<\n The Stack now is: \n;
Display(top);
system(pause);
cout<<Want to pop an element?(y/n);
cin>>ch;
if(ch==Y || ch==y)
Pop();
}
while(ch==y || ch==Y);
getch();
}
Node*Create_New_Node(int n)
{
ptr=new Node;
ptr -> info=n;
ptr -> next=NULL;
return ptr;
}
void Push(node*np)
{
If(top=NULL)
top=np;
else
{
save=top;
top=np;
np -> next=save;
}
}
void Pop()
{
If(top==NULL)
cout<<UNDERFLOW !!!\n;
else
{
ptr=top;
top=top -> next;
delete ptr;
}
}
void Display(Node*np)
{
while(np!=NULL)
{
cout<<np -> info<<->;
np=np -> next;
}
cout<<!!!\n;
}
Insertion in Queue:
#include<iostream.h>
#include<stdlib.h>
#include<process.h>
int Insert_in_Q(int [],int);
void Display(int [], int, int);
const int size=50;
int Queue[size], front=-1, rear=-1;
void main()
{
int Item,res;
char ch='y';
clrscr();
while(ch=='y' || ch=='Y')
{
cout<<"\nEnter item for insertion:";
cin>>Item;
res=Insert_in_Q(Queue,Item);
if(res==-1)
{
cout<<"OVERFLOW!!! Aborting!! \n";
exit(1);
}
cout<<"Now the Queue(Front.........to.........Rear)is:\n";
Display(Queue,front,rear);
cout<<"Want to insert more elements?(y/n)...";
cin>>ch;
}
getch();
}
int Insert_in_Q(int Queue[],int ele)
{
if(rear==size-1)
return-1;
else if(rear==-1)
{
front=rear=0;
Queue[rear]=ele;
}
else
{
rear++;
Queue[rear]=ele;
}
getch();
}
void Display(int Queue[], int front, int rear)
{
if(front==-1)
return;
for(int i=front;i<rear;i++)
cout<<Queue[i]<<"<-\t";
cout<<Queue[rear]<<endl;
}
Deletion in Array-Queue:
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<process.h>
int Remove(int []);
int Insert(int [],int);
void Display(int [],int,int);
const int size=50;
int Queue[size],front=-1,rear=-1;
void main()
{
int Item,res;
char ch='y';
clrscr();
while(ch=='y' || ch=='Y')
{
cout<<"\nEnter ITEM for insertion:";
cin>>Item;
res=Insert(Queue,Item);
if(res==-1)
{
cout<<"OVERFLOW!!! Aborting!! \n";
exit(1);
}
cout<<"\n Now the Queue(Front...to...Rear)is:\n";
Display(Queue,front,rear);
cout<<"\n Want to insert more elements?(y/n)...";
cin>>ch;
}
cout<<"Now the deletion of elements begin...(Press y for yes and n for no)\n";
cin>>ch;
while(ch=='y' || ch=='Y')
{
res=Remove(Queue);
if(res==-1)
{
cout<<"UNDERFLOW!!! Aborting!! \n";
exit(1);
}
else
{
cout<<"\nElements deleted is:"<<res<<endl;
cout<<"Now the Queue(Front....to....Rear)is:\n";
Display(Queue,front,rear);
}
cout<<"Want to delete more elements?(y/n)....";
cin>>ch;
}
getch();
}
int Insert(int Queue[],int ele)
{
if(rear==size-1)
return-1;
else if(rear==-1)
{
front=rear=0;
Queue[rear]=ele;
}
else
{
rear++;
Queue[rear]=ele;
}
getch();
}
}
}
void LINKLIST::insertatk(int j) // Function to insert the node at kth position
{
int i = 0;
NODE *newnode,*back;
newnode = new NODE;
cout<< "\nEnter the data value ";
cin>>newnode->bookno;
newnode->link = NULL;
temp = first;
while (i < (j-1))
{
back = temp;
temp = temp->link;
i++;
}
back->link = newnode;
newnode->link = temp;
}
void LINKLIST::display() //Function to display the link list
{
temp = first;
cout<< "\n The linked list is \n";
while (temp != NULL)
{
cout<< "\n"<<temp->bookno;
temp = temp->link;
}
getch();
}
void main()
{
int ch,n,k;
Output of the program for Addition and deletion of new books using linked
list
}
cout << "Second matrix is\n";
for (i=0; i<3; i++)
{
for (j=0; j<3; j++)
{
cout << b[i][j] << " ";
}
cout << "\n";
}
cout << "\nSum of two matrix is \n";
for (i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
cout << c[i][j] << " ";
}
cout << "\n";
}
return 0;
}
x.read();
x.calculate();
getch();
} //E N D
OF
MAIN
cout << "\n\tThe number of times "<< ch << " occur in " << a << " is "
<< count;
}
//M A I N P R O G R A M
void main()
{
strn x;
//DECLARATION OF OBJECT
clrscr();
cout << "\n\n\n\t ";
x.read();
//CALLING MEMBER FUNCTIONS
x.find();
getch();
} //E N D
OF
MAIN
};
void acadm::getacadm()
{
cout<<"\nEnter rollno: ";
cin>>rno;
cout<<"\nEnter marks: ";
cin>>marks;
}
void acadm::putacadm()
{
cout<<"\nThe rollno is: ";
cout<<rno;
cout<<"\nThe total marks: ";
cout<<marks;
}
class school:public admin,public acadm //Derived class
{
char house[15],sport[20];
public:
void get_school();
void put_school();
};
void school::get_school()
{
getadmin();
getacadm();
cout<<"\nEnter house: ";
gets(house);
cout<<"\nEnter sport: ";
gets(sport);
}
void school::put_school()
{
putadmin();
putacadm();
cout<<"\nYour house is: ";
cout<<house;
cout<<"\nYour sports is: ";
cout<<sport;
}
void main()
{
clrscr();
school obj[10];
int n,i,j;
cout<<"Enter the no of students:";
cin>>n;
cout<<"\nEnter student details:";
for(i=0;i<n;i++)
{
obj[i].get_school(); //Input Function
}
cout<<"\nThe student details are:";
for(i=0;i<n;i++)
{
obj[i].put_school(); //Output Function
}
getch();
}
flag = 'n';
break;
}
}
if(flag == 'n')
cout << " is not a palindrome ";
else
cout << " is a palindrome ";
}
void main()
{
strn x;
//DECLARATION OF OBJECT
clrscr();
cout << "\n\n\n\t ";
x.read();
//CALLING MEMBER FUNCTIONS
x.ch_pal();
cout << "\n\n\t\t bye!";
getch();
}
j++;
if (i != j)
{
cout << "\n\t Strings are not equal ";
return;
}
i = 0;
while ((*(a+i) != '\0') && (*(b+i) != '\0'))
{
if(*(a + i) != *( b + i))
{
flag = 'n';
break;
}
i++;
}
if(flag == 'n')
cout << "\n\tStrings are not equal ";
else
cout << "\n\tStrings are equal ";
}
//M A I N P R O G R A M
void main()
{
strn x;
//DECLARATION OF OBJECT
clrscr();
cout << "\n\n\n\t ";
x.read();
//CALLING MEMBER FUNCTIONS
x.compare();
cout << "\n\n\t\t bye!";
getch();
} //E N D O F M A I N
Output of the program to check whether the two strings are equal
or not:
TABLE: STUDENT
No:
Name
Stipend
Stream
Avgmark
Grade
Class
Karan
400.00
Medical
78.5
12B
Divakar
450.00
Commerce
89.2
11C
Divya
300.00
Commerce
68.6
12C
Arun
350.00
Humanities
73.1
12C
Sabina
500.00
Nonmedical
90.6
11A
John
400.00
Medical
75.4
12B
Robert
250.00
Humanities
64.4
11A
Rubina
450.00
Nonmedical
88.5
12A
Vikas
500.00
Nonmedical
92.0
12A
10
Mohan
300.00
Commerce
67.5
12C
OUTPUT:
NAME:
SABINA
RUBINA
VIKAS
2) List the names of those students who are in class 12 sorted by stipend
SELECT NAME, STIPEND FROM STUDENT
WHERE CLASS=12
ORDER BY STIPEND;
OUTPUT:
NAME
STIPEND
DIVYA
300.00
MOHAN
300.00
ARUN
350.00
KARAN
400.00
JOHN
400.00
RUBINA
450.00
VIKAS
500.00
ROBERT
MOHAN
DIVYA
ARUN
JOHN
KARAN
RUBINA
DIVAKAR
SABINA
VIKAS
4) To count the number of students with grade A
SELECT COUNT(GRADE)
FROM STUDENT
WHERE GRADE=A;
OUTPUT:
4
5) To insert a new student in the table anf fill the columns with some values
INSERT INTO STUDENT VALUES
(11,MANISHA,300.00,NONMEDICAL,72.5,B,12C);
OUTPUT:
ONE ROW ADDED
6) Give the output of the following SQL statement:
A) SELECT MIN(AVGMARK)
FROM STUDENT
WHERE AVGMARK<75;
OUTPUT:
64.4