Computer Science Manual 2nd
: m(itl] = mlil; m[p] = ele; nt+; cout<>n; cout<<"Enter the elements: "; for(int i=0; i>m[i]; cout<<"Enter the element to be inserted: cin>>ele; cout<<"Enter the position ( @ to “<>p; + void insertion: :insert() { if(p > n) {Il PUC MANUAL 12 + void insertion: :display() { cout<<"The array after the insertion is "; for(int i=0; icn; i++) cout< #include #include class deletion { void void private: int m[100], n, ele, p; public: void getdata(); void remove(); void display(); deletion: :getdata() cout<<"How many elements? "; cin>>n; cout<<"Enter the elements: "; for(int i=0; i>m[i]; cout<<"Enter the position (0 to "<>p; deletion: : remove () if(p > n-1) { cout< #include #include class sorting { private: int m[100], n; public: void getdata(); void sort(); void display(); cout<<"How many elements? "; cin>>n; cout<<"Enter the elements: "; for(int i=0; i>m[i]; } void sorting: :display() { cout<<"The array after sorting is "; for(int i=0; i=1) { if(m[j] #include #include class binarysearch Experiment No: 5 program to search for a given element in an array using Binary private: int m[100], n, ele, loc; public: void getdata(); void search(); void display(); binarysearch: :getdata() cout<<"How many elements? cin>>n; cout<<"Enter the elements: "; for(int i=0; i>m[i]; cout<<"Enter the search element: " cin>>ele; binarysearch: :display() if(loc >= 0) cout<<"Position= "< #include #include class interest Experiment No: 6 private: double p, t, r, si; public: void getdata(); void compute(); void putdata(); interest: :getdata() cout<<"Enter principle amount, time and rate"<>p>>t>>r; interes putdata() cout<<"Principle: “<0, print the real roots 3. If the discriminant<0, print that the roots are imaginary and exit the program #include #include #include #include class quadratic { private: double a,b,c,rl,r2; public: void getdata(); void roots(); void putdata(); yi void quadratic: :getdata() { cout<<"Enter the co-efficients: "; cin>>a>>b>>c; + void quadratic: :roots() { b*b-4*a*c; cout<<"Roots are equal"<0) {Il PUC MANUAL 22 cout<<"Roots are positive and different: "<>an if (ans = { 1) cout<<"Enter the side: "; cin>>x; cout<<"Area of the square = "<>x>>y; cout<<"Area of the rectangle = “<>x>>y>>z; cout< #include class assign private: int n; public: assign(int nn) { n = nn; int cube(); + inline int assign::cube() { return(n*n*n) ; void main() int n; cout<<"Enter the number: "; cin>>n; assign N =n; /IN is the object cout<<"Cube of "< #include class copy { int var, sum, term; public: double calculate(); copy(int temp, int x) { var = temp; term = x; + yi double copy::calculate() { int sum pe for(int i=l; i<=var; i++) { sum = sum + p; p =p * term; } return sum; + void main() { int n, ty clrser(); cout<<"Enter the base and the power(x and n): "; cin>>t>>n; copy obj(n,t); copy cpy = obj; cout<<"Sum of the series is "< #include #include class student { private: int rollno; char name[20]; public: void read() { cout<<"Enter the name: "; cin.getline(name, 20); cout<<"Enter Roll No: "; cin>>rollno; } void display() { cout<<"Roll no: "<< rollno <>m1>>m2; total= ml + m2; + void displayl() {Il PUC MANUAL 29 coute<"Subjectl = " #include #include class student private: int regno; char name[20]; float fees; public: void get(); void display(); student: :get() cout<<"Enter student name: "; cin.getline(name, 20); cout<<"Enter student register number: cin>>regno; cout<<"Enter student fees: "; cin>>fees; student: :display() cout<<"Student register number: "<get(); sp->display(); getch(); return 0; + Enter name: Harshith H R Enter Reg. No.: 1234 Enter student fees: 5000.75 Reg. No: 1234 Name: Harshith H R Fees: 5000.75 Enter student name: Shashikala S Enter student register number: 12345 Enter student fees: 5250 Student register number: 12345 Student name: Shashikala S$ Student fees: 5250 RUN RUN RUN1 PUC MANUAL { void Experiment No: 13 rite a program to perform push items into the stack. #include #include #include #define MAX 3 class Stack private: int A[MAX], top; public: Stack() { top = -1; void Push(int item); void print(); Stack::Push(int item) if(top == MAX-1) { cout<>choice; switch(choice) { case 1: { cout<<"Enter the item: "; cin>>itm; S.Push(itm) ; break; } case 2: { S.print(); break; + case 3: { cout<<"Thank you.. Visit again"; exit(0); } default: cout<<"Invalid choice"< #include #include #define MAX 3 class Stack private: int A[MAX], top; public: Stack() { top = -1; void Push(int item); void print(); void Pop(); + void Stack:: Push(int item) if(top == MAX-1) { cout<>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>itm; S.Push(itm) ; break; case 2:{ S.Pop(); break; case 3:{ S.print(); break; case 4:{ cout<<"Thank You... Visit again." exit(1);I PUC MANUAL 37 derautt: cout<<"\tInvalid choice... < prbnt stack ER tery yeur choices, 1 sorry, Stack is full | : Fine stack Eater ur choice, fou sbcedsSiutty popped Pent stack Ater your choice: 3 Lage conan 10 20 a Pas 0) Prine stack nteryour_ choice. 50 ge soecdssiuty popped oT ts 2 3 a E maw x1 nter your choice: 3I PUC MANUAL 38 Stack contains 10 . Ex Enter ur choice; To Pe 5 secdsSfutly popped ” pus + Pol : rent stack . x1" iter your choice: 2 Sorry, Stack is ‘empty ———_— oo oo oo #include #include #define QUEUE _SIZE 3 class Queue private: int q[QUEUE SIZE]; int front, rear; int count; public: Queue(); void enqueue(int x); void dequeue(); void getSize(); hi Queue: :Queue() { front = -1; rear = -1; count = 0; } void Queue::enqueue(int x) { if(rear == QUEUE_SIZE -1) { cout<<"\tSorry... Queue is full."< 0) cout<<"\tQueue contains "; for(int i=front; i<=rear; i++) cout<>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>item;Il PUC MANUAL ay T-enqueve(itmy; break; } case 2:{ Q.dequeue(); break; } case 3:{ Q.getSize(); break; + case 4:{ cout<<"Thank You... Visit again" exit(1); + default: cout<<"\tInvalid choice..."< #include class LinkList private: struct Node int data; Node* link; }*START; public: LinkList(); void Print(); //Prints the contents void Append(int num); //Adds a new node at the end void Count(); //Counts number of nodes ti LinkList::LinkList() START = NULL; // Prints the contents of linked list void LinkList::Print() if (START NULL) { cout<<"Linked list is empty"<data<<" tmp = tmp->link ; } 7/ Adds a new node at the end of the linked list void LinkList::Append(int num) Node *newNode; 43Il PUC MANUAL aad newNode = new Node; newNode->data = num; newNode->link = NULL; if(START == NULL) { //create first node START = newNode; cout<Link != NULL) tmp = tmp->Link; //add node to the end tmp->link = newNode; cout<lLink) cH; cout<Print(); obj->Append( 100) ; obj->Print(); obj->Count(); obj ->Append (208) ; obj->Print();I PUC MANUAL 45 obj->Count(); obj ->Append (309) ; obj->Print(); obj ->Count(); Linked 100 is Linked No. of 200 is Linked No. of 300 is Linked No. of list is empty inserted as the first node list contains 100 nodes in the linked list= 1 inserted list contains 100 200 nodes in the linked list= 2 inserted list contains 100 200 300 nodes in the linked lis 3 Change the actual arguments in the program and run againIl PUC MANUAL 46 SOL As: jent Experiment No 17 (Generate the Electricity Bill for one consumer {Create a table for house hold Electricity bill with the following fields Field name type RR_number Varchar2(10) consumer_name | varchar2(25) date_billing Date units number(4) Insert 10 records into the table Check the structure of table and note your observation: . Add two new fields to the table bill_amt number(6,2) + due_date date(8) 4. Compute the bill amount for each customer as per the following rules min_amt Rs.50 First 100 units Rs 4.50 / unit >100 units Rs 5.50 / unit 5. Compute due date as billing date+15 days. . List all the bills generated Rote: Verify the date format using sysdate command olution: Command to create a table Sql> create table elect_bill(RR_number varchar2(10),consumer_name archar2(25),date_billing date, units number(4)); ll. Command to add records into the table insert into elect_bill values('A1001','Manjunath’,’2/2/2014',34); |Add the data to the table as given below N ‘A1001 | Manjunath [12/2/2014 [34 ‘1098 | Reeta 14/2/2014 [128 | 1190 | Nithin 92/2014 [234 1234 | Vikas 14/2/2014 | 256 82345 | Parinitha | 13/2/2014 | 277 ‘1987 | Tarun vohra_| 23/2/2014 | 289 ‘82456 | Solanki 12/2/2014 | 178 (3459 | Patil SS 15/2/2014 | 176 83765 | Yashaswini_| 13/2/2014 | 160 ‘4790 | Lakshman Js [ 16/2/2014 | 299Il PUC MANUAL a7 Command to check the structure of a table dese elect_bill; ote: sql> commit; (Used to store all the permanently in the elect_bill table) 8. Command to add two new fields to the table Alter table elect_bill add{amount number(6,2), due_date date); /. Command to compute bill amount Update elect_bill set amount=50 ; Update elect_bill set amount=amount+ 100*4.50+(units-100)*5.50 where units>100; Update elect_bill set amount=amount+units*4.50 where units <=100; Update elect_bill set due_date=date_billing+15 ; 5. Command to view the bill statement Select * from elect_bill;Il PUC MANUAL 48 Experiment No 18 (Create a student database and compute the result. reate a table for a class of students with the following details name, type Student id numb er[4] student_name| varchar2[25] subl_marks | numb er{2] sub 2 marics numb er[2] subS marks | numb er{2] sub4_marks | numb er{2] sub 5S marics numb er[2] sub6_marks | numb er{2] 1. Add records into the table for 10 students for name,student_id,student_name and marks in 6 subjects using insert command. 2. Display the description of the fields in the table using dese command. 3. Alter the table and Calculate total and perc_marks. 4. Compute the result as “pass” or “fail” by checking if the student has scored more than 35 marks in each subject. 5. List the contents of the table. 6. Retrieve all the records of the table 7. Retrieve only student_id and student_name of all the students 8. List the students who have result as “pass” 9. List the students who have the result as “fail” 10. Count the number of students who have passed 11. Count the number of students who have failed 12. List the students who have percentage greater than 60 13. Sort the table according to the order of student_id. Solution: 1. Command to create a table Sql> create table student_master (student_id number(4),student_name archar2(25), subl_marks number(2),sub2_marks number(2),sub3_marks yumber(2),sub4_marks number(2),subS_marks number(2),sub6_marks umber(2)); 2. Command to add records into the table dd records using insert command as follows insert into student_master values(1124,’Anuthara’,67,82,86,90,56,78); insert into student_master values{1127,’Bhargavi’,56,69,78,34,52,59); insert into student_master values(1113,”Manjunath’,45,47,51,40,50,51); insert into student_master values(1121,’Bhavani’,28,36,45,34,37,39); te the rest of the rows similarly so that table contains the following dataIl PUC MANUAL 49 1124 |Anuthara 67 | 82 186 [90 156 178 1127 |Bhargavi 56 [69 [78 [34 [52/59 1115 | Manjunanth [45 [47 [51 [40 [50] 51 1121 |Bhavani 28 | 36 145 | 34 | 37 | 39 1122 | Preetham 34 | 56 | 68 | 79 | so | 96 1125 | Sanjay 78189 |] 90 196 195 |92 1129 [Kishan 68 [Fr [84 [69 [7o [79 1123 | Savyasachi [78/89 [86 [88 [90/85 1120 |Varun 56 [30 ]35 | 47 [55 | 54 1119 [Joseph 66 [69 ] 60] 70/81 | 59 2. Command to view the structure of the table Desc student_master; 8. Command to alter the table Add the following fields to the table using alter command total number(3) perc_marks | number(2) result varchar2(10) 4. Command to calculate total PDATE student_master SET tal-sub1_marks+tsub2_marks+sub3_marks+sub4_marks+subS_marks+sub6_mark: (where student_id>0); ‘optional {Command to calculate percentage PDATE student_master SET perc-total/6.0 WHERE student_id>0; }. Command to calculate result as pass UPDATE student_master SET result=’pass’ WHERE sub1_marks>=3 1ub2_marks>=35 and sub3_marks>=35 and sub_marks>=35 and uubS_marks>=35 and sub6_marks> ‘ommand to calculate result as fail UPDATE student_master SET result=’fail’ WHERE sub 1_marks<35 or sub2_marks<35 or sub3_marks<35 or sub_marks<35 or sub5_marks<35 or uub6_marks<35; . command to view the contents of the table ct * from student_master; 6. Command to retrieve all the records of the table elect * from student_master; andIl PUC MANUAL 50 4 Command to retrieve only student_id and student_name of all the btudents elect student_id,student_name from student_master; elect * from student_master where result=’pass’; . Command to list the students who have result as “fail” elect * from student_master where result="fail’; l10. Count the number of students who have passed elect count(*) from student_master where result="pass’; 11. Command to count the number of students who have failed elect count(*) from student_master where result=’fail’; 112. Count the number of students who have percentage more than 60 kelect * from student_master where perc>=60; 13. Command to sort the student list according to student_id ELECT * FROM student_master ORDER BY student_id; Fe Command to list the students who have result as “pass”Il PUC MANUAL St Experiment No: 19 (Generate the Employee details and compute the salary based on the lepartment. Create the following table employee field name [data type [description emp-id number(4) | employee’s id number dept-id number(2) __| department's id number emp-name_| varchar2(25) | employee name emp_salary | number(s) __ | salary of the employee reate another table department with the following structure field name [data type _| description deptid | mumber(2) | department's id number dept-name | varchar2(20) | department name supervisor | varchar2(20) | department head’s name Assume the department names as purchase(id-01),accounts(id-02),sales(id-03) nd apprentice(04). * Enter 10 rows of data for table employee and 4 rows of data for department table Write SQL statements for the following Find the names of all employees who work for the accounts department 2. How many employees work for accounts department? 3. What is the minimum, maximum and average salary of employees working for accounts department? 4. List the employees working for a particular supervisor. 5. Retrieve the department names for each department where only one employee works Increase the salary of all employees in the sales department by 15% Add a new column to the table employee, called Bonus number(5) and compute 5 % of the salary to the said field. 8. Delete all the rows for employees in the apprentice department noIl PUC MANUAL 52 Solution : Create a table Employee 1009 [01] Arun guptha [25000 1045 | 02 | Priya Rao 27500 1034 | 02 | Vanshidhar 23700 1067 | 03 | Anup kaul 36000 1058 | 04 | Hari Prasad 29000 1029 | 03 | Anil Goel 19350 1044 | 02 | Harsha shenoy | 52000 1030 | 03 | Surya 14500 1022 | 04 | Keerthi 37900 \create a table department 01 [Purchase _| Ameen 02 [Accounts _| Krishna reddy 03 | Sales ‘Tanveer FGC 04 | Apprentice | Ashish mehra 1. Command to find the names of all employees who work for the accounts department Select * from employee where dept-id=(select dept_id from department where dept-name=’Accounts); 2. Command to find the number of employees who work for the accounts department Select count(*) from employee where dept-id=(select dept-id from department where dept-name=Accounts’); 3. Command to find the minimum, maximum and average salary of employees who work for the accounts department Select min(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts); Select max(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts’); Select average(emp_salary) from employee where dept-id=(sclect dept- id from department where dept-name=’Accounts)); note:All of the above three commands can be combined into a single query 4. Command to list the employees working for a particular supervisor select * from employee where dept-id=(select dept-id from department where supervisor~Tanveer)};Il PUC MANUAL 83 Command to retrieve the department names for each department where only one employee works select dept-name from department where dept-id_in(select dept-id from employee group by dept-id having count(*)=1); Command to increase the salary of all employees in the sales department by 15% update employee set emp_salary~ emp_salary+emp_salary*0.15 where dept-id=(select dept-id from department where dept-name='sales’)) ; Command to add a new column to the table employee, called —Bonus number(5) and compute 5 % of the salary to the said field. alter table employee add bonus number(5); update employee set bonus=emp_salary*0.05; Command to delete all the rows for employees in the apprentice department delete from employee where dept-id=(select dept-id from department where dept-name-‘apprentice)};IL PUC MANUAL 54 — Experiment No 20 Create database for the bank transaction, _ SQL> create table customer(cno number(4) primary key, cname char(25), caddress varchar2(50), cphone char(12)); Table created. SQL> dese table customer Usage: DESCRIBE [user.]object[@db_link] SQL> desc customer Name Null? Type cNO NOT NULL NUMBER(4) CNAME CHAR(25) CADDRESS VARCHAR2(50) CPHONE CHAR(12) SQL> create table bank(accno number(8) not NULL, tramount number(8,2) check(tramount>0), trdate date , trtype char, cno number(4)); Table created. SQL> insert into customer values(100,’Anush’,'Churchstreet, Bangalore’,'25595235); SQL> insert into customer values(101,’Ganesh’,’M G Road, Bangalore’,’2559553'); SQL> insert into customer values(102,’Nagamani’,Jayalaksmi, Mysore’,’23343434'); SQL> insert into bank values(1300,23961.75,’01-mar-2014',’D’,100); SQL> insert into bank values(13101, 70000,'26-MAR-2014','C’, 100); SQL> insert into bank values(13102,2400,’21-Jan-2014',’C’,102); SQL> insert into bank values(13103,59681.25,'14-FEB-2014',’D’,103); SQL> select * from customer; CNO CNAME CADDRESS CPHONE 100 Anush Churchstreet, Bangalore 25595235 101 Ganesh MG Road, Bangalore 2559553 102 Nagamani Jayalaksmi, Mysore 23343434Il PUC MANUAL 88 SQL> select * from bank; ACCNO TRAMOUNTTRDATE T CNO 1300 23961.7501-MAR-14D 100 13101 70000 26-MAR-14C — 100 13102 2400 21-JAN-14C 102 13103 59681.25 14-FEB-14D 103 Lb sleet * fran custoner ~ rest oF Line ignored. known connand beginning “slect + Fr... bd 1D select * Fron custoner ENO CNAME [eRDDRESS PHONE 190 anus churcnstreet ,sangaiore 25595235 481 Ganesh WG Road, Bangalore 2550569 4162 Haganani dayalaksnitysore 2agnaaay Lb select * Fron bank; cena TRAMQUNT TRDATE = en 29961.75 O1-HAR-14 D 100 79008 26-MAR-1h C 100 13102 ac 192 43183 59681.25 14-FEB-14 D 168 SQL> select * From bank where trdate ="01-mar-2014" and trdate>* 61-nar-2614° 5 no rows selected SQL> select * from bank where trdate>="01-mar=2014" ; T 0 4300 29961.75 61-HAR-1h D 400 4311 7MAAN 76-MAR-1h 49a SQL> select * From bank where trdate ='O1-nar-2014' and trdate>' O1-mar-2014" ; no rows selected SQL> select * From bank where trdate>="61-nar-2014"; ACCNO TRAMOUNT TROATE = T ono -MAR-14 D 1 13164 70000 26-HAR-14 C 1 SQL> |Il PUC MANUAL 56 SQL> select accno,custoner.cno,cnane fron customer bank where custoner’.cno-bank.cno; ACCHO CHO CANE 1300 168 Anush sa10t 109 nus 13102 102 Haganani squ | SQL> select trtype, count(#) From bank group by trtype; T COUNT(#) c 2 D 2 SQL> select * fron custoner order by cnane dese; CHO CANE ‘CADDRESS PHONE 402 Haganani Jayalaksni tysore 29909494 401 Canesh MG Road, Bangalore 2559553 400 fnush Ghurchstreet Bangalore 25595295 SQL> update bank set tranount = 70000 where accno=13101 1 row updated. SQL> alter table custoner modify caddress char(50); Table altered. SQL> delete fron bank where accno=1300; 1 row deleted. SQL> create table tenpcust as (select # from custoner vhere cno detween 100 and 102); Table created. sal |Il PUC MANUAL ST SQL> create table tenpcust as (select * Fron custoner where cno between 100 and 102); Table created. SQL> select * Fron custoner were cnane Like “g's no rows selected SQL> select * Fron custoner where cnane Like ‘6% (CHO CHAE cADDRESS PHONE 101 Ganesh "1G Road, Bangalore 2559553 SQL? select sysdate fron dual; SYSDATE 6-aPR-1 SQL> select sun(tranount) fron bank; SUM(TRAHOUNT) 7 y92094.25 SQL? create view viewcust as select cno,cphone fron custoner; View created. say SQL> select * from custoner where cname Like "C2"; WO CNANE ‘cADDRESS. PHONE 161 Ganesh 1G Road, Bangalore 2550553, SQL> select sysdate fron dual; SYSDATE 5-APR-14 SQL> select sun(tranount) fron bank; SUNCTRAMOUNT) 182081.25 SQL> create view viewcust as select cno,cphone fron custoner; View created. SQL> select distinct(cno) Fron bank;I PUC MANUAL 58 SQL> create view viewcust as select cno,cphone Fron custoner; View created. SQL> select distinct(eno) Fron bank; SQL> select accno, count(+) From bank group by accno having count(*)>4; no rows selected SQL> select # Fron custoner where ephone=* MILL! no vous selected ‘SQL> delete From customer; 43 rows deleted. SQL> drop table bank; Table dropped.I PUC MANUAL 59 Experiment No 21 Write a HTML program to create a study time-table. MY STUDY TIME-TABLE FOR THE WEEK Beautiful Sunrise “ Month No of Classes held No of class attended “ JUNE 08 JULY 16 AUGUST 16 SEPTEMBER I PUC MANUAL 63 16 OCTOBER 08 NOVEMBER 16 DECEMBER 16 JANUARY 16 FEBRUARY 08 Total NO of DAYS 120 PERCENTAGE I PUC MANUAL oF “ ‘top"">* ‘Student_Name">Student Name *“ “ “ " Student_name" maxlengt etre“ “ Student ID *“ “ “" top" 'Father_name">Father Name * “ “ “ “ “ “ “etr>* Telephone Number College to contact “ “ “ “ “““ " Comments * “ ‘email">Email Address *“ “ “Il PUC MANUAL 65 7 “ “ ““"" " “ submit’ value="Submit"> ‘http://www. freecontactform.com/html_form.php"> HTML Form )* “ PeerRED CROSS Jean Henry Dunant of Switzerland established the international humanitarian service organisation “Red Cross” in Geneva. His birthday which falls on | May 8 is celebrated as “World Red Cross Day” | every Year. ol C { PRINCIPLES OF RED CROSS: a ! Jean Henry Dunant (1) Humanity (2) Impartiality (3) Neutrality (1828-1910) (4) Independence (5) Voluntary Service (6) Unity (1) Universality. Red Cross Society was established in India in the year 1920 under the Indian Red Cross Society Act (Parliament Act of XV 1920) and 1921 in Karnataka. ACTIVITIES OF RED CROSS: ‘The main activities of this organisation are treating the wounded soldiers, helping the needy, establishing blood banks, conducting blood donation camps, health programmes and blood grouping, helping the victims of floods, drought, earthquake, providing them drinking water, food, medicine, clothes, helping the differently abled people and conducting other useful activities to help the public. The Junior/ Youth Red Cross units in schools/colleges can also participate in these programmes. Red Cross examination is being conducted for high school students every year. AL the national level, the President of India is the President of Indian Red Cross Society and the Governor for State Unit. Deputy Commissioner for district and Tahasildar for taluk unit. Indian citizens can become the members and volunteers of Red Cross by paying prescribed fee. Chairman, Vice-Chairman, Hon. Treasurer (elected) and General Secre- tary administer the branches of this organisation. RED CROSS SYMBOL : As adopted in Geneva Convention of 1864, Red Cross in white background is used in India. This symbol should not be used by others, if used, itis a punishable. NOBEL PRIZES: Red Cross is the only organization in the world which has won Nobel Prize four times (including the founder of Red Cross). CONTACT THE FOLLOWING ADDRESS TO AVAIL SERVICES: Indian Red Cross Society, Karnataka State Branch, #26, Ist Floor, Red Cross Bhavan, Race Course Road, Bengaluru — 560001.NotesYou might also likeComputer Science Passing PackagePDF87% (23)Computer Science Passing Package69 pagesII Puc Maths MCQ (Part - A)PDF100% (3)II Puc Maths MCQ (Part - A)44 pagesI Puc Computer Science Lab Manual 2024-2025 - With - FlowchartsPDF89% (9)I Puc Computer Science Lab Manual 2024-2025 - With - Flowcharts61 pagesA Sunny Morning - Comprehension II and IIIPDF100% (2)A Sunny Morning - Comprehension II and III7 pagesMCQs - II PUC 2023PDF0% (1)MCQs - II PUC 202352 pages2nd PUC English 1 Marks IMPPDF100% (5)2nd PUC English 1 Marks IMP25 pages2nd PU Maths HandbookPDF100% (3)2nd PU Maths Handbook144 pages2nd PUC English - 150 Pages (2nd Time)PDF100% (2)2nd PUC English - 150 Pages (2nd Time)150 pagesCS Important Questions For II PUCPDF81% (32)CS Important Questions For II PUC10 pages2nd PUC Computer Science Passing PackagePDF0% (1)2nd PUC Computer Science Passing Package50 pages2 PUC English Exam PASSING PACKAGEPDF91% (78)2 PUC English Exam PASSING PACKAGE41 pagesChapter 4 Data Structure PDFPDF100% (1)Chapter 4 Data Structure PDF26 pages2nd Puc Lab Manual Dudda PDFPDF100% (3)2nd Puc Lab Manual Dudda PDF56 pages2nd PUC Computer Lab Manual-2023PDFNo ratings yet2nd PUC Computer Lab Manual-2023101 pagesComputer Science Manual For 2nd PUC, Karnataka BoardPDF83% (98)Computer Science Manual For 2nd PUC, Karnataka Board48 pagesViva Questions II Cs LabPDF100% (2)Viva Questions II Cs Lab10 pages2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer SciencePDF100% (2)2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer Science9 pages2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer SciencePDF80% (5)2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer Science20 pages2 PUC C++ ProgramsPDF100% (1)2 PUC C++ Programs5 pagesII PU CS All District Preparatory QPs 2024PDF100% (1)II PU CS All District Preparatory QPs 202433 pagesChapter 7 Classes and ObjectsPDFNo ratings yetChapter 7 Classes and Objects19 pagesII Puc English Passing PackagePDF100% (5)II Puc English Passing Package23 pages2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer SciencePDF67% (3)2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer Science11 pages2nd PUC Computer Science Super ImportantPDF100% (1)2nd PUC Computer Science Super Important16 pagesII PUC English Hand BookPDF83% (6)II PUC English Hand Book10 pagesIi Puc Accountancy Theory Package For 2022-23PDF100% (1)Ii Puc Accountancy Theory Package For 2022-2311 pagesEnglish HB-2024-25-FINALPDFNo ratings yetEnglish HB-2024-25-FINAL120 pagesChapter 10 Inheritance PDFPDF100% (3)Chapter 10 Inheritance PDF13 pagesKarnataka I PUC Computer Science Sample Question Paper 1 PDFPDFNo ratings yetKarnataka I PUC Computer Science Sample Question Paper 1 PDF2 pages2nd Puc English Mcqs 2022-23PDF0% (1)2nd Puc English Mcqs 2022-2383 pagesPhysics Passing Package Notes 2021PDF80% (5)Physics Passing Package Notes 202131 pagesChapter 17 Web Designing1 PDFPDF100% (2)Chapter 17 Web Designing1 PDF15 pagesII Puc Chemistry Important Question and Answer For Midterm Exam 2021PDF100% (1)II Puc Chemistry Important Question and Answer For Midterm Exam 202129 pagesII PU English Question Bank 2025 FinalPDF100% (8)II PU English Question Bank 2025 Final68 pagesChapter 4 QueuePDF100% (1)Chapter 4 Queue34 pages2nd PUC Physics Previose Year QsPDF100% (5)2nd PUC Physics Previose Year Qs52 pagesChapter 8 Function Overloading PDFPDF100% (1)Chapter 8 Function Overloading PDF6 pages2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. SheikhPDF67% (3)2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. Sheikh10 pagesI Believe That Books ...... DisappearPDF100% (2)I Believe That Books ...... Disappear6 pagesCollection of District Question Paper PreparatoryPDFNo ratings yetCollection of District Question Paper Preparatory26 pages2nd Puc-Physics-Most Imp ProblemsPDF88% (16)2nd Puc-Physics-Most Imp Problems6 pagesIi Puc English Summaries 2023-24PDFNo ratings yetIi Puc English Summaries 2023-2410 pagesMath 2nd Puc Imp QuestionsPDFNo ratings yetMath 2nd Puc Imp Questions11 pagesReported Speech With AnswersPDF100% (2)Reported Speech With Answers4 pagesVikas Booklet English II 2017 PDFPDF76% (105)Vikas Booklet English II 2017 PDF296 pagesEnglish Points - Roopa BhatPDF50% (2)English Points - Roopa Bhat26 pagesBUSINESS STUDIES PUC 2nd YEAR QUESTION BANKPDF100% (4)BUSINESS STUDIES PUC 2nd YEAR QUESTION BANK25 pagesChemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 1PDF100% (2)Chemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 15 pagesII PUC-Previous Year PUC Board Question PapersPDFNo ratings yetII PUC-Previous Year PUC Board Question Papers27 pagesFast Food AddictionPDFNo ratings yetFast Food Addiction2 pagesII PUC Labprograms NEWPDFNo ratings yetII PUC Labprograms NEW61 pagesII Pu Practical PDFPDFNo ratings yetII Pu Practical PDF51 pages2 - PUC - Lab - ManualN - GKSir (2024)PDFNo ratings yet2 - PUC - Lab - ManualN - GKSir (2024)78 pagesIi Puc Computer Science Lab Manual Page 1 of 88PDF100% (1)Ii Puc Computer Science Lab Manual Page 1 of 8888 pagesCerto FicatePDFNo ratings yetCerto Ficate56 pagesC.S ManualPDFNo ratings yetC.S Manual38 pagesIi Puc Annual Practical Exam Feb - 2025 Reference PaperPDFNo ratings yetIi Puc Annual Practical Exam Feb - 2025 Reference Paper8 pages2nd Puc Lab Manual Dudda - RemovedPDFNo ratings yet2nd Puc Lab Manual Dudda - Removed19 pages2puc Lab ProgramsPDFNo ratings yet2puc Lab Programs65 pages2nd-Puc-Lab-Manual-Section B and C-1PDFNo ratings yet2nd-Puc-Lab-Manual-Section B and C-113 pagesWeb Notes by Nandan U3PDFNo ratings yetWeb Notes by Nandan U314 pagesSwathi RB Tittle and CertificatesPDFNo ratings yetSwathi RB Tittle and Certificates10 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesComplete CSE Software Projects List For CsePDFNo ratings yetComplete CSE Software Projects List For Cse13 pagesGrievance Handling System AbstractPDFNo ratings yetGrievance Handling System Abstract3 pages
#include #include class sorting { private: int m[100], n; public: void getdata(); void sort(); void display(); cout<<"How many elements? "; cin>>n; cout<<"Enter the elements: "; for(int i=0; i>m[i]; } void sorting: :display() { cout<<"The array after sorting is "; for(int i=0; i=1) { if(m[j] #include #include class binarysearch Experiment No: 5 program to search for a given element in an array using Binary private: int m[100], n, ele, loc; public: void getdata(); void search(); void display(); binarysearch: :getdata() cout<<"How many elements? cin>>n; cout<<"Enter the elements: "; for(int i=0; i>m[i]; cout<<"Enter the search element: " cin>>ele; binarysearch: :display() if(loc >= 0) cout<<"Position= "< #include #include class interest Experiment No: 6 private: double p, t, r, si; public: void getdata(); void compute(); void putdata(); interest: :getdata() cout<<"Enter principle amount, time and rate"<>p>>t>>r; interes putdata() cout<<"Principle: “<0, print the real roots 3. If the discriminant<0, print that the roots are imaginary and exit the program #include #include #include #include class quadratic { private: double a,b,c,rl,r2; public: void getdata(); void roots(); void putdata(); yi void quadratic: :getdata() { cout<<"Enter the co-efficients: "; cin>>a>>b>>c; + void quadratic: :roots() { b*b-4*a*c; cout<<"Roots are equal"<0) {Il PUC MANUAL 22 cout<<"Roots are positive and different: "<>an if (ans = { 1) cout<<"Enter the side: "; cin>>x; cout<<"Area of the square = "<>x>>y; cout<<"Area of the rectangle = “<>x>>y>>z; cout< #include class assign private: int n; public: assign(int nn) { n = nn; int cube(); + inline int assign::cube() { return(n*n*n) ; void main() int n; cout<<"Enter the number: "; cin>>n; assign N =n; /IN is the object cout<<"Cube of "< #include class copy { int var, sum, term; public: double calculate(); copy(int temp, int x) { var = temp; term = x; + yi double copy::calculate() { int sum pe for(int i=l; i<=var; i++) { sum = sum + p; p =p * term; } return sum; + void main() { int n, ty clrser(); cout<<"Enter the base and the power(x and n): "; cin>>t>>n; copy obj(n,t); copy cpy = obj; cout<<"Sum of the series is "< #include #include class student { private: int rollno; char name[20]; public: void read() { cout<<"Enter the name: "; cin.getline(name, 20); cout<<"Enter Roll No: "; cin>>rollno; } void display() { cout<<"Roll no: "<< rollno <>m1>>m2; total= ml + m2; + void displayl() {Il PUC MANUAL 29 coute<"Subjectl = " #include #include class student private: int regno; char name[20]; float fees; public: void get(); void display(); student: :get() cout<<"Enter student name: "; cin.getline(name, 20); cout<<"Enter student register number: cin>>regno; cout<<"Enter student fees: "; cin>>fees; student: :display() cout<<"Student register number: "<get(); sp->display(); getch(); return 0; + Enter name: Harshith H R Enter Reg. No.: 1234 Enter student fees: 5000.75 Reg. No: 1234 Name: Harshith H R Fees: 5000.75 Enter student name: Shashikala S Enter student register number: 12345 Enter student fees: 5250 Student register number: 12345 Student name: Shashikala S$ Student fees: 5250 RUN RUN RUN1 PUC MANUAL { void Experiment No: 13 rite a program to perform push items into the stack. #include #include #include #define MAX 3 class Stack private: int A[MAX], top; public: Stack() { top = -1; void Push(int item); void print(); Stack::Push(int item) if(top == MAX-1) { cout<>choice; switch(choice) { case 1: { cout<<"Enter the item: "; cin>>itm; S.Push(itm) ; break; } case 2: { S.print(); break; + case 3: { cout<<"Thank you.. Visit again"; exit(0); } default: cout<<"Invalid choice"< #include #include #define MAX 3 class Stack private: int A[MAX], top; public: Stack() { top = -1; void Push(int item); void print(); void Pop(); + void Stack:: Push(int item) if(top == MAX-1) { cout<>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>itm; S.Push(itm) ; break; case 2:{ S.Pop(); break; case 3:{ S.print(); break; case 4:{ cout<<"Thank You... Visit again." exit(1);I PUC MANUAL 37 derautt: cout<<"\tInvalid choice... < prbnt stack ER tery yeur choices, 1 sorry, Stack is full | : Fine stack Eater ur choice, fou sbcedsSiutty popped Pent stack Ater your choice: 3 Lage conan 10 20 a Pas 0) Prine stack nteryour_ choice. 50 ge soecdssiuty popped oT ts 2 3 a E maw x1 nter your choice: 3I PUC MANUAL 38 Stack contains 10 . Ex Enter ur choice; To Pe 5 secdsSfutly popped ” pus + Pol : rent stack . x1" iter your choice: 2 Sorry, Stack is ‘empty ———_— oo oo oo #include #include #define QUEUE _SIZE 3 class Queue private: int q[QUEUE SIZE]; int front, rear; int count; public: Queue(); void enqueue(int x); void dequeue(); void getSize(); hi Queue: :Queue() { front = -1; rear = -1; count = 0; } void Queue::enqueue(int x) { if(rear == QUEUE_SIZE -1) { cout<<"\tSorry... Queue is full."< 0) cout<<"\tQueue contains "; for(int i=front; i<=rear; i++) cout<>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>item;Il PUC MANUAL ay T-enqueve(itmy; break; } case 2:{ Q.dequeue(); break; } case 3:{ Q.getSize(); break; + case 4:{ cout<<"Thank You... Visit again" exit(1); + default: cout<<"\tInvalid choice..."< #include class LinkList private: struct Node int data; Node* link; }*START; public: LinkList(); void Print(); //Prints the contents void Append(int num); //Adds a new node at the end void Count(); //Counts number of nodes ti LinkList::LinkList() START = NULL; // Prints the contents of linked list void LinkList::Print() if (START NULL) { cout<<"Linked list is empty"<data<<" tmp = tmp->link ; } 7/ Adds a new node at the end of the linked list void LinkList::Append(int num) Node *newNode; 43Il PUC MANUAL aad newNode = new Node; newNode->data = num; newNode->link = NULL; if(START == NULL) { //create first node START = newNode; cout<Link != NULL) tmp = tmp->Link; //add node to the end tmp->link = newNode; cout<lLink) cH; cout<Print(); obj->Append( 100) ; obj->Print(); obj->Count(); obj ->Append (208) ; obj->Print();I PUC MANUAL 45 obj->Count(); obj ->Append (309) ; obj->Print(); obj ->Count(); Linked 100 is Linked No. of 200 is Linked No. of 300 is Linked No. of list is empty inserted as the first node list contains 100 nodes in the linked list= 1 inserted list contains 100 200 nodes in the linked list= 2 inserted list contains 100 200 300 nodes in the linked lis 3 Change the actual arguments in the program and run againIl PUC MANUAL 46 SOL As: jent Experiment No 17 (Generate the Electricity Bill for one consumer {Create a table for house hold Electricity bill with the following fields Field name type RR_number Varchar2(10) consumer_name | varchar2(25) date_billing Date units number(4) Insert 10 records into the table Check the structure of table and note your observation: . Add two new fields to the table bill_amt number(6,2) + due_date date(8) 4. Compute the bill amount for each customer as per the following rules min_amt Rs.50 First 100 units Rs 4.50 / unit >100 units Rs 5.50 / unit 5. Compute due date as billing date+15 days. . List all the bills generated Rote: Verify the date format using sysdate command olution: Command to create a table Sql> create table elect_bill(RR_number varchar2(10),consumer_name archar2(25),date_billing date, units number(4)); ll. Command to add records into the table insert into elect_bill values('A1001','Manjunath’,’2/2/2014',34); |Add the data to the table as given below N ‘A1001 | Manjunath [12/2/2014 [34 ‘1098 | Reeta 14/2/2014 [128 | 1190 | Nithin 92/2014 [234 1234 | Vikas 14/2/2014 | 256 82345 | Parinitha | 13/2/2014 | 277 ‘1987 | Tarun vohra_| 23/2/2014 | 289 ‘82456 | Solanki 12/2/2014 | 178 (3459 | Patil SS 15/2/2014 | 176 83765 | Yashaswini_| 13/2/2014 | 160 ‘4790 | Lakshman Js [ 16/2/2014 | 299Il PUC MANUAL a7 Command to check the structure of a table dese elect_bill; ote: sql> commit; (Used to store all the permanently in the elect_bill table) 8. Command to add two new fields to the table Alter table elect_bill add{amount number(6,2), due_date date); /. Command to compute bill amount Update elect_bill set amount=50 ; Update elect_bill set amount=amount+ 100*4.50+(units-100)*5.50 where units>100; Update elect_bill set amount=amount+units*4.50 where units <=100; Update elect_bill set due_date=date_billing+15 ; 5. Command to view the bill statement Select * from elect_bill;Il PUC MANUAL 48 Experiment No 18 (Create a student database and compute the result. reate a table for a class of students with the following details name, type Student id numb er[4] student_name| varchar2[25] subl_marks | numb er{2] sub 2 marics numb er[2] subS marks | numb er{2] sub4_marks | numb er{2] sub 5S marics numb er[2] sub6_marks | numb er{2] 1. Add records into the table for 10 students for name,student_id,student_name and marks in 6 subjects using insert command. 2. Display the description of the fields in the table using dese command. 3. Alter the table and Calculate total and perc_marks. 4. Compute the result as “pass” or “fail” by checking if the student has scored more than 35 marks in each subject. 5. List the contents of the table. 6. Retrieve all the records of the table 7. Retrieve only student_id and student_name of all the students 8. List the students who have result as “pass” 9. List the students who have the result as “fail” 10. Count the number of students who have passed 11. Count the number of students who have failed 12. List the students who have percentage greater than 60 13. Sort the table according to the order of student_id. Solution: 1. Command to create a table Sql> create table student_master (student_id number(4),student_name archar2(25), subl_marks number(2),sub2_marks number(2),sub3_marks yumber(2),sub4_marks number(2),subS_marks number(2),sub6_marks umber(2)); 2. Command to add records into the table dd records using insert command as follows insert into student_master values(1124,’Anuthara’,67,82,86,90,56,78); insert into student_master values{1127,’Bhargavi’,56,69,78,34,52,59); insert into student_master values(1113,”Manjunath’,45,47,51,40,50,51); insert into student_master values(1121,’Bhavani’,28,36,45,34,37,39); te the rest of the rows similarly so that table contains the following dataIl PUC MANUAL 49 1124 |Anuthara 67 | 82 186 [90 156 178 1127 |Bhargavi 56 [69 [78 [34 [52/59 1115 | Manjunanth [45 [47 [51 [40 [50] 51 1121 |Bhavani 28 | 36 145 | 34 | 37 | 39 1122 | Preetham 34 | 56 | 68 | 79 | so | 96 1125 | Sanjay 78189 |] 90 196 195 |92 1129 [Kishan 68 [Fr [84 [69 [7o [79 1123 | Savyasachi [78/89 [86 [88 [90/85 1120 |Varun 56 [30 ]35 | 47 [55 | 54 1119 [Joseph 66 [69 ] 60] 70/81 | 59 2. Command to view the structure of the table Desc student_master; 8. Command to alter the table Add the following fields to the table using alter command total number(3) perc_marks | number(2) result varchar2(10) 4. Command to calculate total PDATE student_master SET tal-sub1_marks+tsub2_marks+sub3_marks+sub4_marks+subS_marks+sub6_mark: (where student_id>0); ‘optional {Command to calculate percentage PDATE student_master SET perc-total/6.0 WHERE student_id>0; }. Command to calculate result as pass UPDATE student_master SET result=’pass’ WHERE sub1_marks>=3 1ub2_marks>=35 and sub3_marks>=35 and sub_marks>=35 and uubS_marks>=35 and sub6_marks> ‘ommand to calculate result as fail UPDATE student_master SET result=’fail’ WHERE sub 1_marks<35 or sub2_marks<35 or sub3_marks<35 or sub_marks<35 or sub5_marks<35 or uub6_marks<35; . command to view the contents of the table ct * from student_master; 6. Command to retrieve all the records of the table elect * from student_master; andIl PUC MANUAL 50 4 Command to retrieve only student_id and student_name of all the btudents elect student_id,student_name from student_master; elect * from student_master where result=’pass’; . Command to list the students who have result as “fail” elect * from student_master where result="fail’; l10. Count the number of students who have passed elect count(*) from student_master where result="pass’; 11. Command to count the number of students who have failed elect count(*) from student_master where result=’fail’; 112. Count the number of students who have percentage more than 60 kelect * from student_master where perc>=60; 13. Command to sort the student list according to student_id ELECT * FROM student_master ORDER BY student_id; Fe Command to list the students who have result as “pass”Il PUC MANUAL St Experiment No: 19 (Generate the Employee details and compute the salary based on the lepartment. Create the following table employee field name [data type [description emp-id number(4) | employee’s id number dept-id number(2) __| department's id number emp-name_| varchar2(25) | employee name emp_salary | number(s) __ | salary of the employee reate another table department with the following structure field name [data type _| description deptid | mumber(2) | department's id number dept-name | varchar2(20) | department name supervisor | varchar2(20) | department head’s name Assume the department names as purchase(id-01),accounts(id-02),sales(id-03) nd apprentice(04). * Enter 10 rows of data for table employee and 4 rows of data for department table Write SQL statements for the following Find the names of all employees who work for the accounts department 2. How many employees work for accounts department? 3. What is the minimum, maximum and average salary of employees working for accounts department? 4. List the employees working for a particular supervisor. 5. Retrieve the department names for each department where only one employee works Increase the salary of all employees in the sales department by 15% Add a new column to the table employee, called Bonus number(5) and compute 5 % of the salary to the said field. 8. Delete all the rows for employees in the apprentice department noIl PUC MANUAL 52 Solution : Create a table Employee 1009 [01] Arun guptha [25000 1045 | 02 | Priya Rao 27500 1034 | 02 | Vanshidhar 23700 1067 | 03 | Anup kaul 36000 1058 | 04 | Hari Prasad 29000 1029 | 03 | Anil Goel 19350 1044 | 02 | Harsha shenoy | 52000 1030 | 03 | Surya 14500 1022 | 04 | Keerthi 37900 \create a table department 01 [Purchase _| Ameen 02 [Accounts _| Krishna reddy 03 | Sales ‘Tanveer FGC 04 | Apprentice | Ashish mehra 1. Command to find the names of all employees who work for the accounts department Select * from employee where dept-id=(select dept_id from department where dept-name=’Accounts); 2. Command to find the number of employees who work for the accounts department Select count(*) from employee where dept-id=(select dept-id from department where dept-name=Accounts’); 3. Command to find the minimum, maximum and average salary of employees who work for the accounts department Select min(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts); Select max(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts’); Select average(emp_salary) from employee where dept-id=(sclect dept- id from department where dept-name=’Accounts)); note:All of the above three commands can be combined into a single query 4. Command to list the employees working for a particular supervisor select * from employee where dept-id=(select dept-id from department where supervisor~Tanveer)};Il PUC MANUAL 83 Command to retrieve the department names for each department where only one employee works select dept-name from department where dept-id_in(select dept-id from employee group by dept-id having count(*)=1); Command to increase the salary of all employees in the sales department by 15% update employee set emp_salary~ emp_salary+emp_salary*0.15 where dept-id=(select dept-id from department where dept-name='sales’)) ; Command to add a new column to the table employee, called —Bonus number(5) and compute 5 % of the salary to the said field. alter table employee add bonus number(5); update employee set bonus=emp_salary*0.05; Command to delete all the rows for employees in the apprentice department delete from employee where dept-id=(select dept-id from department where dept-name-‘apprentice)};IL PUC MANUAL 54 — Experiment No 20 Create database for the bank transaction, _ SQL> create table customer(cno number(4) primary key, cname char(25), caddress varchar2(50), cphone char(12)); Table created. SQL> dese table customer Usage: DESCRIBE [user.]object[@db_link] SQL> desc customer Name Null? Type cNO NOT NULL NUMBER(4) CNAME CHAR(25) CADDRESS VARCHAR2(50) CPHONE CHAR(12) SQL> create table bank(accno number(8) not NULL, tramount number(8,2) check(tramount>0), trdate date , trtype char, cno number(4)); Table created. SQL> insert into customer values(100,’Anush’,'Churchstreet, Bangalore’,'25595235); SQL> insert into customer values(101,’Ganesh’,’M G Road, Bangalore’,’2559553'); SQL> insert into customer values(102,’Nagamani’,Jayalaksmi, Mysore’,’23343434'); SQL> insert into bank values(1300,23961.75,’01-mar-2014',’D’,100); SQL> insert into bank values(13101, 70000,'26-MAR-2014','C’, 100); SQL> insert into bank values(13102,2400,’21-Jan-2014',’C’,102); SQL> insert into bank values(13103,59681.25,'14-FEB-2014',’D’,103); SQL> select * from customer; CNO CNAME CADDRESS CPHONE 100 Anush Churchstreet, Bangalore 25595235 101 Ganesh MG Road, Bangalore 2559553 102 Nagamani Jayalaksmi, Mysore 23343434Il PUC MANUAL 88 SQL> select * from bank; ACCNO TRAMOUNTTRDATE T CNO 1300 23961.7501-MAR-14D 100 13101 70000 26-MAR-14C — 100 13102 2400 21-JAN-14C 102 13103 59681.25 14-FEB-14D 103 Lb sleet * fran custoner ~ rest oF Line ignored. known connand beginning “slect + Fr... bd 1D select * Fron custoner ENO CNAME [eRDDRESS PHONE 190 anus churcnstreet ,sangaiore 25595235 481 Ganesh WG Road, Bangalore 2550569 4162 Haganani dayalaksnitysore 2agnaaay Lb select * Fron bank; cena TRAMQUNT TRDATE = en 29961.75 O1-HAR-14 D 100 79008 26-MAR-1h C 100 13102 ac 192 43183 59681.25 14-FEB-14 D 168 SQL> select * From bank where trdate ="01-mar-2014" and trdate>* 61-nar-2614° 5 no rows selected SQL> select * from bank where trdate>="01-mar=2014" ; T 0 4300 29961.75 61-HAR-1h D 400 4311 7MAAN 76-MAR-1h 49a SQL> select * From bank where trdate ='O1-nar-2014' and trdate>' O1-mar-2014" ; no rows selected SQL> select * From bank where trdate>="61-nar-2014"; ACCNO TRAMOUNT TROATE = T ono -MAR-14 D 1 13164 70000 26-HAR-14 C 1 SQL> |Il PUC MANUAL 56 SQL> select accno,custoner.cno,cnane fron customer bank where custoner’.cno-bank.cno; ACCHO CHO CANE 1300 168 Anush sa10t 109 nus 13102 102 Haganani squ | SQL> select trtype, count(#) From bank group by trtype; T COUNT(#) c 2 D 2 SQL> select * fron custoner order by cnane dese; CHO CANE ‘CADDRESS PHONE 402 Haganani Jayalaksni tysore 29909494 401 Canesh MG Road, Bangalore 2559553 400 fnush Ghurchstreet Bangalore 25595295 SQL> update bank set tranount = 70000 where accno=13101 1 row updated. SQL> alter table custoner modify caddress char(50); Table altered. SQL> delete fron bank where accno=1300; 1 row deleted. SQL> create table tenpcust as (select # from custoner vhere cno detween 100 and 102); Table created. sal |Il PUC MANUAL ST SQL> create table tenpcust as (select * Fron custoner where cno between 100 and 102); Table created. SQL> select * Fron custoner were cnane Like “g's no rows selected SQL> select * Fron custoner where cnane Like ‘6% (CHO CHAE cADDRESS PHONE 101 Ganesh "1G Road, Bangalore 2559553 SQL? select sysdate fron dual; SYSDATE 6-aPR-1 SQL> select sun(tranount) fron bank; SUM(TRAHOUNT) 7 y92094.25 SQL? create view viewcust as select cno,cphone fron custoner; View created. say SQL> select * from custoner where cname Like "C2"; WO CNANE ‘cADDRESS. PHONE 161 Ganesh 1G Road, Bangalore 2550553, SQL> select sysdate fron dual; SYSDATE 5-APR-14 SQL> select sun(tranount) fron bank; SUNCTRAMOUNT) 182081.25 SQL> create view viewcust as select cno,cphone fron custoner; View created. SQL> select distinct(cno) Fron bank;I PUC MANUAL 58 SQL> create view viewcust as select cno,cphone Fron custoner; View created. SQL> select distinct(eno) Fron bank; SQL> select accno, count(+) From bank group by accno having count(*)>4; no rows selected SQL> select # Fron custoner where ephone=* MILL! no vous selected ‘SQL> delete From customer; 43 rows deleted. SQL> drop table bank; Table dropped.I PUC MANUAL 59 Experiment No 21 Write a HTML program to create a study time-table. MY STUDY TIME-TABLE FOR THE WEEK Beautiful Sunrise “ Month No of Classes held No of class attended “ JUNE 08 JULY 16 AUGUST 16 SEPTEMBER I PUC MANUAL 63 16 OCTOBER 08 NOVEMBER 16 DECEMBER 16 JANUARY 16 FEBRUARY 08 Total NO of DAYS 120 PERCENTAGE I PUC MANUAL oF “ ‘top"">* ‘Student_Name">Student Name *“ “ “ " Student_name" maxlengt etre“ “ Student ID *“ “ “" top" 'Father_name">Father Name * “ “ “ “ “ “ “etr>* Telephone Number College to contact “ “ “ “ “““ " Comments * “ ‘email">Email Address *“ “ “Il PUC MANUAL 65 7 “ “ ““"" " “ submit’ value="Submit"> ‘http://www. freecontactform.com/html_form.php"> HTML Form )* “ PeerRED CROSS Jean Henry Dunant of Switzerland established the international humanitarian service organisation “Red Cross” in Geneva. His birthday which falls on | May 8 is celebrated as “World Red Cross Day” | every Year. ol C { PRINCIPLES OF RED CROSS: a ! Jean Henry Dunant (1) Humanity (2) Impartiality (3) Neutrality (1828-1910) (4) Independence (5) Voluntary Service (6) Unity (1) Universality. Red Cross Society was established in India in the year 1920 under the Indian Red Cross Society Act (Parliament Act of XV 1920) and 1921 in Karnataka. ACTIVITIES OF RED CROSS: ‘The main activities of this organisation are treating the wounded soldiers, helping the needy, establishing blood banks, conducting blood donation camps, health programmes and blood grouping, helping the victims of floods, drought, earthquake, providing them drinking water, food, medicine, clothes, helping the differently abled people and conducting other useful activities to help the public. The Junior/ Youth Red Cross units in schools/colleges can also participate in these programmes. Red Cross examination is being conducted for high school students every year. AL the national level, the President of India is the President of Indian Red Cross Society and the Governor for State Unit. Deputy Commissioner for district and Tahasildar for taluk unit. Indian citizens can become the members and volunteers of Red Cross by paying prescribed fee. Chairman, Vice-Chairman, Hon. Treasurer (elected) and General Secre- tary administer the branches of this organisation. RED CROSS SYMBOL : As adopted in Geneva Convention of 1864, Red Cross in white background is used in India. This symbol should not be used by others, if used, itis a punishable. NOBEL PRIZES: Red Cross is the only organization in the world which has won Nobel Prize four times (including the founder of Red Cross). CONTACT THE FOLLOWING ADDRESS TO AVAIL SERVICES: Indian Red Cross Society, Karnataka State Branch, #26, Ist Floor, Red Cross Bhavan, Race Course Road, Bengaluru — 560001.NotesYou might also likeComputer Science Passing PackagePDF87% (23)Computer Science Passing Package69 pagesII Puc Maths MCQ (Part - A)PDF100% (3)II Puc Maths MCQ (Part - A)44 pagesI Puc Computer Science Lab Manual 2024-2025 - With - FlowchartsPDF89% (9)I Puc Computer Science Lab Manual 2024-2025 - With - Flowcharts61 pagesA Sunny Morning - Comprehension II and IIIPDF100% (2)A Sunny Morning - Comprehension II and III7 pagesMCQs - II PUC 2023PDF0% (1)MCQs - II PUC 202352 pages2nd PUC English 1 Marks IMPPDF100% (5)2nd PUC English 1 Marks IMP25 pages2nd PU Maths HandbookPDF100% (3)2nd PU Maths Handbook144 pages2nd PUC English - 150 Pages (2nd Time)PDF100% (2)2nd PUC English - 150 Pages (2nd Time)150 pagesCS Important Questions For II PUCPDF81% (32)CS Important Questions For II PUC10 pages2nd PUC Computer Science Passing PackagePDF0% (1)2nd PUC Computer Science Passing Package50 pages2 PUC English Exam PASSING PACKAGEPDF91% (78)2 PUC English Exam PASSING PACKAGE41 pagesChapter 4 Data Structure PDFPDF100% (1)Chapter 4 Data Structure PDF26 pages2nd Puc Lab Manual Dudda PDFPDF100% (3)2nd Puc Lab Manual Dudda PDF56 pages2nd PUC Computer Lab Manual-2023PDFNo ratings yet2nd PUC Computer Lab Manual-2023101 pagesComputer Science Manual For 2nd PUC, Karnataka BoardPDF83% (98)Computer Science Manual For 2nd PUC, Karnataka Board48 pagesViva Questions II Cs LabPDF100% (2)Viva Questions II Cs Lab10 pages2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer SciencePDF100% (2)2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer Science9 pages2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer SciencePDF80% (5)2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer Science20 pages2 PUC C++ ProgramsPDF100% (1)2 PUC C++ Programs5 pagesII PU CS All District Preparatory QPs 2024PDF100% (1)II PU CS All District Preparatory QPs 202433 pagesChapter 7 Classes and ObjectsPDFNo ratings yetChapter 7 Classes and Objects19 pagesII Puc English Passing PackagePDF100% (5)II Puc English Passing Package23 pages2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer SciencePDF67% (3)2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer Science11 pages2nd PUC Computer Science Super ImportantPDF100% (1)2nd PUC Computer Science Super Important16 pagesII PUC English Hand BookPDF83% (6)II PUC English Hand Book10 pagesIi Puc Accountancy Theory Package For 2022-23PDF100% (1)Ii Puc Accountancy Theory Package For 2022-2311 pagesEnglish HB-2024-25-FINALPDFNo ratings yetEnglish HB-2024-25-FINAL120 pagesChapter 10 Inheritance PDFPDF100% (3)Chapter 10 Inheritance PDF13 pagesKarnataka I PUC Computer Science Sample Question Paper 1 PDFPDFNo ratings yetKarnataka I PUC Computer Science Sample Question Paper 1 PDF2 pages2nd Puc English Mcqs 2022-23PDF0% (1)2nd Puc English Mcqs 2022-2383 pagesPhysics Passing Package Notes 2021PDF80% (5)Physics Passing Package Notes 202131 pagesChapter 17 Web Designing1 PDFPDF100% (2)Chapter 17 Web Designing1 PDF15 pagesII Puc Chemistry Important Question and Answer For Midterm Exam 2021PDF100% (1)II Puc Chemistry Important Question and Answer For Midterm Exam 202129 pagesII PU English Question Bank 2025 FinalPDF100% (8)II PU English Question Bank 2025 Final68 pagesChapter 4 QueuePDF100% (1)Chapter 4 Queue34 pages2nd PUC Physics Previose Year QsPDF100% (5)2nd PUC Physics Previose Year Qs52 pagesChapter 8 Function Overloading PDFPDF100% (1)Chapter 8 Function Overloading PDF6 pages2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. SheikhPDF67% (3)2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. Sheikh10 pagesI Believe That Books ...... DisappearPDF100% (2)I Believe That Books ...... Disappear6 pagesCollection of District Question Paper PreparatoryPDFNo ratings yetCollection of District Question Paper Preparatory26 pages2nd Puc-Physics-Most Imp ProblemsPDF88% (16)2nd Puc-Physics-Most Imp Problems6 pagesIi Puc English Summaries 2023-24PDFNo ratings yetIi Puc English Summaries 2023-2410 pagesMath 2nd Puc Imp QuestionsPDFNo ratings yetMath 2nd Puc Imp Questions11 pagesReported Speech With AnswersPDF100% (2)Reported Speech With Answers4 pagesVikas Booklet English II 2017 PDFPDF76% (105)Vikas Booklet English II 2017 PDF296 pagesEnglish Points - Roopa BhatPDF50% (2)English Points - Roopa Bhat26 pagesBUSINESS STUDIES PUC 2nd YEAR QUESTION BANKPDF100% (4)BUSINESS STUDIES PUC 2nd YEAR QUESTION BANK25 pagesChemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 1PDF100% (2)Chemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 15 pagesII PUC-Previous Year PUC Board Question PapersPDFNo ratings yetII PUC-Previous Year PUC Board Question Papers27 pagesFast Food AddictionPDFNo ratings yetFast Food Addiction2 pagesII PUC Labprograms NEWPDFNo ratings yetII PUC Labprograms NEW61 pagesII Pu Practical PDFPDFNo ratings yetII Pu Practical PDF51 pages2 - PUC - Lab - ManualN - GKSir (2024)PDFNo ratings yet2 - PUC - Lab - ManualN - GKSir (2024)78 pagesIi Puc Computer Science Lab Manual Page 1 of 88PDF100% (1)Ii Puc Computer Science Lab Manual Page 1 of 8888 pagesCerto FicatePDFNo ratings yetCerto Ficate56 pagesC.S ManualPDFNo ratings yetC.S Manual38 pagesIi Puc Annual Practical Exam Feb - 2025 Reference PaperPDFNo ratings yetIi Puc Annual Practical Exam Feb - 2025 Reference Paper8 pages2nd Puc Lab Manual Dudda - RemovedPDFNo ratings yet2nd Puc Lab Manual Dudda - Removed19 pages2puc Lab ProgramsPDFNo ratings yet2puc Lab Programs65 pages2nd-Puc-Lab-Manual-Section B and C-1PDFNo ratings yet2nd-Puc-Lab-Manual-Section B and C-113 pagesWeb Notes by Nandan U3PDFNo ratings yetWeb Notes by Nandan U314 pagesSwathi RB Tittle and CertificatesPDFNo ratings yetSwathi RB Tittle and Certificates10 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesComplete CSE Software Projects List For CsePDFNo ratings yetComplete CSE Software Projects List For Cse13 pagesGrievance Handling System AbstractPDFNo ratings yetGrievance Handling System Abstract3 pages
0, print the real roots 3. If the discriminant<0, print that the roots are imaginary and exit the program #include #include #include #include class quadratic { private: double a,b,c,rl,r2; public: void getdata(); void roots(); void putdata(); yi void quadratic: :getdata() { cout<<"Enter the co-efficients: "; cin>>a>>b>>c; + void quadratic: :roots() { b*b-4*a*c; cout<<"Roots are equal"<0) {Il PUC MANUAL 22 cout<<"Roots are positive and different: "<>an if (ans = { 1) cout<<"Enter the side: "; cin>>x; cout<<"Area of the square = "<>x>>y; cout<<"Area of the rectangle = “<>x>>y>>z; cout< #include class assign private: int n; public: assign(int nn) { n = nn; int cube(); + inline int assign::cube() { return(n*n*n) ; void main() int n; cout<<"Enter the number: "; cin>>n; assign N =n; /IN is the object cout<<"Cube of "< #include class copy { int var, sum, term; public: double calculate(); copy(int temp, int x) { var = temp; term = x; + yi double copy::calculate() { int sum pe for(int i=l; i<=var; i++) { sum = sum + p; p =p * term; } return sum; + void main() { int n, ty clrser(); cout<<"Enter the base and the power(x and n): "; cin>>t>>n; copy obj(n,t); copy cpy = obj; cout<<"Sum of the series is "< #include #include class student { private: int rollno; char name[20]; public: void read() { cout<<"Enter the name: "; cin.getline(name, 20); cout<<"Enter Roll No: "; cin>>rollno; } void display() { cout<<"Roll no: "<< rollno <>m1>>m2; total= ml + m2; + void displayl() {Il PUC MANUAL 29 coute<"Subjectl = " #include #include class student private: int regno; char name[20]; float fees; public: void get(); void display(); student: :get() cout<<"Enter student name: "; cin.getline(name, 20); cout<<"Enter student register number: cin>>regno; cout<<"Enter student fees: "; cin>>fees; student: :display() cout<<"Student register number: "<get(); sp->display(); getch(); return 0; + Enter name: Harshith H R Enter Reg. No.: 1234 Enter student fees: 5000.75 Reg. No: 1234 Name: Harshith H R Fees: 5000.75 Enter student name: Shashikala S Enter student register number: 12345 Enter student fees: 5250 Student register number: 12345 Student name: Shashikala S$ Student fees: 5250 RUN RUN RUN1 PUC MANUAL { void Experiment No: 13 rite a program to perform push items into the stack. #include #include #include #define MAX 3 class Stack private: int A[MAX], top; public: Stack() { top = -1; void Push(int item); void print(); Stack::Push(int item) if(top == MAX-1) { cout<>choice; switch(choice) { case 1: { cout<<"Enter the item: "; cin>>itm; S.Push(itm) ; break; } case 2: { S.print(); break; + case 3: { cout<<"Thank you.. Visit again"; exit(0); } default: cout<<"Invalid choice"< #include #include #define MAX 3 class Stack private: int A[MAX], top; public: Stack() { top = -1; void Push(int item); void print(); void Pop(); + void Stack:: Push(int item) if(top == MAX-1) { cout<>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>itm; S.Push(itm) ; break; case 2:{ S.Pop(); break; case 3:{ S.print(); break; case 4:{ cout<<"Thank You... Visit again." exit(1);I PUC MANUAL 37 derautt: cout<<"\tInvalid choice... < prbnt stack ER tery yeur choices, 1 sorry, Stack is full | : Fine stack Eater ur choice, fou sbcedsSiutty popped Pent stack Ater your choice: 3 Lage conan 10 20 a Pas 0) Prine stack nteryour_ choice. 50 ge soecdssiuty popped oT ts 2 3 a E maw x1 nter your choice: 3I PUC MANUAL 38 Stack contains 10 . Ex Enter ur choice; To Pe 5 secdsSfutly popped ” pus + Pol : rent stack . x1" iter your choice: 2 Sorry, Stack is ‘empty ———_— oo oo oo #include #include #define QUEUE _SIZE 3 class Queue private: int q[QUEUE SIZE]; int front, rear; int count; public: Queue(); void enqueue(int x); void dequeue(); void getSize(); hi Queue: :Queue() { front = -1; rear = -1; count = 0; } void Queue::enqueue(int x) { if(rear == QUEUE_SIZE -1) { cout<<"\tSorry... Queue is full."< 0) cout<<"\tQueue contains "; for(int i=front; i<=rear; i++) cout<>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>item;Il PUC MANUAL ay T-enqueve(itmy; break; } case 2:{ Q.dequeue(); break; } case 3:{ Q.getSize(); break; + case 4:{ cout<<"Thank You... Visit again" exit(1); + default: cout<<"\tInvalid choice..."< #include class LinkList private: struct Node int data; Node* link; }*START; public: LinkList(); void Print(); //Prints the contents void Append(int num); //Adds a new node at the end void Count(); //Counts number of nodes ti LinkList::LinkList() START = NULL; // Prints the contents of linked list void LinkList::Print() if (START NULL) { cout<<"Linked list is empty"<data<<" tmp = tmp->link ; } 7/ Adds a new node at the end of the linked list void LinkList::Append(int num) Node *newNode; 43Il PUC MANUAL aad newNode = new Node; newNode->data = num; newNode->link = NULL; if(START == NULL) { //create first node START = newNode; cout<Link != NULL) tmp = tmp->Link; //add node to the end tmp->link = newNode; cout<lLink) cH; cout<Print(); obj->Append( 100) ; obj->Print(); obj->Count(); obj ->Append (208) ; obj->Print();I PUC MANUAL 45 obj->Count(); obj ->Append (309) ; obj->Print(); obj ->Count(); Linked 100 is Linked No. of 200 is Linked No. of 300 is Linked No. of list is empty inserted as the first node list contains 100 nodes in the linked list= 1 inserted list contains 100 200 nodes in the linked list= 2 inserted list contains 100 200 300 nodes in the linked lis 3 Change the actual arguments in the program and run againIl PUC MANUAL 46 SOL As: jent Experiment No 17 (Generate the Electricity Bill for one consumer {Create a table for house hold Electricity bill with the following fields Field name type RR_number Varchar2(10) consumer_name | varchar2(25) date_billing Date units number(4) Insert 10 records into the table Check the structure of table and note your observation: . Add two new fields to the table bill_amt number(6,2) + due_date date(8) 4. Compute the bill amount for each customer as per the following rules min_amt Rs.50 First 100 units Rs 4.50 / unit >100 units Rs 5.50 / unit 5. Compute due date as billing date+15 days. . List all the bills generated Rote: Verify the date format using sysdate command olution: Command to create a table Sql> create table elect_bill(RR_number varchar2(10),consumer_name archar2(25),date_billing date, units number(4)); ll. Command to add records into the table insert into elect_bill values('A1001','Manjunath’,’2/2/2014',34); |Add the data to the table as given below N ‘A1001 | Manjunath [12/2/2014 [34 ‘1098 | Reeta 14/2/2014 [128 | 1190 | Nithin 92/2014 [234 1234 | Vikas 14/2/2014 | 256 82345 | Parinitha | 13/2/2014 | 277 ‘1987 | Tarun vohra_| 23/2/2014 | 289 ‘82456 | Solanki 12/2/2014 | 178 (3459 | Patil SS 15/2/2014 | 176 83765 | Yashaswini_| 13/2/2014 | 160 ‘4790 | Lakshman Js [ 16/2/2014 | 299Il PUC MANUAL a7 Command to check the structure of a table dese elect_bill; ote: sql> commit; (Used to store all the permanently in the elect_bill table) 8. Command to add two new fields to the table Alter table elect_bill add{amount number(6,2), due_date date); /. Command to compute bill amount Update elect_bill set amount=50 ; Update elect_bill set amount=amount+ 100*4.50+(units-100)*5.50 where units>100; Update elect_bill set amount=amount+units*4.50 where units <=100; Update elect_bill set due_date=date_billing+15 ; 5. Command to view the bill statement Select * from elect_bill;Il PUC MANUAL 48 Experiment No 18 (Create a student database and compute the result. reate a table for a class of students with the following details name, type Student id numb er[4] student_name| varchar2[25] subl_marks | numb er{2] sub 2 marics numb er[2] subS marks | numb er{2] sub4_marks | numb er{2] sub 5S marics numb er[2] sub6_marks | numb er{2] 1. Add records into the table for 10 students for name,student_id,student_name and marks in 6 subjects using insert command. 2. Display the description of the fields in the table using dese command. 3. Alter the table and Calculate total and perc_marks. 4. Compute the result as “pass” or “fail” by checking if the student has scored more than 35 marks in each subject. 5. List the contents of the table. 6. Retrieve all the records of the table 7. Retrieve only student_id and student_name of all the students 8. List the students who have result as “pass” 9. List the students who have the result as “fail” 10. Count the number of students who have passed 11. Count the number of students who have failed 12. List the students who have percentage greater than 60 13. Sort the table according to the order of student_id. Solution: 1. Command to create a table Sql> create table student_master (student_id number(4),student_name archar2(25), subl_marks number(2),sub2_marks number(2),sub3_marks yumber(2),sub4_marks number(2),subS_marks number(2),sub6_marks umber(2)); 2. Command to add records into the table dd records using insert command as follows insert into student_master values(1124,’Anuthara’,67,82,86,90,56,78); insert into student_master values{1127,’Bhargavi’,56,69,78,34,52,59); insert into student_master values(1113,”Manjunath’,45,47,51,40,50,51); insert into student_master values(1121,’Bhavani’,28,36,45,34,37,39); te the rest of the rows similarly so that table contains the following dataIl PUC MANUAL 49 1124 |Anuthara 67 | 82 186 [90 156 178 1127 |Bhargavi 56 [69 [78 [34 [52/59 1115 | Manjunanth [45 [47 [51 [40 [50] 51 1121 |Bhavani 28 | 36 145 | 34 | 37 | 39 1122 | Preetham 34 | 56 | 68 | 79 | so | 96 1125 | Sanjay 78189 |] 90 196 195 |92 1129 [Kishan 68 [Fr [84 [69 [7o [79 1123 | Savyasachi [78/89 [86 [88 [90/85 1120 |Varun 56 [30 ]35 | 47 [55 | 54 1119 [Joseph 66 [69 ] 60] 70/81 | 59 2. Command to view the structure of the table Desc student_master; 8. Command to alter the table Add the following fields to the table using alter command total number(3) perc_marks | number(2) result varchar2(10) 4. Command to calculate total PDATE student_master SET tal-sub1_marks+tsub2_marks+sub3_marks+sub4_marks+subS_marks+sub6_mark: (where student_id>0); ‘optional {Command to calculate percentage PDATE student_master SET perc-total/6.0 WHERE student_id>0; }. Command to calculate result as pass UPDATE student_master SET result=’pass’ WHERE sub1_marks>=3 1ub2_marks>=35 and sub3_marks>=35 and sub_marks>=35 and uubS_marks>=35 and sub6_marks> ‘ommand to calculate result as fail UPDATE student_master SET result=’fail’ WHERE sub 1_marks<35 or sub2_marks<35 or sub3_marks<35 or sub_marks<35 or sub5_marks<35 or uub6_marks<35; . command to view the contents of the table ct * from student_master; 6. Command to retrieve all the records of the table elect * from student_master; andIl PUC MANUAL 50 4 Command to retrieve only student_id and student_name of all the btudents elect student_id,student_name from student_master; elect * from student_master where result=’pass’; . Command to list the students who have result as “fail” elect * from student_master where result="fail’; l10. Count the number of students who have passed elect count(*) from student_master where result="pass’; 11. Command to count the number of students who have failed elect count(*) from student_master where result=’fail’; 112. Count the number of students who have percentage more than 60 kelect * from student_master where perc>=60; 13. Command to sort the student list according to student_id ELECT * FROM student_master ORDER BY student_id; Fe Command to list the students who have result as “pass”Il PUC MANUAL St Experiment No: 19 (Generate the Employee details and compute the salary based on the lepartment. Create the following table employee field name [data type [description emp-id number(4) | employee’s id number dept-id number(2) __| department's id number emp-name_| varchar2(25) | employee name emp_salary | number(s) __ | salary of the employee reate another table department with the following structure field name [data type _| description deptid | mumber(2) | department's id number dept-name | varchar2(20) | department name supervisor | varchar2(20) | department head’s name Assume the department names as purchase(id-01),accounts(id-02),sales(id-03) nd apprentice(04). * Enter 10 rows of data for table employee and 4 rows of data for department table Write SQL statements for the following Find the names of all employees who work for the accounts department 2. How many employees work for accounts department? 3. What is the minimum, maximum and average salary of employees working for accounts department? 4. List the employees working for a particular supervisor. 5. Retrieve the department names for each department where only one employee works Increase the salary of all employees in the sales department by 15% Add a new column to the table employee, called Bonus number(5) and compute 5 % of the salary to the said field. 8. Delete all the rows for employees in the apprentice department noIl PUC MANUAL 52 Solution : Create a table Employee 1009 [01] Arun guptha [25000 1045 | 02 | Priya Rao 27500 1034 | 02 | Vanshidhar 23700 1067 | 03 | Anup kaul 36000 1058 | 04 | Hari Prasad 29000 1029 | 03 | Anil Goel 19350 1044 | 02 | Harsha shenoy | 52000 1030 | 03 | Surya 14500 1022 | 04 | Keerthi 37900 \create a table department 01 [Purchase _| Ameen 02 [Accounts _| Krishna reddy 03 | Sales ‘Tanveer FGC 04 | Apprentice | Ashish mehra 1. Command to find the names of all employees who work for the accounts department Select * from employee where dept-id=(select dept_id from department where dept-name=’Accounts); 2. Command to find the number of employees who work for the accounts department Select count(*) from employee where dept-id=(select dept-id from department where dept-name=Accounts’); 3. Command to find the minimum, maximum and average salary of employees who work for the accounts department Select min(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts); Select max(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts’); Select average(emp_salary) from employee where dept-id=(sclect dept- id from department where dept-name=’Accounts)); note:All of the above three commands can be combined into a single query 4. Command to list the employees working for a particular supervisor select * from employee where dept-id=(select dept-id from department where supervisor~Tanveer)};Il PUC MANUAL 83 Command to retrieve the department names for each department where only one employee works select dept-name from department where dept-id_in(select dept-id from employee group by dept-id having count(*)=1); Command to increase the salary of all employees in the sales department by 15% update employee set emp_salary~ emp_salary+emp_salary*0.15 where dept-id=(select dept-id from department where dept-name='sales’)) ; Command to add a new column to the table employee, called —Bonus number(5) and compute 5 % of the salary to the said field. alter table employee add bonus number(5); update employee set bonus=emp_salary*0.05; Command to delete all the rows for employees in the apprentice department delete from employee where dept-id=(select dept-id from department where dept-name-‘apprentice)};IL PUC MANUAL 54 — Experiment No 20 Create database for the bank transaction, _ SQL> create table customer(cno number(4) primary key, cname char(25), caddress varchar2(50), cphone char(12)); Table created. SQL> dese table customer Usage: DESCRIBE [user.]object[@db_link] SQL> desc customer Name Null? Type cNO NOT NULL NUMBER(4) CNAME CHAR(25) CADDRESS VARCHAR2(50) CPHONE CHAR(12) SQL> create table bank(accno number(8) not NULL, tramount number(8,2) check(tramount>0), trdate date , trtype char, cno number(4)); Table created. SQL> insert into customer values(100,’Anush’,'Churchstreet, Bangalore’,'25595235); SQL> insert into customer values(101,’Ganesh’,’M G Road, Bangalore’,’2559553'); SQL> insert into customer values(102,’Nagamani’,Jayalaksmi, Mysore’,’23343434'); SQL> insert into bank values(1300,23961.75,’01-mar-2014',’D’,100); SQL> insert into bank values(13101, 70000,'26-MAR-2014','C’, 100); SQL> insert into bank values(13102,2400,’21-Jan-2014',’C’,102); SQL> insert into bank values(13103,59681.25,'14-FEB-2014',’D’,103); SQL> select * from customer; CNO CNAME CADDRESS CPHONE 100 Anush Churchstreet, Bangalore 25595235 101 Ganesh MG Road, Bangalore 2559553 102 Nagamani Jayalaksmi, Mysore 23343434Il PUC MANUAL 88 SQL> select * from bank; ACCNO TRAMOUNTTRDATE T CNO 1300 23961.7501-MAR-14D 100 13101 70000 26-MAR-14C — 100 13102 2400 21-JAN-14C 102 13103 59681.25 14-FEB-14D 103 Lb sleet * fran custoner ~ rest oF Line ignored. known connand beginning “slect + Fr... bd 1D select * Fron custoner ENO CNAME [eRDDRESS PHONE 190 anus churcnstreet ,sangaiore 25595235 481 Ganesh WG Road, Bangalore 2550569 4162 Haganani dayalaksnitysore 2agnaaay Lb select * Fron bank; cena TRAMQUNT TRDATE = en 29961.75 O1-HAR-14 D 100 79008 26-MAR-1h C 100 13102 ac 192 43183 59681.25 14-FEB-14 D 168 SQL> select * From bank where trdate ="01-mar-2014" and trdate>* 61-nar-2614° 5 no rows selected SQL> select * from bank where trdate>="01-mar=2014" ; T 0 4300 29961.75 61-HAR-1h D 400 4311 7MAAN 76-MAR-1h 49a SQL> select * From bank where trdate ='O1-nar-2014' and trdate>' O1-mar-2014" ; no rows selected SQL> select * From bank where trdate>="61-nar-2014"; ACCNO TRAMOUNT TROATE = T ono -MAR-14 D 1 13164 70000 26-HAR-14 C 1 SQL> |Il PUC MANUAL 56 SQL> select accno,custoner.cno,cnane fron customer bank where custoner’.cno-bank.cno; ACCHO CHO CANE 1300 168 Anush sa10t 109 nus 13102 102 Haganani squ | SQL> select trtype, count(#) From bank group by trtype; T COUNT(#) c 2 D 2 SQL> select * fron custoner order by cnane dese; CHO CANE ‘CADDRESS PHONE 402 Haganani Jayalaksni tysore 29909494 401 Canesh MG Road, Bangalore 2559553 400 fnush Ghurchstreet Bangalore 25595295 SQL> update bank set tranount = 70000 where accno=13101 1 row updated. SQL> alter table custoner modify caddress char(50); Table altered. SQL> delete fron bank where accno=1300; 1 row deleted. SQL> create table tenpcust as (select # from custoner vhere cno detween 100 and 102); Table created. sal |Il PUC MANUAL ST SQL> create table tenpcust as (select * Fron custoner where cno between 100 and 102); Table created. SQL> select * Fron custoner were cnane Like “g's no rows selected SQL> select * Fron custoner where cnane Like ‘6% (CHO CHAE cADDRESS PHONE 101 Ganesh "1G Road, Bangalore 2559553 SQL? select sysdate fron dual; SYSDATE 6-aPR-1 SQL> select sun(tranount) fron bank; SUM(TRAHOUNT) 7 y92094.25 SQL? create view viewcust as select cno,cphone fron custoner; View created. say SQL> select * from custoner where cname Like "C2"; WO CNANE ‘cADDRESS. PHONE 161 Ganesh 1G Road, Bangalore 2550553, SQL> select sysdate fron dual; SYSDATE 5-APR-14 SQL> select sun(tranount) fron bank; SUNCTRAMOUNT) 182081.25 SQL> create view viewcust as select cno,cphone fron custoner; View created. SQL> select distinct(cno) Fron bank;I PUC MANUAL 58 SQL> create view viewcust as select cno,cphone Fron custoner; View created. SQL> select distinct(eno) Fron bank; SQL> select accno, count(+) From bank group by accno having count(*)>4; no rows selected SQL> select # Fron custoner where ephone=* MILL! no vous selected ‘SQL> delete From customer; 43 rows deleted. SQL> drop table bank; Table dropped.I PUC MANUAL 59 Experiment No 21 Write a HTML program to create a study time-table. MY STUDY TIME-TABLE FOR THE WEEK Beautiful Sunrise “ Month No of Classes held No of class attended “ JUNE 08 JULY 16 AUGUST 16 SEPTEMBER I PUC MANUAL 63 16 OCTOBER 08 NOVEMBER 16 DECEMBER 16 JANUARY 16 FEBRUARY 08 Total NO of DAYS 120 PERCENTAGE I PUC MANUAL oF “ ‘top"">* ‘Student_Name">Student Name *“ “ “ " Student_name" maxlengt etre“ “ Student ID *“ “ “" top" 'Father_name">Father Name * “ “ “ “ “ “ “etr>* Telephone Number College to contact “ “ “ “ “““ " Comments * “ ‘email">Email Address *“ “ “Il PUC MANUAL 65 7 “ “ ““"" " “ submit’ value="Submit"> ‘http://www. freecontactform.com/html_form.php"> HTML Form )* “ PeerRED CROSS Jean Henry Dunant of Switzerland established the international humanitarian service organisation “Red Cross” in Geneva. His birthday which falls on | May 8 is celebrated as “World Red Cross Day” | every Year. ol C { PRINCIPLES OF RED CROSS: a ! Jean Henry Dunant (1) Humanity (2) Impartiality (3) Neutrality (1828-1910) (4) Independence (5) Voluntary Service (6) Unity (1) Universality. Red Cross Society was established in India in the year 1920 under the Indian Red Cross Society Act (Parliament Act of XV 1920) and 1921 in Karnataka. ACTIVITIES OF RED CROSS: ‘The main activities of this organisation are treating the wounded soldiers, helping the needy, establishing blood banks, conducting blood donation camps, health programmes and blood grouping, helping the victims of floods, drought, earthquake, providing them drinking water, food, medicine, clothes, helping the differently abled people and conducting other useful activities to help the public. The Junior/ Youth Red Cross units in schools/colleges can also participate in these programmes. Red Cross examination is being conducted for high school students every year. AL the national level, the President of India is the President of Indian Red Cross Society and the Governor for State Unit. Deputy Commissioner for district and Tahasildar for taluk unit. Indian citizens can become the members and volunteers of Red Cross by paying prescribed fee. Chairman, Vice-Chairman, Hon. Treasurer (elected) and General Secre- tary administer the branches of this organisation. RED CROSS SYMBOL : As adopted in Geneva Convention of 1864, Red Cross in white background is used in India. This symbol should not be used by others, if used, itis a punishable. NOBEL PRIZES: Red Cross is the only organization in the world which has won Nobel Prize four times (including the founder of Red Cross). CONTACT THE FOLLOWING ADDRESS TO AVAIL SERVICES: Indian Red Cross Society, Karnataka State Branch, #26, Ist Floor, Red Cross Bhavan, Race Course Road, Bengaluru — 560001.NotesYou might also likeComputer Science Passing PackagePDF87% (23)Computer Science Passing Package69 pagesII Puc Maths MCQ (Part - A)PDF100% (3)II Puc Maths MCQ (Part - A)44 pagesI Puc Computer Science Lab Manual 2024-2025 - With - FlowchartsPDF89% (9)I Puc Computer Science Lab Manual 2024-2025 - With - Flowcharts61 pagesA Sunny Morning - Comprehension II and IIIPDF100% (2)A Sunny Morning - Comprehension II and III7 pagesMCQs - II PUC 2023PDF0% (1)MCQs - II PUC 202352 pages2nd PUC English 1 Marks IMPPDF100% (5)2nd PUC English 1 Marks IMP25 pages2nd PU Maths HandbookPDF100% (3)2nd PU Maths Handbook144 pages2nd PUC English - 150 Pages (2nd Time)PDF100% (2)2nd PUC English - 150 Pages (2nd Time)150 pagesCS Important Questions For II PUCPDF81% (32)CS Important Questions For II PUC10 pages2nd PUC Computer Science Passing PackagePDF0% (1)2nd PUC Computer Science Passing Package50 pages2 PUC English Exam PASSING PACKAGEPDF91% (78)2 PUC English Exam PASSING PACKAGE41 pagesChapter 4 Data Structure PDFPDF100% (1)Chapter 4 Data Structure PDF26 pages2nd Puc Lab Manual Dudda PDFPDF100% (3)2nd Puc Lab Manual Dudda PDF56 pages2nd PUC Computer Lab Manual-2023PDFNo ratings yet2nd PUC Computer Lab Manual-2023101 pagesComputer Science Manual For 2nd PUC, Karnataka BoardPDF83% (98)Computer Science Manual For 2nd PUC, Karnataka Board48 pagesViva Questions II Cs LabPDF100% (2)Viva Questions II Cs Lab10 pages2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer SciencePDF100% (2)2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer Science9 pages2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer SciencePDF80% (5)2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer Science20 pages2 PUC C++ ProgramsPDF100% (1)2 PUC C++ Programs5 pagesII PU CS All District Preparatory QPs 2024PDF100% (1)II PU CS All District Preparatory QPs 202433 pagesChapter 7 Classes and ObjectsPDFNo ratings yetChapter 7 Classes and Objects19 pagesII Puc English Passing PackagePDF100% (5)II Puc English Passing Package23 pages2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer SciencePDF67% (3)2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer Science11 pages2nd PUC Computer Science Super ImportantPDF100% (1)2nd PUC Computer Science Super Important16 pagesII PUC English Hand BookPDF83% (6)II PUC English Hand Book10 pagesIi Puc Accountancy Theory Package For 2022-23PDF100% (1)Ii Puc Accountancy Theory Package For 2022-2311 pagesEnglish HB-2024-25-FINALPDFNo ratings yetEnglish HB-2024-25-FINAL120 pagesChapter 10 Inheritance PDFPDF100% (3)Chapter 10 Inheritance PDF13 pagesKarnataka I PUC Computer Science Sample Question Paper 1 PDFPDFNo ratings yetKarnataka I PUC Computer Science Sample Question Paper 1 PDF2 pages2nd Puc English Mcqs 2022-23PDF0% (1)2nd Puc English Mcqs 2022-2383 pagesPhysics Passing Package Notes 2021PDF80% (5)Physics Passing Package Notes 202131 pagesChapter 17 Web Designing1 PDFPDF100% (2)Chapter 17 Web Designing1 PDF15 pagesII Puc Chemistry Important Question and Answer For Midterm Exam 2021PDF100% (1)II Puc Chemistry Important Question and Answer For Midterm Exam 202129 pagesII PU English Question Bank 2025 FinalPDF100% (8)II PU English Question Bank 2025 Final68 pagesChapter 4 QueuePDF100% (1)Chapter 4 Queue34 pages2nd PUC Physics Previose Year QsPDF100% (5)2nd PUC Physics Previose Year Qs52 pagesChapter 8 Function Overloading PDFPDF100% (1)Chapter 8 Function Overloading PDF6 pages2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. SheikhPDF67% (3)2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. Sheikh10 pagesI Believe That Books ...... DisappearPDF100% (2)I Believe That Books ...... Disappear6 pagesCollection of District Question Paper PreparatoryPDFNo ratings yetCollection of District Question Paper Preparatory26 pages2nd Puc-Physics-Most Imp ProblemsPDF88% (16)2nd Puc-Physics-Most Imp Problems6 pagesIi Puc English Summaries 2023-24PDFNo ratings yetIi Puc English Summaries 2023-2410 pagesMath 2nd Puc Imp QuestionsPDFNo ratings yetMath 2nd Puc Imp Questions11 pagesReported Speech With AnswersPDF100% (2)Reported Speech With Answers4 pagesVikas Booklet English II 2017 PDFPDF76% (105)Vikas Booklet English II 2017 PDF296 pagesEnglish Points - Roopa BhatPDF50% (2)English Points - Roopa Bhat26 pagesBUSINESS STUDIES PUC 2nd YEAR QUESTION BANKPDF100% (4)BUSINESS STUDIES PUC 2nd YEAR QUESTION BANK25 pagesChemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 1PDF100% (2)Chemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 15 pagesII PUC-Previous Year PUC Board Question PapersPDFNo ratings yetII PUC-Previous Year PUC Board Question Papers27 pagesFast Food AddictionPDFNo ratings yetFast Food Addiction2 pagesII PUC Labprograms NEWPDFNo ratings yetII PUC Labprograms NEW61 pagesII Pu Practical PDFPDFNo ratings yetII Pu Practical PDF51 pages2 - PUC - Lab - ManualN - GKSir (2024)PDFNo ratings yet2 - PUC - Lab - ManualN - GKSir (2024)78 pagesIi Puc Computer Science Lab Manual Page 1 of 88PDF100% (1)Ii Puc Computer Science Lab Manual Page 1 of 8888 pagesCerto FicatePDFNo ratings yetCerto Ficate56 pagesC.S ManualPDFNo ratings yetC.S Manual38 pagesIi Puc Annual Practical Exam Feb - 2025 Reference PaperPDFNo ratings yetIi Puc Annual Practical Exam Feb - 2025 Reference Paper8 pages2nd Puc Lab Manual Dudda - RemovedPDFNo ratings yet2nd Puc Lab Manual Dudda - Removed19 pages2puc Lab ProgramsPDFNo ratings yet2puc Lab Programs65 pages2nd-Puc-Lab-Manual-Section B and C-1PDFNo ratings yet2nd-Puc-Lab-Manual-Section B and C-113 pagesWeb Notes by Nandan U3PDFNo ratings yetWeb Notes by Nandan U314 pagesSwathi RB Tittle and CertificatesPDFNo ratings yetSwathi RB Tittle and Certificates10 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesComplete CSE Software Projects List For CsePDFNo ratings yetComplete CSE Software Projects List For Cse13 pagesGrievance Handling System AbstractPDFNo ratings yetGrievance Handling System Abstract3 pages
>choice; switch(choice) case 1:{ cout<<"Enter the item: "; cin>>item;Il PUC MANUAL ay T-enqueve(itmy; break; } case 2:{ Q.dequeue(); break; } case 3:{ Q.getSize(); break; + case 4:{ cout<<"Thank You... Visit again" exit(1); + default: cout<<"\tInvalid choice..."< #include class LinkList private: struct Node int data; Node* link; }*START; public: LinkList(); void Print(); //Prints the contents void Append(int num); //Adds a new node at the end void Count(); //Counts number of nodes ti LinkList::LinkList() START = NULL; // Prints the contents of linked list void LinkList::Print() if (START NULL) { cout<<"Linked list is empty"<data<<" tmp = tmp->link ; } 7/ Adds a new node at the end of the linked list void LinkList::Append(int num) Node *newNode; 43Il PUC MANUAL aad newNode = new Node; newNode->data = num; newNode->link = NULL; if(START == NULL) { //create first node START = newNode; cout<Link != NULL) tmp = tmp->Link; //add node to the end tmp->link = newNode; cout<lLink) cH; cout<Print(); obj->Append( 100) ; obj->Print(); obj->Count(); obj ->Append (208) ; obj->Print();I PUC MANUAL 45 obj->Count(); obj ->Append (309) ; obj->Print(); obj ->Count(); Linked 100 is Linked No. of 200 is Linked No. of 300 is Linked No. of list is empty inserted as the first node list contains 100 nodes in the linked list= 1 inserted list contains 100 200 nodes in the linked list= 2 inserted list contains 100 200 300 nodes in the linked lis 3 Change the actual arguments in the program and run againIl PUC MANUAL 46 SOL As: jent Experiment No 17 (Generate the Electricity Bill for one consumer {Create a table for house hold Electricity bill with the following fields Field name type RR_number Varchar2(10) consumer_name | varchar2(25) date_billing Date units number(4) Insert 10 records into the table Check the structure of table and note your observation: . Add two new fields to the table bill_amt number(6,2) + due_date date(8) 4. Compute the bill amount for each customer as per the following rules min_amt Rs.50 First 100 units Rs 4.50 / unit >100 units Rs 5.50 / unit 5. Compute due date as billing date+15 days. . List all the bills generated Rote: Verify the date format using sysdate command olution: Command to create a table Sql> create table elect_bill(RR_number varchar2(10),consumer_name archar2(25),date_billing date, units number(4)); ll. Command to add records into the table insert into elect_bill values('A1001','Manjunath’,’2/2/2014',34); |Add the data to the table as given below N ‘A1001 | Manjunath [12/2/2014 [34 ‘1098 | Reeta 14/2/2014 [128 | 1190 | Nithin 92/2014 [234 1234 | Vikas 14/2/2014 | 256 82345 | Parinitha | 13/2/2014 | 277 ‘1987 | Tarun vohra_| 23/2/2014 | 289 ‘82456 | Solanki 12/2/2014 | 178 (3459 | Patil SS 15/2/2014 | 176 83765 | Yashaswini_| 13/2/2014 | 160 ‘4790 | Lakshman Js [ 16/2/2014 | 299Il PUC MANUAL a7 Command to check the structure of a table dese elect_bill; ote: sql> commit; (Used to store all the permanently in the elect_bill table) 8. Command to add two new fields to the table Alter table elect_bill add{amount number(6,2), due_date date); /. Command to compute bill amount Update elect_bill set amount=50 ; Update elect_bill set amount=amount+ 100*4.50+(units-100)*5.50 where units>100; Update elect_bill set amount=amount+units*4.50 where units <=100; Update elect_bill set due_date=date_billing+15 ; 5. Command to view the bill statement Select * from elect_bill;Il PUC MANUAL 48 Experiment No 18 (Create a student database and compute the result. reate a table for a class of students with the following details name, type Student id numb er[4] student_name| varchar2[25] subl_marks | numb er{2] sub 2 marics numb er[2] subS marks | numb er{2] sub4_marks | numb er{2] sub 5S marics numb er[2] sub6_marks | numb er{2] 1. Add records into the table for 10 students for name,student_id,student_name and marks in 6 subjects using insert command. 2. Display the description of the fields in the table using dese command. 3. Alter the table and Calculate total and perc_marks. 4. Compute the result as “pass” or “fail” by checking if the student has scored more than 35 marks in each subject. 5. List the contents of the table. 6. Retrieve all the records of the table 7. Retrieve only student_id and student_name of all the students 8. List the students who have result as “pass” 9. List the students who have the result as “fail” 10. Count the number of students who have passed 11. Count the number of students who have failed 12. List the students who have percentage greater than 60 13. Sort the table according to the order of student_id. Solution: 1. Command to create a table Sql> create table student_master (student_id number(4),student_name archar2(25), subl_marks number(2),sub2_marks number(2),sub3_marks yumber(2),sub4_marks number(2),subS_marks number(2),sub6_marks umber(2)); 2. Command to add records into the table dd records using insert command as follows insert into student_master values(1124,’Anuthara’,67,82,86,90,56,78); insert into student_master values{1127,’Bhargavi’,56,69,78,34,52,59); insert into student_master values(1113,”Manjunath’,45,47,51,40,50,51); insert into student_master values(1121,’Bhavani’,28,36,45,34,37,39); te the rest of the rows similarly so that table contains the following dataIl PUC MANUAL 49 1124 |Anuthara 67 | 82 186 [90 156 178 1127 |Bhargavi 56 [69 [78 [34 [52/59 1115 | Manjunanth [45 [47 [51 [40 [50] 51 1121 |Bhavani 28 | 36 145 | 34 | 37 | 39 1122 | Preetham 34 | 56 | 68 | 79 | so | 96 1125 | Sanjay 78189 |] 90 196 195 |92 1129 [Kishan 68 [Fr [84 [69 [7o [79 1123 | Savyasachi [78/89 [86 [88 [90/85 1120 |Varun 56 [30 ]35 | 47 [55 | 54 1119 [Joseph 66 [69 ] 60] 70/81 | 59 2. Command to view the structure of the table Desc student_master; 8. Command to alter the table Add the following fields to the table using alter command total number(3) perc_marks | number(2) result varchar2(10) 4. Command to calculate total PDATE student_master SET tal-sub1_marks+tsub2_marks+sub3_marks+sub4_marks+subS_marks+sub6_mark: (where student_id>0); ‘optional {Command to calculate percentage PDATE student_master SET perc-total/6.0 WHERE student_id>0; }. Command to calculate result as pass UPDATE student_master SET result=’pass’ WHERE sub1_marks>=3 1ub2_marks>=35 and sub3_marks>=35 and sub_marks>=35 and uubS_marks>=35 and sub6_marks> ‘ommand to calculate result as fail UPDATE student_master SET result=’fail’ WHERE sub 1_marks<35 or sub2_marks<35 or sub3_marks<35 or sub_marks<35 or sub5_marks<35 or uub6_marks<35; . command to view the contents of the table ct * from student_master; 6. Command to retrieve all the records of the table elect * from student_master; andIl PUC MANUAL 50 4 Command to retrieve only student_id and student_name of all the btudents elect student_id,student_name from student_master; elect * from student_master where result=’pass’; . Command to list the students who have result as “fail” elect * from student_master where result="fail’; l10. Count the number of students who have passed elect count(*) from student_master where result="pass’; 11. Command to count the number of students who have failed elect count(*) from student_master where result=’fail’; 112. Count the number of students who have percentage more than 60 kelect * from student_master where perc>=60; 13. Command to sort the student list according to student_id ELECT * FROM student_master ORDER BY student_id; Fe Command to list the students who have result as “pass”Il PUC MANUAL St Experiment No: 19 (Generate the Employee details and compute the salary based on the lepartment. Create the following table employee field name [data type [description emp-id number(4) | employee’s id number dept-id number(2) __| department's id number emp-name_| varchar2(25) | employee name emp_salary | number(s) __ | salary of the employee reate another table department with the following structure field name [data type _| description deptid | mumber(2) | department's id number dept-name | varchar2(20) | department name supervisor | varchar2(20) | department head’s name Assume the department names as purchase(id-01),accounts(id-02),sales(id-03) nd apprentice(04). * Enter 10 rows of data for table employee and 4 rows of data for department table Write SQL statements for the following Find the names of all employees who work for the accounts department 2. How many employees work for accounts department? 3. What is the minimum, maximum and average salary of employees working for accounts department? 4. List the employees working for a particular supervisor. 5. Retrieve the department names for each department where only one employee works Increase the salary of all employees in the sales department by 15% Add a new column to the table employee, called Bonus number(5) and compute 5 % of the salary to the said field. 8. Delete all the rows for employees in the apprentice department noIl PUC MANUAL 52 Solution : Create a table Employee 1009 [01] Arun guptha [25000 1045 | 02 | Priya Rao 27500 1034 | 02 | Vanshidhar 23700 1067 | 03 | Anup kaul 36000 1058 | 04 | Hari Prasad 29000 1029 | 03 | Anil Goel 19350 1044 | 02 | Harsha shenoy | 52000 1030 | 03 | Surya 14500 1022 | 04 | Keerthi 37900 \create a table department 01 [Purchase _| Ameen 02 [Accounts _| Krishna reddy 03 | Sales ‘Tanveer FGC 04 | Apprentice | Ashish mehra 1. Command to find the names of all employees who work for the accounts department Select * from employee where dept-id=(select dept_id from department where dept-name=’Accounts); 2. Command to find the number of employees who work for the accounts department Select count(*) from employee where dept-id=(select dept-id from department where dept-name=Accounts’); 3. Command to find the minimum, maximum and average salary of employees who work for the accounts department Select min(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts); Select max(emp_salary) from employee where dept-id=(select dept-id from department where dept-name=’Accounts’); Select average(emp_salary) from employee where dept-id=(sclect dept- id from department where dept-name=’Accounts)); note:All of the above three commands can be combined into a single query 4. Command to list the employees working for a particular supervisor select * from employee where dept-id=(select dept-id from department where supervisor~Tanveer)};Il PUC MANUAL 83 Command to retrieve the department names for each department where only one employee works select dept-name from department where dept-id_in(select dept-id from employee group by dept-id having count(*)=1); Command to increase the salary of all employees in the sales department by 15% update employee set emp_salary~ emp_salary+emp_salary*0.15 where dept-id=(select dept-id from department where dept-name='sales’)) ; Command to add a new column to the table employee, called —Bonus number(5) and compute 5 % of the salary to the said field. alter table employee add bonus number(5); update employee set bonus=emp_salary*0.05; Command to delete all the rows for employees in the apprentice department delete from employee where dept-id=(select dept-id from department where dept-name-‘apprentice)};IL PUC MANUAL 54 — Experiment No 20 Create database for the bank transaction, _ SQL> create table customer(cno number(4) primary key, cname char(25), caddress varchar2(50), cphone char(12)); Table created. SQL> dese table customer Usage: DESCRIBE [user.]object[@db_link] SQL> desc customer Name Null? Type cNO NOT NULL NUMBER(4) CNAME CHAR(25) CADDRESS VARCHAR2(50) CPHONE CHAR(12) SQL> create table bank(accno number(8) not NULL, tramount number(8,2) check(tramount>0), trdate date , trtype char, cno number(4)); Table created. SQL> insert into customer values(100,’Anush’,'Churchstreet, Bangalore’,'25595235); SQL> insert into customer values(101,’Ganesh’,’M G Road, Bangalore’,’2559553'); SQL> insert into customer values(102,’Nagamani’,Jayalaksmi, Mysore’,’23343434'); SQL> insert into bank values(1300,23961.75,’01-mar-2014',’D’,100); SQL> insert into bank values(13101, 70000,'26-MAR-2014','C’, 100); SQL> insert into bank values(13102,2400,’21-Jan-2014',’C’,102); SQL> insert into bank values(13103,59681.25,'14-FEB-2014',’D’,103); SQL> select * from customer; CNO CNAME CADDRESS CPHONE 100 Anush Churchstreet, Bangalore 25595235 101 Ganesh MG Road, Bangalore 2559553 102 Nagamani Jayalaksmi, Mysore 23343434Il PUC MANUAL 88 SQL> select * from bank; ACCNO TRAMOUNTTRDATE T CNO 1300 23961.7501-MAR-14D 100 13101 70000 26-MAR-14C — 100 13102 2400 21-JAN-14C 102 13103 59681.25 14-FEB-14D 103 Lb sleet * fran custoner ~ rest oF Line ignored. known connand beginning “slect + Fr... bd 1D select * Fron custoner ENO CNAME [eRDDRESS PHONE 190 anus churcnstreet ,sangaiore 25595235 481 Ganesh WG Road, Bangalore 2550569 4162 Haganani dayalaksnitysore 2agnaaay Lb select * Fron bank; cena TRAMQUNT TRDATE = en 29961.75 O1-HAR-14 D 100 79008 26-MAR-1h C 100 13102 ac 192 43183 59681.25 14-FEB-14 D 168 SQL> select * From bank where trdate ="01-mar-2014" and trdate>* 61-nar-2614° 5 no rows selected SQL> select * from bank where trdate>="01-mar=2014" ; T 0 4300 29961.75 61-HAR-1h D 400 4311 7MAAN 76-MAR-1h 49a SQL> select * From bank where trdate ='O1-nar-2014' and trdate>' O1-mar-2014" ; no rows selected SQL> select * From bank where trdate>="61-nar-2014"; ACCNO TRAMOUNT TROATE = T ono -MAR-14 D 1 13164 70000 26-HAR-14 C 1 SQL> |Il PUC MANUAL 56 SQL> select accno,custoner.cno,cnane fron customer bank where custoner’.cno-bank.cno; ACCHO CHO CANE 1300 168 Anush sa10t 109 nus 13102 102 Haganani squ | SQL> select trtype, count(#) From bank group by trtype; T COUNT(#) c 2 D 2 SQL> select * fron custoner order by cnane dese; CHO CANE ‘CADDRESS PHONE 402 Haganani Jayalaksni tysore 29909494 401 Canesh MG Road, Bangalore 2559553 400 fnush Ghurchstreet Bangalore 25595295 SQL> update bank set tranount = 70000 where accno=13101 1 row updated. SQL> alter table custoner modify caddress char(50); Table altered. SQL> delete fron bank where accno=1300; 1 row deleted. SQL> create table tenpcust as (select # from custoner vhere cno detween 100 and 102); Table created. sal |Il PUC MANUAL ST SQL> create table tenpcust as (select * Fron custoner where cno between 100 and 102); Table created. SQL> select * Fron custoner were cnane Like “g's no rows selected SQL> select * Fron custoner where cnane Like ‘6% (CHO CHAE cADDRESS PHONE 101 Ganesh "1G Road, Bangalore 2559553 SQL? select sysdate fron dual; SYSDATE 6-aPR-1 SQL> select sun(tranount) fron bank; SUM(TRAHOUNT) 7 y92094.25 SQL? create view viewcust as select cno,cphone fron custoner; View created. say SQL> select * from custoner where cname Like "C2"; WO CNANE ‘cADDRESS. PHONE 161 Ganesh 1G Road, Bangalore 2550553, SQL> select sysdate fron dual; SYSDATE 5-APR-14 SQL> select sun(tranount) fron bank; SUNCTRAMOUNT) 182081.25 SQL> create view viewcust as select cno,cphone fron custoner; View created. SQL> select distinct(cno) Fron bank;I PUC MANUAL 58 SQL> create view viewcust as select cno,cphone Fron custoner; View created. SQL> select distinct(eno) Fron bank; SQL> select accno, count(+) From bank group by accno having count(*)>4; no rows selected SQL> select # Fron custoner where ephone=* MILL! no vous selected ‘SQL> delete From customer; 43 rows deleted. SQL> drop table bank; Table dropped.I PUC MANUAL 59 Experiment No 21 Write a HTML program to create a study time-table. MY STUDY TIME-TABLE FOR THE WEEK Beautiful Sunrise “ Month No of Classes held No of class attended “ JUNE 08 JULY 16 AUGUST 16 SEPTEMBER I PUC MANUAL 63 16 OCTOBER 08 NOVEMBER 16 DECEMBER 16 JANUARY 16 FEBRUARY 08 Total NO of DAYS 120 PERCENTAGE I PUC MANUAL oF “ ‘top"">* ‘Student_Name">Student Name *“ “ “ " Student_name" maxlengt etre“ “ Student ID *“ “ “" top" 'Father_name">Father Name * “ “ “ “ “ “ “etr>* Telephone Number College to contact “ “ “ “ “““ " Comments * “ ‘email">Email Address *“ “ “Il PUC MANUAL 65 7 “ “ ““"" " “ submit’ value="Submit"> ‘http://www. freecontactform.com/html_form.php"> HTML Form )* “ PeerRED CROSS Jean Henry Dunant of Switzerland established the international humanitarian service organisation “Red Cross” in Geneva. His birthday which falls on | May 8 is celebrated as “World Red Cross Day” | every Year. ol C { PRINCIPLES OF RED CROSS: a ! Jean Henry Dunant (1) Humanity (2) Impartiality (3) Neutrality (1828-1910) (4) Independence (5) Voluntary Service (6) Unity (1) Universality. Red Cross Society was established in India in the year 1920 under the Indian Red Cross Society Act (Parliament Act of XV 1920) and 1921 in Karnataka. ACTIVITIES OF RED CROSS: ‘The main activities of this organisation are treating the wounded soldiers, helping the needy, establishing blood banks, conducting blood donation camps, health programmes and blood grouping, helping the victims of floods, drought, earthquake, providing them drinking water, food, medicine, clothes, helping the differently abled people and conducting other useful activities to help the public. The Junior/ Youth Red Cross units in schools/colleges can also participate in these programmes. Red Cross examination is being conducted for high school students every year. AL the national level, the President of India is the President of Indian Red Cross Society and the Governor for State Unit. Deputy Commissioner for district and Tahasildar for taluk unit. Indian citizens can become the members and volunteers of Red Cross by paying prescribed fee. Chairman, Vice-Chairman, Hon. Treasurer (elected) and General Secre- tary administer the branches of this organisation. RED CROSS SYMBOL : As adopted in Geneva Convention of 1864, Red Cross in white background is used in India. This symbol should not be used by others, if used, itis a punishable. NOBEL PRIZES: Red Cross is the only organization in the world which has won Nobel Prize four times (including the founder of Red Cross). CONTACT THE FOLLOWING ADDRESS TO AVAIL SERVICES: Indian Red Cross Society, Karnataka State Branch, #26, Ist Floor, Red Cross Bhavan, Race Course Road, Bengaluru — 560001.NotesYou might also likeComputer Science Passing PackagePDF87% (23)Computer Science Passing Package69 pagesII Puc Maths MCQ (Part - A)PDF100% (3)II Puc Maths MCQ (Part - A)44 pagesI Puc Computer Science Lab Manual 2024-2025 - With - FlowchartsPDF89% (9)I Puc Computer Science Lab Manual 2024-2025 - With - Flowcharts61 pagesA Sunny Morning - Comprehension II and IIIPDF100% (2)A Sunny Morning - Comprehension II and III7 pagesMCQs - II PUC 2023PDF0% (1)MCQs - II PUC 202352 pages2nd PUC English 1 Marks IMPPDF100% (5)2nd PUC English 1 Marks IMP25 pages2nd PU Maths HandbookPDF100% (3)2nd PU Maths Handbook144 pages2nd PUC English - 150 Pages (2nd Time)PDF100% (2)2nd PUC English - 150 Pages (2nd Time)150 pagesCS Important Questions For II PUCPDF81% (32)CS Important Questions For II PUC10 pages2nd PUC Computer Science Passing PackagePDF0% (1)2nd PUC Computer Science Passing Package50 pages2 PUC English Exam PASSING PACKAGEPDF91% (78)2 PUC English Exam PASSING PACKAGE41 pagesChapter 4 Data Structure PDFPDF100% (1)Chapter 4 Data Structure PDF26 pages2nd Puc Lab Manual Dudda PDFPDF100% (3)2nd Puc Lab Manual Dudda PDF56 pages2nd PUC Computer Lab Manual-2023PDFNo ratings yet2nd PUC Computer Lab Manual-2023101 pagesComputer Science Manual For 2nd PUC, Karnataka BoardPDF83% (98)Computer Science Manual For 2nd PUC, Karnataka Board48 pagesViva Questions II Cs LabPDF100% (2)Viva Questions II Cs Lab10 pages2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer SciencePDF100% (2)2nd Puc Computer Science Notes PDF (3 Marks Questions and Answers) - 2nd Puc Computer Science9 pages2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer SciencePDF80% (5)2nd Puc Computer Science Notes PDF (5 Marks Questions and Answers) - 2nd Puc Computer Science20 pages2 PUC C++ ProgramsPDF100% (1)2 PUC C++ Programs5 pagesII PU CS All District Preparatory QPs 2024PDF100% (1)II PU CS All District Preparatory QPs 202433 pagesChapter 7 Classes and ObjectsPDFNo ratings yetChapter 7 Classes and Objects19 pagesII Puc English Passing PackagePDF100% (5)II Puc English Passing Package23 pages2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer SciencePDF67% (3)2nd Puc Computer Science Notes PDF (1 Mark Questions and Answers) - 2nd Puc Computer Science11 pages2nd PUC Computer Science Super ImportantPDF100% (1)2nd PUC Computer Science Super Important16 pagesII PUC English Hand BookPDF83% (6)II PUC English Hand Book10 pagesIi Puc Accountancy Theory Package For 2022-23PDF100% (1)Ii Puc Accountancy Theory Package For 2022-2311 pagesEnglish HB-2024-25-FINALPDFNo ratings yetEnglish HB-2024-25-FINAL120 pagesChapter 10 Inheritance PDFPDF100% (3)Chapter 10 Inheritance PDF13 pagesKarnataka I PUC Computer Science Sample Question Paper 1 PDFPDFNo ratings yetKarnataka I PUC Computer Science Sample Question Paper 1 PDF2 pages2nd Puc English Mcqs 2022-23PDF0% (1)2nd Puc English Mcqs 2022-2383 pagesPhysics Passing Package Notes 2021PDF80% (5)Physics Passing Package Notes 202131 pagesChapter 17 Web Designing1 PDFPDF100% (2)Chapter 17 Web Designing1 PDF15 pagesII Puc Chemistry Important Question and Answer For Midterm Exam 2021PDF100% (1)II Puc Chemistry Important Question and Answer For Midterm Exam 202129 pagesII PU English Question Bank 2025 FinalPDF100% (8)II PU English Question Bank 2025 Final68 pagesChapter 4 QueuePDF100% (1)Chapter 4 Queue34 pages2nd PUC Physics Previose Year QsPDF100% (5)2nd PUC Physics Previose Year Qs52 pagesChapter 8 Function Overloading PDFPDF100% (1)Chapter 8 Function Overloading PDF6 pages2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. SheikhPDF67% (3)2nd Puc English 02-Too Dear Notes 2019-20 by Ehthashamuddin. J. Sheikh10 pagesI Believe That Books ...... DisappearPDF100% (2)I Believe That Books ...... Disappear6 pagesCollection of District Question Paper PreparatoryPDFNo ratings yetCollection of District Question Paper Preparatory26 pages2nd Puc-Physics-Most Imp ProblemsPDF88% (16)2nd Puc-Physics-Most Imp Problems6 pagesIi Puc English Summaries 2023-24PDFNo ratings yetIi Puc English Summaries 2023-2410 pagesMath 2nd Puc Imp QuestionsPDFNo ratings yetMath 2nd Puc Imp Questions11 pagesReported Speech With AnswersPDF100% (2)Reported Speech With Answers4 pagesVikas Booklet English II 2017 PDFPDF76% (105)Vikas Booklet English II 2017 PDF296 pagesEnglish Points - Roopa BhatPDF50% (2)English Points - Roopa Bhat26 pagesBUSINESS STUDIES PUC 2nd YEAR QUESTION BANKPDF100% (4)BUSINESS STUDIES PUC 2nd YEAR QUESTION BANK25 pagesChemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 1PDF100% (2)Chemistry Sectionwise Analysis of PYQs (2024) - Ec3e53a7 c902 4e85 A5dd 12c4bf1f4ae7 15 pagesII PUC-Previous Year PUC Board Question PapersPDFNo ratings yetII PUC-Previous Year PUC Board Question Papers27 pagesFast Food AddictionPDFNo ratings yetFast Food Addiction2 pagesII PUC Labprograms NEWPDFNo ratings yetII PUC Labprograms NEW61 pagesII Pu Practical PDFPDFNo ratings yetII Pu Practical PDF51 pages2 - PUC - Lab - ManualN - GKSir (2024)PDFNo ratings yet2 - PUC - Lab - ManualN - GKSir (2024)78 pagesIi Puc Computer Science Lab Manual Page 1 of 88PDF100% (1)Ii Puc Computer Science Lab Manual Page 1 of 8888 pagesCerto FicatePDFNo ratings yetCerto Ficate56 pagesC.S ManualPDFNo ratings yetC.S Manual38 pagesIi Puc Annual Practical Exam Feb - 2025 Reference PaperPDFNo ratings yetIi Puc Annual Practical Exam Feb - 2025 Reference Paper8 pages2nd Puc Lab Manual Dudda - RemovedPDFNo ratings yet2nd Puc Lab Manual Dudda - Removed19 pages2puc Lab ProgramsPDFNo ratings yet2puc Lab Programs65 pages2nd-Puc-Lab-Manual-Section B and C-1PDFNo ratings yet2nd-Puc-Lab-Manual-Section B and C-113 pagesWeb Notes by Nandan U3PDFNo ratings yetWeb Notes by Nandan U314 pagesSwathi RB Tittle and CertificatesPDFNo ratings yetSwathi RB Tittle and Certificates10 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesTraning Report PDFPDFNo ratings yetTraning Report PDF116 pagesComplete CSE Software Projects List For CsePDFNo ratings yetComplete CSE Software Projects List For Cse13 pagesGrievance Handling System AbstractPDFNo ratings yetGrievance Handling System Abstract3 pages