Вы находитесь на странице: 1из 4

LESSON PLAN

Teacher’s Name BISHWAJIT BANERJEE Class XII


& designation PGT (CS)
Subject Computer Science Time 35 min
Topic Sorting Techniques (Bubble Sort) Date 04-12-2013

General Aids Chalk, Duster, Black Board


Specific Aids Computer, Turbo C++ Software, Projector.
Instructional Expectations/  To develop interest in Computer Science
Objectives  To develop / improve logic building skills of students.
 To develop programming skills required to understand the subject.
Specific Aims  To enable students to understand how to arrange data from largest to smallest using bubble
sort technique.
 To enable students to design programme using bubble sort technique.
 To enable the students to understand and differentiate between bubble sort and other
sorting technique.
Prerequisite Knowledge:  Familiarity with selection sort.
 Working knowledge of arrays.
 Working knowledge of loops.
 User defined Functions.
 Familiarity with how system resources are used by programs.
Previous Knowledge Testing Q1. What are arrays? Design a program to input and output 10 numbers using arrays.
Q2. Design a function to swap the values of two variables passed as arguments.
Q3. Design a program to arrange data values (integer array) using selection sort method.
Announcement of the Topic Bubble Sort Technique.
Presentation Inductive and Deductive Method will be used along with power point presentation.
WHITE BOARD
TEACHING POINT TEACHER’S ACTIVITY PUPIL’S ACTIVITY
SUMMARY

What is Sorting? Students will be explained about Students will listen, understand Design function to
the sorting as also explained in and co-relate the topic with swap values.
(Related to previous knowledge)
previous chapter using some data previous knowledge.
And discussion on selection sort value.
technique for revision. Design and explain
Revisit to the selection sort for
function to arrange
understands the topic.
integer values using
What is bubble Sort technique? With the help of power point Power point presentation will help bubble sort
presentation students shall be students to understand the method.
explained the concept of bubble concept.
sort technique.
Student will design said function.
Write main
Simultaneously shall also be asked
program to invoke
to design function for
bubble sort
interchanging integer value using
function.
call by reference.
How bubble Sort is different from By show the method of arranging Students will be able to understand
selection Sort technique? data values by both sorting concept bubble sort.
technique (bubble and selection)
Students will be able to
explain the difference between
differentiate between sorting
sorting techniques
techniques.
Subject Matter Teaching Aid White Board Work
Computer, Projector, TCW Software, void swap(int &m, int &n){
int temp =m;
Sorting is arranging data items Power Point Presentation. m=n;
either in ascending order or in n=temp;
Output On Computer
descending order. }
void bubbleSort(int arr[],int size){
int i,j;
Bubble Sort: for(i=0;i<size;i++)
Comparing each pair of adjacent for(j=0;j<size-i-1;j++)
items and swapping them if they if(arr[j]>arr[j+1])
are in the wrong order. The pass swap(arr[j],arr[j+1]);
}
through the list is repeated until void main(){
no swaps are needed, which int arr[]={53,13,23,15,3,20};
indicates that the list is sorted. int i;
Consider some data items to cout<<"\nBefore Sorting : ";
for(i=0;i<6;i++)
arranged in ascending order cout<<setw(5)<<arr[i];
bubbleSort(arr,6);
53, 13, 23, 15, 3, 20 cout<<"\nAfter Sorting : ";
for(i=0;i<6;i++)
cout<<setw(5)<<arr[i];
Show swapping of data values }
step by step for better
understanding.

Discussion on difference
between selection sort and
bubble sort techniques.
Recapitulation  Sorting is arranging data elements in either ascending or descending order.
 In selection sort technique one data vale is selected at a time and sent it to its
desired place and same processes is repeated for rest of the data values.
 In bubble sort technique; comparing each pair of adjacent items
and swapping them if they are in the wrong order
 Bubble sort technique need more write operations as compare to selection sort
technique.
Home Work Design and test run the bubble sort program on computer.
Evaluation Tool/ Assessment:
a) Which of the following describes b) What is the need of arranging data in c) Why do we use arrays?
sorting? specific order? 1. To handle bulk of similar kind of data.
1. Accessing and procession each record 1. It looks good when being read. 2. For easy access to data value by
exactly once. 2. For quick and easy access to the desired sharing same name.
2. Finding a location of record with given information. 3. Structured way of program.
key. 3. It saves computer memory. 4. All of the above.
3. Arranging data (record) in some given 4. All of the above.
order.
4. Adding a new record to data structure.
d) Which sorting technique uses e) What is the role of swap function in f) Which sorting method needs more
comparison with neighbouring element? sorting techniques? number of write operations?
1. Selection sort 1. To arrange data in specific order. 1. Selection sort
2. Bubble Sort 2. Just to interchange values of given 2. Bubble sort
3. Insertion sort variables. 3. Both have equal number of write
4. None of the above 3. To find highest value. operation.
4. All of the above. 4. This comparison is not valid.

Вам также может понравиться