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

COMPUTER SCIENCE (868)

Aims
1. To enable students to comprehend basic concepts 5. To enable students to solve problems using
and practices for problem solving using algorithmic techniques using the approach of
computers. classes and objects.
2. To develop an understanding of how computers 6. To develop the ability to devise, test, code, debug,
store and process data. documents and validate programs to implement
various algorithms.
3. To develop the ability to describe the major
components of computer hardware, their functions 7. To develop an appreciation of the implications of
and interaction. computer use in everyday life in contemporary
society.
4. To develop the ability to analyze applications as
systems of interacting objects. 8. To create an awareness of ethical issues related to
computing.

CLASS XI

There will be two papers in the subject: (b) Representations for integers, real numbers,
limitations of finite representations.
Paper I: Theory - 3 hours ….100 marks
(c) Internal structure of a computer, a simple
Paper II: Practical - 3 hours ….100 marks
decimal load and store computer and its
machine language, instruction format,
PAPER I -THEORY registers, program counter, instruction
Paper 1 shall be of 3 hours duration and be divided register; register addressing modes,
into two parts. instruction cycle, assembly language for the
same computer, simple algorithms in
Part I (30 marks): This part will consist of assembly language.
compulsory short answer questions, testing
knowledge, application and skills relating to 2. Review of basic computer hardware and software;
elementary/fundamental aspects of the entire syllabus. basic concepts about operating systems, file
Part II (70 marks): This part will be divided into two systems.
Sections, A and B. Candidates are required to answer CPU, the clock, cache memory, primary memory,
three questions out of five from Section A and four secondary memory, input and output devices,
questions out of six from Section B. Each question in communication devices (the aim is not to
this part shall carry 10 marks. describe/discuss an exhaustive list of devices but
to understand what parts are present in a typical
SECTION A computer and what is the function of each part).
Basic Computer hardware and software: The boot process, operating system (resource
management and command processor), file
1. Review of Number systems (decimal, binary, system.
hexadecimal) and arithmetic.
i) Boot process, operating systems - resource
(a) Number systems, base of a number system - management, command processing.
decimal, binary, octal, hexadecimal
representation, conversion between various ii) Directories, files and hierarchical file system.
representations, character representations iii) Programming languages (machine language,
(ASCII, ISCII, Unicode). assembly language, high level language).

107
iv) Compilers and interpreters. numbers, characters, booleans, etc. - will
depend on the language), variables (and
v) Application software.
their declaration - based on language),
3. Propositional logic, well formed formulae, truth assignment, difference between the left-
values and interpretation of well formed formulae, hand side and right-hand side of an
truth tables, basic ideas and results about assignment.
consistency and completeness of propositional ii) Expressions - arithmetic and logical,
logic (no proofs). evaluation of expressions, type of an
4. Logic and hardware, basic gates (AND, NOT, expression (depends on language).
OR) and their universality, other gates (NAND, Operators, associativity and precedence of
NOR, XOR); inverter, half adder, full adder. operators.

5. Control unit, system clock. iii) Statements, blocks (where relevant),


scope and visibility of variables.
6. Memory - construction of a memory bit using a
flip-flop, D-flip-flop and its use in constructing iv) Conditional statements (if and if-then-
registers. else), switch, break, default.

7. Memory organization and access; parity; memory v) Loops (for, while-do, do-while).
hierarchy - cache, primary memory, secondary vi) Simple input/output using standard
memory. input/output.
8. Instruction set and its representation; address, vii) Functions/subroutines as procedural
addressing and addressing modes; instruction abstractions. Using functions/subroutines
cycle; machine language; stored program in programs.
computer (program as data).
viii) Arguments and argument passing in
9. Assembly language syntax and semantics (the functions/subroutines.
assembly language should be for the computer
ix) Scope of variables.
above); assembler and the assembly process;
simple assembly language programs. x) Structured types, arrays as an example of
a structured type. Use of arrays in sorting
SECTION B and searching. Two-dimensional arrays.
Use of two-dimensional arrays to
The programming element in the syllabus is aimed at represent matrices. Matrix arithmetic
problem solving and not on merely rote learning of using arrays. Use of arrays to solve linear
the commands and syntax of particular programming equations (Gauss elimination method).
languages. Students have the option to use either C++
or Java in order to implement the high-level language xi) Review of input/output using standard
concepts and algorithms mentioned in the syllabus and input and standard output. Input/output
to use them for solving problems. Care must be taken using sequential files. Opening, closing
that ‘standard and recent’ versions of the languages files. Creating and deleting files.
are used on the computer. Development environments Formatting output. Concept of a token
such as SUN Forte, Eclipse, BlueJ, Borland C++ or and separator. Extracting tokens from the
Microsoft Visual C++, GNU C++ on Linux could be input.
used. xii) Characters, ASCII representation, strings
as a composite data type; functions on
1. Introduction to High Level Language Concepts strings (e.g. length, substring,
concatenate, equality, accessing
a) Review of programming in Classes IX and X
individual characters in a string, inserting
i) Primitive data types supported by a string in another string at a given
the language (integers, floating point location).

108
xiii) Simple type casting for primitive types; b) Software patents, copyrights, and trademarks,
inter-conversion between character/string software licensing and piracy.
types and numeric types.
c) Free software foundation and its position on
xiv)Distinction between compile time and run software, open source software.
time errors. Run time errors due to finite
representations - overflow, underflow. d) Privacy, email etiquette.
Other run time errors. PAPER II-PRACTICAL
xv) Basic ideas about linking, loading,
execution. Paper II (Practical) will be evaluated internally by the
school. The evaluation shall consist of a 3-hour
b) Objects and classes. practical examination at the end of the year and
evaluation of all assignments done throughout the
c) Analysis of some real world applications in year.
terms of objects and operations on objects. The terminal examination of three hours duration shall
consist of three programming tasks from which the
d) Interface or public contract of a class.
candidates shall have to attempt any one. Candidates
e) Classes as types. will be required to write a program in C++/Java on the
computer to solve the task and give adequate written
f) Examples of problem solving using objects. documentation to explain the development process.
Teachers should maintain a record of all the
g) Encapsulation and visibility (private and
assignments done as part of the practical work through
public).
the year and give it due credit at the time of
h) Static variables and functions. cumulative evaluation at the end of the year.
Marks (out of a total of 100) will be distributed as
i) Errors - compile time and run time. given below:
Exceptions and exception handling.
Continuous Evaluation
j) Simple data structures - stack, queue, deque
Programming in C++/Java through the year - 40 marks
(should be defined as classes); use of these
data structures in problem solving. Terminal Evaluation
Program implementation in C++/Java on
2. Implementation of algorithms to solve
the computer - 40 marks
problems
Documentation, Viva-Voce - 20 marks
The students are required to do lab assignments in
the computer lab concurrently with the lectures. Given below are some sample problems that can be
Programming assignments should be done such taken up. The list however, is only suggestive. These
that each major topic is covered in at least one problems are of different levels of difficulty. They are
assignment. Assignment problems should be indicative of the kinds of problems students can try in
designed so that they are non-trivial and make the their labs. Most problems require the student to devise
student do both algorithm design as well use the an algorithm or to design suitable classes to model the
programming language to implement the problem.
algorithm. Some sample problems are given at the Suggested sample problems:
end of the syllabus.
1. Implement a Calculator class that models a hand
3. Social context of computing and ethical issues held calculator. It should have (at least) the
following functionality: addition, subtraction,
a) Intellectual property and corresponding laws multiplication, integer division, remainder, unary
and rights, software as intellectual property. minus, enter, clear.

109
2. A student has a name, roll number, class in which 5 times followed by 000100100011. Define a
studying, home address and a date of birth. First class BCD with a single constructor, which takes
design a suitable class for Date. Write an integer argument and creates its BCD
constructors and get and set functions. Then equivalent. Write methods for adding, subtracting
design a class for student. Write constructors, get BCD numbers. Also, write methods to check for
and set functions and a function to calculate the the relations <, > and == between two BCD
age of a student (use today’s date in the function). numbers.
The age should be returned as a triple (year,
5. n is a perfect number if the sum of all the factors
month, day). You will have to define a class for
of the number (including 1) excluding itself is n.
Triple and return an object of this type as the age.
For example:
3. Write a class Convert with methods as follows:
6 = 1+2+3
a) takes 4 arguments representing miles, yards,
28=1+2+4+7+14
feet and inches and convert them into
kilometers, meters and centimeters. n is a prime number if it is divisible only by 1 and
b) takes an argument representing degrees itself.
Fahrenheit and converts it to degrees Define a class called NumberProblems which has
centigrade. the following functions:
c) a kilobyte is interpreted in two ways: some int nthPrime(int n) - which returns the nth prime
times it is 1000 bytes (actually correct), but number. So
often (and traditionally) it is 210 which is
1024. Similar discrepancies arise for mega, nthPrime(1) = 2 (remember 1 is not considered a
giga, tera and peta (each is 1000 (or 210 ) prime number)
times the previous one). nthPrime(3) = 5
The function should take the 103 (standard
kilo) and give the equivalent value using 210 nthPrime(6) = 13
as a kilo for all the above.
Write another function:
4. Older computers used Binary Coded Decimals void perfectNosBelow(int n) - which first prints
(BCD) to represent integers. In this each digit is out the nth prime number then prints out all
represented by using 4 bits. So 0 is 0000, 1 is perfect numbers less than the nth prime number.
0001, 2 is 0010, ... 9 is 1001. The remaining 4 bit Each perfect number should be printed on a single
patterns, namely 1010 onwards are illegal. So 32 line along with its factors (see below). So for
bits can store upto 8 digits. To represent a example the output from perfectNosBelow(5) will
negative number the sign is also encoded using 4 be:
bits. However, we are interested only in positive
BCD numbers. For example assuming we have 32 5th prime number=11
bits the number 123 will be represented as (0000) 6= (1,2,3)

110
CLASS XII

There will be two papers in the subject: decoders, multiplexers, use of NAND, NOR
as universal gates.
Paper I: Theory- 3 hours …100 marks
SECTION B
Paper II: Practical- 3 hours …100 marks
The programming element in the syllabus is aimed at
problem solving and not on merely rote learning of
PAPER I-THEORY
the commands and syntax of particular programming
Paper 1 shall be of 3 hours duration and be divided languages. Students have the option to use either C++
into two parts. or Java in order to implement the high-level language
Part I (30 marks): This part will consist of concepts and algorithms mentioned in the syllabus and
compulsory short answer questions, testing to use them for solving problems. Care must be taken
knowledge, application and skills relating to that ‘standard and recent’ versions of the languages
elementary/fundamental aspects of the entire syllabus. are used on the computer- it is recommended that
students mention the version of the language being
Part II (70 marks): This part will be divided into two used while writing answers in order to avoid
Sections, A and B. Candidates are required to answer ambiguity. For example, development environments
three questions out of five from Section A and four such as SUN Forte, Eclipse, BlueJ, Borland C++ or
questions out of six from Section B. Each question in Microsoft Visual C++, GNU C++ on Linux could be
this part shall carry 10 marks. used.
SECTION A
1. Programming in C++/Java
1. Boolean Algebra
(i) Propositional logic, well formed formulae, (i) Review of programming and algorithms from
truth values and interpretation of well formed Class XI
formulae, truth tables, basic ideas and results a) Primitive data types supported by the
about consistency and completeness of language (integers, floating point
prepositional logic (no proofs). numbers, characters, booleans etc. - will
(ii) Binary valued quantities; basic postulates of depend on the language), variables (and
Boolean algebra; operations of AND, OR and their declaration - based on language),
NOT; truth tables. assignment, difference between the left-
hand side and right-hand side of an
(iii) Basic theorems of Boolean algebra; principle assignment.
of duality; idempotent law; commutative law;
associative law; distributive law; operations b) Expressions - arithmetic and logical,
with 0, 1 and complements; absorption law; evaluation of expressions, type of an
involution; De Morgan’s theorem and its expression (depends on language).
applications; reducing Boolean expressions to Operators, associativity and precedence of
sum of products and product of sums forms; operators.
Karnaugh maps (up to four variables). c) Statements, blocks (where relevant),
scope and visibility of variables.
2. Computer Hardware
d) Conditional statements (if and if-then-
(i) Elementary logic gates (NOT, AND, OR, else), switch, break, default.
NAND, NOR, XOR, XNOR) and their uses in
circuits. e) Loops (for, while-do, do-while).
(ii) Applications of Boolean algebra and logic f) Simple input/output using standard
gates to half adders, full adders, encoders, input/output.

111
g) Functions/subroutines as procedural s) Classes as types.
abstractions. Using functions/subroutines t) Examples of problem solving using
in programs. objects.
h) Arguments and argument passing in u) Encapsulation and visibility (private and
functions/subroutines. public).
i) Scope of variables. v) Static variables and functions.
j) Structured types, arrays as an example of w) Errors - compile time and run time.
a structured type. Use of arrays in sorting Exceptions and exception handling.
and searching. Two-dimensional arrays. x) Simple data structures - stack, queue,
Use of two-dimensional arrays to deque (should be defined as classes); use
represent matrices. Matrix arithmetic of these data structures in problem
using arrays. Use of arrays to solve linear solving.
equations (Gauss elimination method).
(ii) Recursion and recursive functions.
k) Review of input/output using standard
input and standard output from class IX. (iii) Recursive data structures - lists, binary trees,
Input/output using sequential files. tree traversals, binary search tree.
Opening, closing files. Creating and (iv) Problem solving using recursive data
deleting files. Formatting output. Concept structures.
of a token and separator. Extracting
tokens from the input. (v) Basic concept of inheritance (only single
inheritance should be used), base and derived
l) Characters, ASCII representation, strings classes.
as a composite data type; functions on
strings (e.g. length, substring, (vi) Member access in derived classes.
concatenate, equality, accessing (vii) Redefinition of member variables and
individual characters in a string, inserting member functions.
a string in another string at a given
location) (viii) Object construction in the presence of
inheritance.
m) Simple type casting for primitive types;
inter-conversion between character/string (ix) Libraries and use of library classes (details
types and numeric types. will vary with the language used - container
n) Distinction between compile time and run class library can be used as an example).
time errors. Run time errors due to finite
representations - overflow, underflow. 5. Implementation of algorithms to solve problems
Other run time errors. A list of suggested algorithms and general problems
o) Basic ideas about linking, loading, is given at the end of this syllabus. These are of an
execution. indicative nature to the type of problems that may
p) Objects and classes. be set for the students and that should be used in
q) Analysis of some real world applications Classes XI and XII. The students will be expected
in terms of objects and operations on to know the algorithmic solution to solve a
objects. particular problem and then be able to implement
r) Interface or public contract of a class. the solution using either C++ or Java.

112
PAPER II-PRACTICAL Suggested sample problems:

Paper 2 (Practical) of three hours duration will be 1. Define class Point to model points in the X-Y
evaluated by the teacher and a Visiting Examiner plane. Define functions to translate a point along
appointed locally and approved by the Council. The the X and Y axes respectively. Define a function
practical will consist of two parts: Planning Session that calculates the distance from another point.
and Examination Session. On completion of Planning
Session, students may proceed to the Examination 2. Now use the Point class to define a Rectangle
Session.
class where a rectangle is modeled by specifying
1. Planning Session all the four corners of the rectangle. Write
Candidates will be required to choose one question separate functions to:
from those set in the question paper for the practical i) Calculate the perimeter and area of the
examination and prepare an algorithm and a hand
rectangle.
written program in C++/Java and other relevant
documentation to solve the problem. ii) Translate the rectangle along the X-axis, Y-
2. Examination Session axis and X-Y axes (simultaneously).

The computer program handed in at the end of the iii) Rotate the rectangle by an angle (in degrees)
planning session shall be returned to the candidates. around an axis passing through the center of
Candidates will then be required to key-in and run the rectangle and passing through the X-Y
their programs individually on the computer and plane.
submit the printout results to the Visiting Examiner.
iv) Check if the rectangle intersects (i.e. overlaps
Marks (out of a total of 100) should be distributed as
partially or completely) another rectangle. It
given below:
should return true if there is an overlap and
Continuous Evaluation false otherwise. An overlap of rectangles is
Candidates will be required to submit a work file defined as: there is at least one point in
containing the practical work related to programming common between the two rectangles.
assignments done during the year.
Programming in C++/Java through the year 3. We want to build the basic backbone of a simple
(Internal evaluation) - 10 marks railway reservation system. The following classes
Programming in C++/Java through the year are required to model the system: Person,
(Visiting Examiner) - 10 marks PersonGroup, Date, Train, RailReservationRecord.
You have to invent the requisite attributes and
Terminal Evaluation functions for the various classes based on a
Program implementation in C++/Java on description of the functionality and constraints of
the computer - 80 marks RailReservationRecord object given below:
(which includes preparing the algorithm, writing and a) Reservation is made from a start station to a
testing of the programme, execution and viva voce.)
destination station on a single train, in a
Given below are some sample problems that can be particular class, for a particular date, for a
taken up. The list however, is only suggestive. These maximum of 6 persons. So we are not taking
problems are of different levels of difficulty. They are care of journeys requiring two or more trains.
indicative of the kinds of problems students can try in
their labs. Most problems require the student to devise b) Reservation can be made up to a maximum of
an algorithm or to design suitable classes to model the 60 days and up to a minimum of 1 day before
problem. the date of departure.

113
c) Reservations already made can be canceled Define the class hierarchy above. Define the
for the entire group of persons or for a subset functions in the right classes in the hierarchy so
of the group of persons in the reservation that over riding is minimal. The design should be
record. such that objects can be created only for those
classes that are at the leaves of the hierarchy tree
d) Assume that the trains have infinite capacity. (that is, classes which do not have any direct sub
So you need not make checks to see whether classes).
space is available or not. 5. Write a program (as a, possibly static, method of a
class) which takes a string argument and prints out
e) For reserving accommodation each all permutations of the string with each
passenger’s name, gender and age is required. permutation being printed out only once if
characters are not repeated in the string. For
f) Each RailReservationRecord object must have
example, if the string argument is "abc" one
a unique reference number/string for access possible printout is -
purposes.
abc acb bca bac cab cba (the order in which the
You can use classes you may have defined in permutations are printed is not important). Your
some of your earlier labs. You can also invent program should use a recursive function.
more classes than the ones listed above if you 6. A popular children's puzzle is the 15-puzzle. This
think they are necessary. All your classes should puzzle has a frame that can hold 16 tiles. It has
have proper access declarators private, public, etc. tiles numbered from 1 to 15 and one empty space.
The goal is to slide the tiles using the empty space
4. We want to model the following situation using a such that all tiles are arranged in ascending order
class hierarchy. Shapes can be closed or open. row wise. For example if 0 represents the empty
Closed shapes can be one of: polygon, circle or space a little trial and error shows that the
ellipse. A polygon is a triangle, a quadrilateral or following initial configuration can be taken to the
goal configuration:
an n-gon (that is, an n sided polygon where n>4).
Triangles are isosceles, equilateral or scalene. A 1 2 3 4
closed shape is represented by an array of points. 5 6 0 7
The shape is realized by joining the points in the
9 10 12 8
array, by a straight line, in order of increasing
index. Finally, the last point is joined to the first 13 14 11 15
point by a straight line thus closing the figure. Write a program which, given an initial
configuration prints out the moves which will take
There are three operations common to all shapes: the puzzle to the goal configuration.
perimeter, area and is Convex. The function
Note that random initial configurations may not
perimeter calculates and returns the perimeter of
always have a solution. (A much harder problem
the shape, area similarly, calculates and returns is to determine if given an arbitrary initial
the area of the shape and is Convex returns true if configuration whether it is solvable - that is the
the shape is convex and false otherwise. goal configuration is reachable).

114
EQUIPMENT • Internet connection for accessing the World Wide
There should be enough computer systems to provide Web and email facility.
for a teaching schedule where at least three-fourths of • The computers should have a Minimum of 128
the time available is used for programming. MB RAM and a PIII or Equivalent Processor.
Schools should have equipment/platforms such that all
• Good Quality printers.
the software required for practical work runs properly,
i.e. it should run at acceptable speeds. Software:
Since hardware and software evolve and change very • Any suitable Operating System can be used.
rapidly, the schools shall need to upgrade them as
required. Following are the recommended The criteria used in the selection of software should
specifications as of now: be:
The Facilities:  It should have a good user interface so that the
• A lecture cum demonstration room with a beginners may learn to use it easily.
MULTIMEDIA PROJECTOR/ an LCD and
 It should be used widely and be easily available.
O.H.P. attached to the computer.
• A white board with white board markers should  The material related to the software should be
be available. abundantly available.
• A fully equipped Computer Laboratory that The schools should ensure that latest versions of
allows one computer per student. software are used.

115

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