MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This...

11

Transcript of MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This...

Page 1: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior
Page 2: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

MODERN’S

(A TEXTBOOK FOR CLASS XII)

SOFIA GOEL(MIT, B.Sc.)

ARCHANA JAIN(MCA, M.Sc., B.Sc.)

C SOMPUTER CIENCE C++

Strictly in accordance with the latest guidelinesand syllabus issued by CBSE

Price:

(Producers of Quality Textbooks)

MODERN PUBLISHERS

NEW EDITION

aaabbbcccOF

500.00

1

Inner.psD:\data\MGS-pm65\Modern\Modern's abc of Computer Science-XII (2014-15)\Prelims Page\Inner & Preface Computer XII.cdrWednesday, March 11, 2015 3:59:07 PMColor profile: Disabled

Composite 150 lpi at 45 degrees

Page 3: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

C

K

M

Y

C

K

M

Y

OUR ADDRESSES IN INDIA❑ New Delhi: MBD House, Gulab Bhawan, 6, Bahadur Shah Zafar Marg Ph. 23317931, 23318301❑ Mumbai: A-683, T.T.C. Industrial Area, M.I.D.C. Off. Thane-Belapur Road, Navi Mumbai Ph. 32996410, 27780821, 8691053365❑ Chennai: No. 26 B/2 SIDCO Estate, North Phase, Pataravakkam, Ambattur Industrial Estate, AmbatturPh. 26359376, 26242350❑ Chennai: 15A, Ground Floor, Tiruvenkatapuram, 1st Street, Near Nungambakkam Railway Station, Choolaimedu Ph. 23741471❑ Kolkata: Satyam Building, 46-D, Rafi Ahmed Kidwai Marg Ph. 22296863, 22161670❑ Jalandhar City: MBD House, Railway Road Ph. 2458388, 2459046, 2455663❑ Bengaluru: 124/31, 1st Main, Industrial Town (Near Chowdeshwari Kalyan Mantap), West of Chord Road, Rajajinagar

Ph. 23103329, 23104667❑ Hyderabad: 3-4-492, Varun Towers, Barkatpura Ph. 27564788, 9985820001❑ Ernakulam: Surabhi Building, South Janatha Road, Palarivattom Ph. 2338107, 2347371❑ Pune: Kaul Building No. 2, IInd Floor, Flat ‘C’, Guru Nanak Nagar, Shankar Sheth Road Ph. 26431413, 26435071❑ Nagpur: Near N.I.T. Swimming Pool, North Ambazari Road, Ambazari Layout Ph. 2248104, 2248106, 2248649, 2245648❑ Ahmedabad: Godown No. 10, Vedant Prabha Estate, Opp. ONGC Pumping Station, Sarkhej Sanand Road, Sarkhej

Ph. 26890336❑ Cuttack: Badambadi, Link Road Ph. 2367277, 2367279, 2313013❑ Guwahati: Chancellor Commercial, Hem Baruah Road, Paan Bazar Ph. 2510492, 2731008❑ Lucknow: 173/15, Dr. B. N. Verma Road, Old 30 Kutchery Road Ph. 4010992, 4010993❑ Patna: Ist Floor, Annapurna Complex, Naya Tola Ph. 2672732, 2686994, 2662472❑ Bhopal: Plot No. 137, 138, 139, Sector-1, Special Industrial Area, Govindpura Ph. 2581540, 2601535❑ Jabalpur: 840, Palash Chamber, Malviya Chowk Ph. 2405854❑ Goa: H. No. 932, Plot No. 66, Kranti Nagar (Behind Azad Bhawan), Alto Porvorim, Bardez Ph. 2413982, 2414394❑ Jaipur: C-66A, Road No. 1, V.K.I., Industrial Area Ph. 2210158, 2210159❑ Raipur: Behind Kailash Provision Store, Ravi Nagar Ph. 2445320, 2422542❑ Karnal: Plot No. 203, Sector-3, HSIDC, Near Namaste Chowk, Opp. New World Ph. 2220006, 2220009❑ Shimla (H.P.): C-89, Sector-I, New Shimla-9 Ph. 2670221,2670618❑ Jammu (J&K): MBD Office, 48 Gurjjar Colony, C/o Gurjar Desh Charitable Trust, N.H. Bye Pass RoadPh. 2467376, 9419104035❑ Ranchi (Jharkhand): Shivani Complex, 2nd Floor, Jyoti Sangam Lane, Upper Bazar Ph. 9431257111❑ Sahibabad (U.P.): B-9 & 10, Site IV, Industrial Area Ph. 3100045, 2896939❑ Dehradun (Uttarakhand): Plot No. 37, Bhagirathipuram, Niranjanpur, GMS Road Ph. 2520360, 2107214Delhi Local Offices :❑ Delhi (Shakarpur): MB 161, Street No. 4 Ph. 22546557, 22518122❑ Delhi (Daryaganj): MBD House, 4587/15, Opp. Times of India Ph. 23245676❑ Delhi (Patparganj): Plot No. 225, Industrial Area Ph. 22149691, 22147073

We are committed to serve students with best of our knowledge and resources. We have taken utmost care and attention while editingand printing this book but we would beg to state that Authors and Publishers should not be held responsible for unintentional mistakethat might have crept in. However, errors brought to our notice shall be gratefully acknowledged and attended to.

© All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by anymeans, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of the publisher. Any breach willentail legal action and prosecution without further notice.

Published by: MODERN PUBLISHERSMBD House, Railway Road, Jalandhar City.

Printed at: HOLY FAITH INTERNATIONAL (P) LTD.B-9 & 10, Site IV, Industrial Area, Sahibabad (U.P.)

MODERN'S OUTSTANDING TEXTBOOKSFOR CLASS XII

� Modern's abc + of Physics� Modern's abc of Practical Physics� Modern's abc of Numerical Problems in Physics� Modern's abc of Physics Lab Manual� Modern's abc + of Chemistry� Modern's abc of Practical Chemistry� Modern's abc of Chemistry Lab Manual� Modern's abc + of Biology� Modern's abc of Practical Biology� Modern's abc of Biology Lab Manual� Modern's abc + of Mathematics� Solutions of Modern's abc of Mathematics� Modern's abc of Computer Science

FOR JEE-Main, JEE-Advance& Medical (AIPMT)

� Modern's abc of Objective Physics� Modern's abc of Objective Chemistry� Modern's abc of Objective Mathematics� Modern's abc of Objective Biology� Modern's abc of Crash Course Physics (JEE-Main)� Modern's abc of Crash Course Chemistry (JEE-Main)� Modern's abc of Crash Course Mathematics (JEE-Main)

Page 4: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

The textbook has been especially

designed for students of Class XII. This book strictly adheres to the latest syllabus

prescribed by the CBSE Board for Senior Secondary Education. It covers all

aspects of computer learning—Fundamental concepts of software programming

with practical applications in problem solving.

This book is carefully research and practice. The text

unfolds the world of computers in a simple and lucid language. The textbook

begins with information, progresses through Review of C++

Class XI, Concepts of OOPS, Programming in C++, Data Structures, Database,

SQL and File Handling, Networking and Open Source Technologies. Separate

are given at the end of every chapter along with

and as it will help students to explore C++

programming language and inculcate in a fun-loving manner.

Each theme kindles interest in students through various examples, illustrations,

diagrams, flowcharts, etc. The authors have made every attempt to point out

various made by students in examinations which serves as an

initiative to prevent them further. Summary of important concepts, themes,

functions, etc., in each chapter have been assigned under In order

to memorise important points, box items like serves a good purpose.

This is a student-and-teacher-friendly textbook. Every effort has been made to

make it comprehensive and flawless. However, any suggestion to improvise this

book will be earnestly solicited.

Modern’s abc of Computer Science C++

Solved Questions Solved

Exercises Practice Problems

Common Errors

Quick Review.

Remember

written after thorough

several layers of

knowledge

— Authors

PREFACE

2

preface.psD:\data\MGS-pm65\Modern\Modern's abc of Computer Science-XII (2014-15)\Prelims Page\Inner & Preface Computer XII.cdrSaturday, February 21, 2015 11:37:02 AMColor profile: Disabled

Composite 150 lpi at 45 degrees

Page 5: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

(iv)

C

K

M

Y

COMPUTER SCIENCE

Class-XII (Theory)

Duration: 3 Hours Total Marks : 70

Unit No. Unit Name Marks

(i) Object Oriented Programming in C++ 30

(ii) Data Structure 14

(iii) Database Management System and SQL 8

(iv) Boolean Algebra 8

(v) Communication Technologies 10

70

UNIT-I: OBJECT ORIENTED PROGRAMMING IN C++Review: C++ covered in class-XI.

Object Oriented Programming:

Concept of Object Oriented Programming - Data hiding, Data encapsulation, Class and Object,Abstract class and Concrete class, Polymorphism (Implementation of polymorphism Functionoverloading as an example in C++); Inheritance, Advantages of Object Oriented Programmingover earlier programming methodologies.

Implementation of Object Oriented Programming Concepts in C++:

Definition of a class, Members of a class - Data Members and Member Functions (methods),Using Private and Public visibility modes, default visibility mode (private); Member functiondefinition: inside class definition and outside class definition using scope resolution operator (::);Declaration of objects as instances of a class; accessing members from object(s), Objects asfunction arguments - pass by value and pass by reference.

Constructor and Destructor:

Constructor: Special Characteristics, Declaration and Definition of a constructor, DefaultConstructor, Overloaded Constructors, Copy Constructor, Constructor with default arguments.

Destructor: Special Characteristics, Declaration and definition of destructor.

Inheritance (Extending Classes):

Concept of Inheritance, Base Class, Derived Classes, protected visibility mode; Singlelevel inheritance, Multilevel inheritance and Multiple inheritance, Privately derived, Publiclyderived and Protectedly derived class, accessibility of members from objects and within derivedclass(es).

Page 6: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

(v)

C

K

M

Y

Data File Handling:Need for a data file, Types of data files - Text file and Binary file.

Text File: Basic file operations on text file: Creating / Writing text into file, Reading andManipulation of text from an already existing text File (accessing sequentially).

Binary File: Creation of file, Writing data into file, Searching for required data from file,Appending data to a file, Insertion of data in sorted file, Deletion of data from file, Modificationof data in a file;

Implementation of above mentioned data file handling in C++;

Components of C++ to be used with file handling:

Header file : fstream.h; ifstream, ofstream, fstream classes;

Opening a text file in in, out, and app modes;

Using cascading operators (>><<) for writing text to the file and reading text from the file;open(), get(), put(), write(), getline() and close() functions; Detecting end-of-file (with or withoutusing eof() function); tellg(), tellp(), seekg(), seekp() functions.

Pointers:Introduction to Pointer: Declaration and Initialization of Pointers; Dynamic memory allocation/deallocation operators: new, delete; Pointers and Arrays: Array of Pointers, Pointer to an array(1 dimensional array), Function returning a pointer, Pointer to structures: De-reference operator,self referencial structures.

UNIT-II: DATA STRUCTURESIntroduction to data structure – arrays, stacks, queues.

Arrays:One and two-dimensional arrays: Sequential allocation and address calculation;One dimensional array: Traversal, Searching (Linear, Binary Search), Insertion of an elementin an array, deletion of an element from an array, Sorting (Insertion, Selection, Bubble)Two-dimensional arrays: Traversal Finding sum / difference of two N × M arrays containingnumeric values, Interchanging Row and Column elements in a two-dimensional array.

Stack (Array and Linked implementation of Stack):Introduction to stock (LIFO Last in First Out Operations)Operations on Stack (PUSH and POP) and its Implementation in C++, Converting expressionsfrom INFIX to POSTFIX notation and evaluation of Postfix expression.

Queue: (Circular Array and Linked Implementation):Introduction to Queue (FIFO - First in First Out Operations)

Operations on Queue (Insert and Delete) and its Implementation in C++.

UNIT-III: DATABASE MANAGEMENT SYSTEM AND SQLDatabase Concepts : Introduction to database concepts and its need.

Relational Data Model : Concept of domain, tuple, relation, key, primary key, alternate key,candidate key;

Page 7: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

(vi)

C

K

M

Y

Relational Algebra: Selection, Projection Union and Cartesian product;

Structured Query Language:

General Concepts : Advantages of using SQL, Data Definition Language and Data ManipulationLanguage;

Data Types: NUMBER / DECIMAL, CHARACTER / VARCHAR / VARCHAR2, DATE.

SQL Commands :

CREATE TABLE, DROP TABLE, ALTER TABLE, UPDATE...SET..., INSERT, DELETE; SELECT,DISTINCT, FROM, WHERE, IN, BETWEEN, GROUP BY, HAVING, ORDER BY;

SQL functions: SUM, AVG, COUNT, MAX and MIN;

Obtaining results (SELECT query) from 2 tables using equi-join and Union.

Note: Implementation of the above mentioned commands could be done on any SQL supportedsoftware on one or two tables.

UNIT-IV: BOOLEAN ALGEBRARole of Logical Operations in Computing.

Binary-valued Quantities, Boolean Variable, Boolean Constant and Boolean Operators: AND,OR, NOT; Truth Tables; Closure Property, Commutative Law, Associative Law, Identity Law,Inverse Law, Principle of Duality, Idem potent Law, Distributive Law, Absorption Law, InvolutionLaw, DeMorganís Law and their applications;

Obtaining Sum of Product (SOP) and Product of Sum (POS) form from the Truth Table,Reducing Boolean Expression (SOP and POS) to its minimal form, Use of Karnaugh Map ofminimization of Boolean expressions (up to 4 variables).

Application of Boolean Logic:

Digital electronic circuits using basic Logic Gates (NOT, AND, OR, NAND, NOR)

Use of Boolean operators (AND, OR) in search engine queries.

UNIT-V: COMMUNICATION TECHNOLOGIES

Evolution of Networking: ARPANET, Internet, Interspace.

Different ways of sending data across the network with reference to switching techniques (Circuitand Packet switching)

Data Communication Terminologies: Concept of Channel, Bandwidth (Hz, KHz, MHz) and Datatransfer rate (bps, kbps, Mbps, Gbps, Tbps).

Transmission Media: Twisted pair cable, coaxial cable, optical fiber, infrared, radio link,microwave link and satellite link.

Network Devices: Modem, RJ45 connectors, Ethernet Card, Router, Repeater, Switch, Gateway,Wi-Fi card;

Network Topologies and types: Bus, Star, Tree, PAN, LAN, WAN, MAN;

Network Protocol: TCP / IP, File Transfer Protocol (FTP), PPP, SMTP, POP3, Remote Login(Telnet), Internet Wireless / Mobile Communication protocol such as GSM, CDMA, GPRS, WLL,

Page 8: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

(vii)

C

K

M

Y

Mobile Telecommunication Technologies: 1G, 2G, 3G and 4G

Protocols for Chat and Video Conferencing VOIP

Wireless technologies such as Wi-Fi and WiMax

Network Security Concepts:

Threats and prevention from Viruses, Worms, Trojan horse, Spams

Use of Cookies, Protection using Firewall;

India IT Act, Cyber Law, Cyber Crimes, IPR issues, Hacking.

Introduction to Web Services:

WWW, Hyper Text Markup Language (HTML), eXtensible Markup Language (XML); HyperText Transfer Protocol (HTTP); Domain names; URL; Website, Web browser, Web Servers;Web Hosting, Web Scripting - Client side (VB Script, Java Script PHP) and Server side (ASP,JSP, PHP), Web 2.0 (for social networking)

(Practical)

Duration: 3 Hours Total Marks: 30

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

Notes: The types of problems to be given will be of application type from the followingtopics.• Arrays (One dimensional and two dimensional)• Class(es) and objects• Stack using arrays and or linked implementation• Queue using arrays (circular) and or linked implementation• Binary File operations (Creation, Displaying, Searching and modification)• Text File operations (Creation, Displaying and modification)

2. SQL Commands 05Five Query questions based on a particular Table / Reaction to be tested practically onComputer during the examination. The command along with the result must be written inthe answer sheet.

3. A digital circuit design (after reduction using K-map) to be given during the exmination.The question must be written in the answer sheet.

Page 9: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

(viii)

C

K

M

Y

4. Project Work 05The project has to be developed in C++ language with Object Oriented Technology andalso should have use of Data files. (The project is required to be developed in a group of2-4 students)• Presentation on the computer• Project report (Listing, Sample, Outputs, Documentation)

• Viva5. Practical File 05

Must have minimum 20 programs from the following topics:

• Arrays (One dimensional and two dimensional, sorting, searching, merging, deletionand insertion of elements)

• Class(es) and objects

• Stacks using arrays (linear and circular) and linked implementation

• File (Binary and Text) operations (Creation, Updation, Query)

• Any computational based problems.

15 SQL commands along with the output based on any table / relation.

6. Viva Voce 05

Viva will be asked from the syllabus covered in class XII and the project developed by

student.

Page 10: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

C

K

M

Y

(ix)

UNIT–I : OBJECT ORIENTED PROGRAMMING IN C++

1. REVIEW OF C++ 1–95

1.1 Introduction 2� Object Oriented Programming� Steps to Run C++ Program� Error Messages in C++

1.2 C++ Basics 5� C++ Character Set� C++ Tokens� Literals

1.3 Operators and Expressions 7� Arithmetic Operators� Relational Operators� Logical Operators� Conditional Operators (?:)� Expressions

1.4 Data Types 10� Type Modifiers� Type Conversion� Variables� Access Modifier : Const

1.5 Control Structures and Decision Statements 12� if Statement� The Switch Statement� Loops / Iteration Statements� For Loop� do…while Loop� Jump Statements

1.6 Standard Library Functions 22� Standard Input Output Functions� Character Functions� String Functions� Standard Library Functions

1.7 Functions 26� Function Definition� Function Prototype� Call by Value� Call by Reference� Default Arguments� Return Statement� Local Variables vs Global Variables� Storage Classes

1.8 Arrays 331.9 Structures 37

� Arrays of Structures� Passing Entire Structure as an Argument to Function� Passing an Array of Structure as an Argument to Function

1.10 Macros 39

Page 11: MODERN’S - KopyKitab · The textbook has been especially designed for students of Class XII. This book strictly adheres to the latest syllabus prescribed by the CBSE Board for Senior

Modern's abc Of Computer Science C++ For Class 12

Publisher : MBD GroupPublishers

ISBN : 9789351843535Author : Archana Jain AndSofia Goel

Type the URL : http://www.kopykitab.com/product/9535

Get this eBook

40%OFF