Vous êtes sur la page 1sur 23

MANAV RACHNA INTERNATIONAL UNIVERSITY

(Deemed to be University under section 3 of the UGC Act 1956)

CS-301: DISCRETE STRUCTURES

Periods/week Credits Max. Marks : 150


L :3 T: 1 4 Internal :
50
Duration of Exam: 3 Hrs External
: 100

Objective: To give exposure of basic discrete mathematical techniques widely used in


computer Science.

PART A
Unit-1: Set Theory
Introduction to set theory, Set operations, Algebra of sets, Duality, Finite and Infinite sets,
Classes of sets, Power Sets, set with set-elements.
Cartesian Product, Representation of relations, Types of relations, Equivalence relations and
partitions, Partial ordering relations and lattices.
Function and its types, Composition of functions and relations, Cardinality and inverse
functions.

Unit-2: Propositional Calculus


Basic operations: AND(^), OR(v), NOT(~) and their combinations. Truth value of a
compound statement, propositions, tautologies, contradictions.

Unit–3: Permutation & Combination and Probability


Permutations with and without repetition, Combination. Problems on permutation and
combinations. Probability, Laws of Probability, Conditional probability.

PART B

Unit-4: Recursion and Recurrence Relations


Polynomials, evaluation of polynomials, Sequences, Introduction to AP, GP and AG series,
partial fractions, linear recurrence relation with constant coefficients, Homogeneous
solutions, Particular solutions, Generating functions, Total solution of a recurrence relation
using generating functions.

Unit-5: Algebraic Structures


Definition and examples of a monoid, Semigroup, Groups and rings, Homomorphism,
Isomorphism and Automorphism, Subgroups and Normal subgroups, Cyclic groups, Integral
domain and fields, Cosets, Lagrange’s theorem.

Unit-6: Graphs and Trees


Introduction to graphs, Directed and Undirected graphs, Homomorphic and Isomorphic
graphs, Subgraphs, Cut points and Bridges, Multigraph and Weighted graph, Paths and
circuits, Shortest path in weighted graphs, Eulerian path and circuits, Hamilton paths and
circuits, Planar graphs, Euler’s formula, Trees, Spanning trees, Binary trees and its
traversals.

Text Books:

1. Discrete Mathematics : C.L Liu, 2008, MGH.

Reference Books:

1. Discrete Mathematics : Johnson Bough R., 2001, PEA.


2. Theory and Problems of Probability : S. Lipshutz, S.; Schaums Outline series: TMH.
3. Discrete Mathematical Structures: B. Kolman and R.C. Busby, 1996, PHI.
4. Discrete Mathematical Structures with Applications to Computers : Tembley J.P.&
Manohar, 2001, TMH.

3
6
Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each Part A and Part B (one from each unit) Student needs to attempt two
questions out of three from each part. Each question will be of 20 marks.

3
7
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

CS-302: DATA STRUCTURES & ALGORITHMS

Periods/week Credits Max. Marks : 150


L :3 T: 1 4 Internal :
50
Duration of Exam: 3 Hrs External :
100

Objective: To give exposure of basic data structures and related algorithms to prepare a
sound base of the students.

PART A
Unit-1: Introduction to Data Structures
Concept of data structure, various elementary data structures, Static and Dynamic
implementation of data structures. Pointers, pointer-arrays & functions, simple programs
using pointers. Stacks: operations on stacks, array based implementation of stacks,
Examples: Infix, postfix, prefix representation of expressions and their conversions,
Applications of stacks. Recursive functions and algorithms. Concept of time complexity.

Unit-2: Queues and Lists


Queues and operations on queues, Array based implementation of Queues, Circular queues
and double-ended queues. Priority Queues and their applications, Link-lists and operations
on Link-lists, implementation of linked list, Circular and doubly-linked lists, implementation
of Circular linked lists and doubly linked Lists, Linked List based implementation of stacks
and queues.

Unit-3: Trees
Definition of trees and types of trees. Binary trees: properties of binary trees and their
Implementation, Binary tree traversal: pre-order, post-order and in-order traversal. Binary
Search Tree and its implementation. Threaded trees. Balanced trees, balancing trees, left-
right rotations, operations on balanced trees.

PART B
Unit-4: Graphs
Undirected and Directed Graphs. Array based implementation of graphs: Adjacency matrix,
path matrix implementation. Linked List representation of graphs. Shortest path Algorithms:
Warshal, Krushkal and Prim Algorithms. Graph Traversal: Breadth first Traversal, Depth first
Traversal.

Unit-5: Sorting Algorithms


Introduction to Sorting, selection sort, Bubble sort, insertion sort and efficiency of these sort
algorithms. Shell sort, Merge sort, Merging of sorted arrays. Quick sort Algorithm and its
analysis. Construction of heaps and heap sort.

Unit-6: Searching Algorithms


Searching techniques: Linear search and binary search methods.
Problems based on searching techniques. Hash Tables, Hash functions, their
implementations and Applications.

Text Books:

1. Data Structures using C : A. M. Tenenbaum, Langsam, Moshe J. Augentem, PHI.


2. Data Structures and Algorithms : A.V. Aho, J.E. Hopcroft and T.D. Ullman, Pearson.

Reference Books:
1. Data Structures and Program Design in C : Robert Kruse, Pearson.
2. Theory & Problems of Data Structures : Lipschetz S., Schaum’s outline Series,TMH.

3
8
3. Introduction to Data Structures in C : Kamathne, Pearson
4. Introduction to Computers Science: An Algorithms Approach : J. P. Tremblay, R.B.
Bunt, TMH.
5. Data Structure and the Standard Template library : Willam J. Collins, 2003, TMH
Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each Part A and Part B (one from each unit) Student needs to attempt two
questions out of three from each part. Each question will be of 20 marks.

3
9
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

CS- 303: COMPUTER ARCHITECTURE AND ORGANIZATION

Periods/week Credits Max. Marks : 150


L :3 T: 1 4 Internal :
50
Duration of Exam: 3 Hrs External
: 100

Objective: To give exposure of basics of computer Architecture and Organisation to


develop understanding the working of computer system.

PART A

Unit-1: Computer Hardware and General System Architecture


Boolean algebra and Logic gates, Combinational logic blocks (Adders, Multiplexers,
Encoders, De-coder), Sequential logic blocks(Latches, Flip-Flops, Registers, Counters).
General System Architecture: Store program control concept, Multilevel viewpoint of a
machine: digital logic, micro architecture, ISA, operating systems, high level language.
Structured organization: CPU, caches, main memory, secondary memory units & I/O;
Performance metrics; MIPS, MFLOPS.

Unit-2: Instruction Set Architecture


Instruction set based classification of processors (RISC, CISC, and their comparison);
Addressing modes: Register, Immediate, Direct, Indirect, Indexed; Operations in the
instruction set: Arithmetic and Logical, Data Transfer, Control Flow; Instruction set formats.

Unit-3 Basic non-Pipelined CPU Architecture


CPU Architecture types (Accumulator, Register, Stack, Memory/ Register) detailed data path
of a typical register based CPU, Fetch-Decode-Execute cycle (typically 3 to 5 stages);
Microinstruction sequencing, Implementation of control unit, Enhancing performance with
pipelining.

PART B

Unit-4: Memory Hierarchy & I/O Techniques


The need for a memory hierarchy, Locality of reference principle, Memory hierarchy in
practice: Cache, main memory and secondary memory, Memory parameters: access/ cycle
time, cost per bit.
Main memory: Semiconductor RAM & ROM organization, memory expansion, Static &
dynamic memory types; Cache memory: Associative & direct mapped cache organizations.

Unit-5: Introduction to Parallelism in Computer Architecture


Goals of parallelism: Use of concurrency, throughput enhancement. Flynn’s classification of
computers (SISD, MISD, MIMD); Amdahl’s law; Instruction level parallelism (Pipelining, Super
scaling –basic features); Processor level parallelism (Multiprocessor systems overview).

Unit-6: Computer Organization


Instruction codes, computer register, computer instructions, timing and control, instruction
cycle. Type of instructions: memory reference, register reference. I/O reference. Basics of
Logic Design, accumulator logic, Control memory, address sequencing, micro-instruction
formats, micro-program sequencer, Stack Organization. Instruction Formats, Types of
interrupts; stored Programmed concept.

Text Books:

4
0
1. Computer Systems Architecture : Morris Mano, 3rd Ed., Pearson.
2. Computer Architecture and Organization by John P. Hayes, 3rd Ed., 1998, TMH
Reference Books:
1. Digital Design and Computer Organisation : Gill, N.S and Dixit, J.B,Khanna
Publication
2. Computer Organisation and Architecture : William Stalling, 7th Ed. Pearson.
3. Structured Computer Organisation : A.S. Tanenbaum, 5th Ed., Pearson.
4. Computer Architecture: Nicholas Carter, TMH.

Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each Part A and Part B (one from each unit) Student needs to attempt two
questions out of three from each part. Each question will be of 20 marks.

4
1
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

CS-304: OBJECT ORIENTED PROGRAMMING SYSTEMS

Periods/week Credits Max. Marks : 150


L :3 T: 1 4 Internal :
50
Duration of Exam: 3 Hrs External
: 100

Objective: To give exposure of Object Oriented Programming Concepts and use these
concepts to develop programming skills in C++.

PART A

Unit-1: Object Oriented Concepts


Introduction to Objects and Object Oriented Programming; Encapsulation (Information Hiding),
Access Modifiers for methods and variables in a class; Access modifiers: public, protected, private,
package. Polymorphism, Overloading; Inheritance and container classes, Overriding Methods,
Abstract Classes, Reusability, Class’s Behaviors.

Unit–2: Classes and Objects


Introduction to classes and objects, Class Scope. Initializing class objects with constructors,
Accessing class members: Variables and Methods, Use of default arguments in a class.
Introduction of packages and interfaces. Implementation of packages and interfaces. Constants
variables and constant member functions. Objects as members of class, friend function and
virtual function. Dynamic Memory Allocation, Static Class Members, Proxy Classes, Destructors.

Unit-3: Polymorphism:
Concept of polymorphism; function overloading and operator overloading, Restrictions on
Operator Overloading, Operator Functions as Class Members versus Friend Functions,
Overloading operators: <<, >>, Unary Operators, Overloading Binary Operators.

PART B
Unit-4: Inheritance
Introduction to Inheritance, types of inheritance, Base Classes and Derived Classes.
Abstract base classes: Use of virtual functions in classes. Pointer to derived class. Use of
Protected and Private Inheritance and Member Functions. Overriding Base Class Members in a
Derived Class, Use of Constructors and Destructors in derived Classes, Implicit Derived Class
Object to Base Class Object Conversion, Composition versus. Inheritance.

Unit-5: Files Handling


Introduction of file handling. Classes and file stream operations. Creating sequential files,
reading and writing files, opening and closing of file, detecting the end of file. File Modes:
sequential and random file modes. File pointers and their manipulations. Sequential input and
output operations. Updating a file: sequential and random access files. Error handling during file
operations.

Unit-6: Templates & Exception Handling


Function Templates, Overloading Template Functions, Class Template, Class Templates and Non-
Type Parameters, Templates and Inheritance, Templates and Friend classes. Templates and
Static Members. Introduction of Exception Handling, Exception Handling mechanisms: Try,
Throw, Catch. Throwing an Exception, Catching an Exception, Re-throwing an Exception,
Exception specifications, Processing Unexpected Exceptions, use of exceptions in inheritance.
4
2
Text Books:
1. Object Oriented Programming in Turbo C++ : Robert Lafore , 4th Ed., Pearson Education.
2. Object oriented Programming with C++:E Balagurusamy, 2001, TMH.

Reference Books:
1. Computing Concepts with C++ Essentials: Horstmann, John Wiley.
2. Object Oriented Programming in C++ : Bhave, Pearson.
3. Programming with C++ : D Ravichandran, 2003, TMH.
4. The Complete Reference in C++ :Herbert Schildt, 2005, TMH.

Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each Part A and Part B (one from each unit) Student needs to attempt two
questions out of three from each part. Each question will be of 20 marks

4
3
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

CS-305: DATABASE MANAGEMENT SYSTEMS

Periods/week Credits Max. Marks : 150


L :3 T: 1 4 Internal :
50
Duration of Exam: 3 Hrs External
: 100

Objective: To understand basic concepts and Architecture of Database Management


Systems and Structured query language.

PART A
Unit–1:Introduction
Overview of Database Management System; Advantages of DBMS over file processing
systems; Various views of data; Data Models: Relational Model, Network Model, Hierarchical
Model, Object Oriented Model. Entity Relationship Model, Object Relational Model.
Introduction to Database Languages, Advantages of database languages, Responsibility of
Database Administrator, Overall DBMS Structure.

Unit-2: Introduction to Client/Server Architecture


Three-level Architecture of Database Management System, Data independence, E-R
Diagram (Entity Relationship), Mapping constraints, Keys, Reduction of E-R diagrams into
Tables.

Unit-3: Relational Model


Structure of Relational Database, Relational Algebra & various operations, Relational and
Tuple calculus, extended relational algebra operations.
PART B
Unit-4: Introduction to Query Languages
Structured Query Language; Basic structure of SQL, set operations, Aggregate Functions,
Nested Sub Queries, Modification of Databases, Join Relations. DDL, DML, Query By
Example. Integrity constraints, Functional Dependencies, lossless-join Decomposition,
Dependency Preservation, Multivalued Dependencies. Normalization up to Fourth Normal
Form, BCNF (Boyce Code Normal Form).

Unit-5: File Organisation


Sequential Files, Index sequential files, Direct files, Hashing, Collision resolving techniques,
indexing using tree structure, B-trees index files.

Unit-6: Concurrency Control and Recovery


Introduction to Transaction concept, state. Implementation of atomicity and durability,
serialization, Recoverability, Testing of serializability, Concurrency Control, various
protocols, Recovery System, recovery and atomicity, log based recovery, shadow paging,
deadlock detection. Concept of Parallel, Object and Distributed Databases.

Text Books:
1. Database System Concepts : A. Silberschatz, H.F. Korth and S. Sudarshan, 3rd
Ed.,1997, TMH.
2. Introduction to Database Management System : Bipin Desai, 1991,Galgotia Pub.

Reference Books:
4
4
1. Fundamentals of Database Systems : R. Elmasri and S.B. Navathe, 3rd Ed, 2000, AW.
2. An Introduction to Database Systems : C.J. Date, 7th ED., 2000, Addison-Wesley.
3. Database Systems : Concepts, Design and Applications : S K Singh, Pearson.
4. SQL, PL/SQL The Programming Language of Oracle : Ivan Bayross, 2nd Ed., BPB
Publication.
5. Oracle Database 10g PL/SQL 101 : Allen and Christopher, 3rd edition, TMG.
Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each Part A and Part B (one from each unit) Student needs to attempt two
questions out of three from each part. Each question will be of 20 marks

4
5
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

EC-302: DIGITAL ELECTRONICS


Periods/week Credits Max. Marks : 150
L :3 T: 1 4 Internal :
50
Duration of Exam: 3 Hrs External
: 100

Objective: To give exposure of basic concepts of Digital Electronics to understand working of


hardware of computer Systems.

PART A
Unit-1: Digital Technique
Binary Arithmetic, overview of Karnaugh map, Tabulation minimization procedure, Error
detecting and correcting codes.

Unit-2: Combinational Design


Design of Combinational circuits, Adder / Subtractor, Encoder / decoder, MUX / De-Mux,
BCD Arithmetic, code converters, Comparators. Implementation of combinational logics
using ROM, PAL, PLA, FPGA and their use in combinational circuit design.

Unit-3: Logic Gates: Basic gates, RTL, TTL, ECL, HTL, CMOS & NMOS logic gates, circuit
diagram and analysis characteristics and specifications.

PART B
Unit-4: Flip Flops
Concept of Flip-flop, SR, JK, T, D Flip-Flops, Master/Slave Flip-Flops, Analysis of clocked
sequential circuits and their design, state minimization, state assignment, circuit
implementation, Register – Shift Register.

Unit-5: Counters
Synchronous and Asynchronous Counter-Johnson counter, Ring Counter, Decade counter ,
Sequence Generator.

Unit-6: A/D and D/A Converters


Weighted resistor and R-2R ladder, D/A converters and their specifications. A/D Converters:
Quantization, Parallel –comparator, successive approximation, counting type, Dual slope
ADC, Specifications of ADC’s.

Text Books:
1. Digital Circuit and Design: S.Salivahanan, Vikas.Publication.
2. Digital Logic Design : Sedha R.S., S. Chand.

Reference Books:
1. Digital Logic and Computer Design : M. Morris Mano, PHI..
2. Modern Digital Electronics: Jain, R.P., TMH.
3. Digital Design : John. F .Wakerly, Pearson Education.

4
6
Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each Part A and Part B (one from each unit) Student needs to attempt two
questions out of three from each part. Each question will be of 20 marks

MANAV RACHNA INTERNATIONAL UNIVERSITY


(Deemed to be University under section 3 of the UGC Act 1956)
MA-341 : APPLIED MATHS-III
(Only for students admitted directly in II year under lateral entry scheme)
Periods/week Credits Max. Marks : 150
L: 3 T: 1 4 Internal : 50
Duration of Examination: 3 Hrs External
: 100

Objective: The objective of the course is to develop mathematical skills which are
pertaining to other engineering subjects.

PART-A

Unit 1: Convergence and Divergence of Infinite Series


Introduction to sequences, infinite series, tests for convergence/divergence: p-series test,
comparison test, ratio test, root test, Raabe's test, logarithmic test, integral test, Cauchy’s
condensation test. Alternating series: Absolute convergence and conditional convergence.

Unit 2: Successive differentiation and maxima and minima


Leibnitz’s theorem (without proof), Taylor’s and Maclaurin’s series, expansion of functions of
one variable. Maxima and minima for one variable.

Unit 3: Functions of two or more Variables


Limit and continuity, Differentiation of function of several variables, partial derivatives,
derivatives of composite and implicit function, Euler’s theorem on homogenous functions,
Total derivative, change of variables, Jacobians and their properties, Taylor’s and Mclaurin’s
series for functions of two variables, Maxima and minima of functions of two variables.

PART-B

Unit 4: Ordinary differential equations


Introduction, exact differential equations, equation reducible to exact differential equations,
ordinary linear differential equations with constant co- efficient, complete solutions of linear
differential equations with constant co- efficient, method of variation of parameters,
simultaneous linear differential equations.

Unit 5: Laplace transforms


Introduction, properties of transform, transforms of elementary functions, Laplace
transforms of derivatives and integrals, differentiation and integration of transforms, Inverse
Laplace Transformation, convolution theorem, second shifting theorem, unit step function,
impulse function - transform of step functions, transforms of periodic functions, Laplace
transforms in the solution of ordinary differential equation system.

Unit 6: Matrix Algebra


Rank of matrix, elementary transformation, elementary matrices, inverse using elementary
transformation, normal form of matrices, linear dependence and independence of vector,
linear systems of algebraic equations, consistency, homogeneous system of equations,
Eigen values and Eigen vectors, Cayley-Hamilton theorem (without proof), orthogonal,
normal and unitary matrices.
4
7
Text Books:

1. Engineering Mathematics Vol. I: R S Goel and Y K Sharma, Manav Rachna Publishing .


2. Advanced Engineering Mathematics: Jain R K and Iyenger S R K , Narosa Publishing
House .
3. Advanced Engineering Mathematics: Erwin Kreyszig, Wiley Eastern.

Reference Books:

1. Engineering Mathematics: Babu Ram, Pearson Education.


2. Engineering Mathematics: Verma and Kumar, Ram Prasad & Sons Publishers.
3. Higher Engineering Mathematics: B.S. Grewal, Khanna Publishers.

Instructions for paper setting: Seven questions are to be set in total. First question will
be conceptual covering entire syllabus and will be compulsory to attempt. Three questions
will be set from each PART-A and PART-B (one from each unit). Student needs to attempt
two questions out of three from each part. Each question will be of 20 marks.

4
8
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

CS-312: DATA STRUCTURES AND ALGORITHMS LAB

Periods/week Credits Max. Marks : 50


P :2 1 Internal : 25
Duration of Exam: 2 Hrs External
: 25

List of Practicals:

4
9
1. Write a program to search an element in a two-dimensional array using linear
search.

2. Using iteration & recursion concepts write programs for finding the element in the
array
using Binary Search Method

3. Write a program to perform following operations on tables using functions only


a) Addition b) Subtraction c) Multiplication d) Transpose

4. Using iteration & recursion concepts write the programs for Quick Sort Technique

5. Write a program to implement the various operations on string such as length of


string concatenation, reverse of a string & copy of a string to another.

6. Write a program for swapping of two numbers using ‘call by value’ and ‘call by
reference’ strategies.

7. Write a program to implement binary search tree.


( Insertion and Deletion in Binary search Tree)

8. Write a program to create a linked list & perform operations such as insert, delete,
update, reverse in the link list

9. Write the program for implementation of a file and performing operations such as
insert,
delete, update a record in the file.

10. Create a linked list and perform the following operations on it


(a) add a node (b) Delete a node

11. Write a program to simulate the various searching & sorting algorithms and compare
their timings for a list of 1000 elements.

12. Write a program to simulate the various graph traversing algorithms.

13. Write a program for various tree traversal algorithms using two dimensional
representation for trees.

14. Write Program for traversal of a tree by pre-order, post-order and in-order traversal.

15. Write Program to sort data using Merge Sort and heap sort.

Note: At least 5 more exercises to be given by the teacher concerned.


Every Student needs to do minimum____numbers of experiments/practicals in a
semester.

MANAV RACHNA INTERNATIONAL UNIVERSITY


(Deemed to be University under section 3 of the UGC Act 1956)

CS-314 : OBJECT ORIENTED PROGRAMMING SYSTEMS LAB


Periods/week Credits Max. Marks : 50
P :2 1 Internal : 25
Duration of Exam: 2 Hrs External
: 25

5
0
List of Practicals:

Q1.Raising a number n to a power p is the same as multiplying n by itself p times. Write a


function called power ( ) that takes a double value for n and an int value for p, and
returns the result as double value. Use a default argument of 2 for p, so that if this
argument is omitted, the number will be squared. Write a main ( ) function that gets
values from the user to test this function.

Q2. A point on the two dimensional plane can be represented by two numbers: an X
coordinate and a Y coordinate. For example, (4,5) represents a point 4 units to the right
of the origin along the X axis and 5 units up the Y axis. The sum of two points can be
defined as a new point whose X coordinate is the sum of the X coordinates of the points
and whose Y coordinate is the sum of their Y coordinates.
Write a program that uses a structure called point to model a point. Define three points,
and have
the user input values to two of them. Then set the third point equal to the sum of the
other two,
and display the value of the new point. Interaction with the program might look like
this:
Enter coordinates for P1: 3 4
Enter coordinates for P2: 5 7
Coordinates of P1 + P2 are : 8, 11

Q 3. Create the equivalent of a four function calculator. The program should request the user
to enter a number, an operator, and another number. It should then carry out the
specified arithmetical operation: adding, subtracting, multiplying, or dividing the two
numbers. (It should use a switch statement to select the operation). Finally it should
display the result.
When it finishes the calculation, the program should ask if the user wants to do another
calculation. The response can be ‘Y’ or ‘N’. Some sample interaction with the program
might
look like this.
Enter first number, operator, second number: 10/ 3
Answer = 3.333333
Do another (Y/ N)? Y
Enter first number, operator, second number 12 + 100
Answer = 112
Do another (Y/ N) ? N

Q4. A phone number, such as (212) 767-8900, can be thought of as having three parts: the
area code (212), the exchange (767) and the number (8900). Write a program that uses
a structure to store these three parts of a phone number separately. Call the structure
phone. Create two structure variables of type phone. Initialize one, and have the user
input a number for the other one. Then display both numbers. The interchange might
look like this:
Enter your area code, exchange, and number: 415 555 1212
My number is (212) 767-8900
Your number is (415) 555-1212

Q 5. Create two classes DM and DB which store the value of distances. DM stores distances
in metres and centimeters and DB in feet and inches. Write a program that can read
values for the class objects and add one object of DM with another object of DB.
Use a friend function to carry out the addition operation. The object that stores the
results maybe
a DM object or DB object, depending on the units in which the results are required.
The display should be in the format of feet and inches or metres and cenitmetres
depending on
the object on display.
Q 6. Create a class rational which represents a numerical value by two double values-
NUMERATOR & DENOMINATOR. Include the following public member Functions:
• constructor with no arguments (default).
• constructor with two arguments.

5
1
• void reduce( ) that reduces the rational number by eliminating the highest
common factor between the numerator and denominator.
• Overload + operator to add two rational number.
• Overload >> operator to enable input through cin.
• Overload << operator to enable output through cout.

Write a main ( ) to test all the functions in the class.

Q 7. Consider the following class definition


class father {
protected : int age;
public;
father (int x) {age = x;}
virtual void iam ( )
{ cout < < “I AM THE FATHER, my age is : ”<< age<< end1:}
};
Derive the two classes son and daughter from the above class and for each, define
iam ( ) to write our similar but appropriate messages. You should also define
suitable constructors for these
classes.
Now, write a main ( ) that creates objects of the three classes and then calls iam ( )
for them.
Declare pointer to father. Successively, assign addresses of objects of the two
derived classes to
this pointer and in each case, call iam ( ) through the pointer to demonstrate
polymorphism in
action.

Q 8. Write a program that creates a binary file by reading the data for the students from the
terminal. The data of each student consist of roll no., name ( a string of 30 or lesser
no. of characters) and marks.

Q9. A hospital wants to create a database regarding its indoor patients. The information to
store include
a) Name of the patient
b) Date of admission
c) Disease
d) Date of discharge

Create a structure to store the date (year, month and date as its members). Create a base
class to store the above information. The member function should include functions to
enter information and display a list of all the patients in the database. Create a derived
class to store the age of the patients. List the information about all to store the age of the
patients. List the information about all the pediatric patients (less than twelve years in
age).

Q 10. Make a class Employee with a name and salary. Make a class Manager inherit
from Employee. Add an instance variable, named department, of type string.
Supply a method to toString that prints the manager’s name, department and
salary. Make a class Executive inherit from Manager. Supply a method to String
that prints the string “Executive” followed by the information stored in the
Manager superclass object. Supply a test program that tests these classes and
methods.

Q11. Imagine a tollbooth with a class called toll Booth. The two data items are a type
unsigned int to hold the total number of cars, and a type double to hold the total
amount of money collected. A constructor initializes both these to 0. A member
function called payingCar ( ) increments the car total and adds 0.50 to the cash total.
Another function, called nopayCar ( ), increments the car total but adds nothing to
the cash total. Finally, a member function called displays the two totals.

5
2
Include a program to test this class. This program should allow the user to push one
key to count a paying car, and another to count a nonpaying car. Pushing the ESC
kay should cause the program to print out the total cars and total cash and then exit.

Q12. Write a function called reversit( ) that reverses a string (an array of char). Use a for
loop that swaps the first and last characters, then the second and next to last
characters and so on. The string should be passed to reversit ( ) as an argument.

Write a program to exercise reversit ( ). The program should get a string from the
user, call
reversit ( ), and print out the result. Use an input method that allows embedded
blanks. Test the program with Napoleon’s famous phrase, “Able was I ere I saw
Elba)”.

Q13. Create some objects of the string class, and put them in a Deque-some at the head
of the Deque and some at the tail. Display the contents of the Deque using the
forEach ( ) function and a user written display function. Then search the Deque for a
particular string, using the first That ( ) function and display any strings that match.
Finally remove all the items from the Deque using the getLeft ( ) function and display
each item. Notice the order in which the items are displayed: Using getLeft ( ), those
inserted on the left (head) of the Deque are removed in “last in first out” order while
those put on the right side are removed in “first in first out” order. The opposite
would be true if getRight ( ) were used.

Q 14. Create a base class called shape. Use this class to store two double type values that
could be used to compute the area of figures. Derive two specific classes called
triangle and rectangle from the base shape. Add to the base class, a member
function get_data ( ) to initialize base class data members and another member
function display_area ( ) to compute and display the area of figures. Make
display_area ( ) as a virtual function and redefine this function in the derived classes
to suit their requirements. Using these three classes, design a program that will
accept dimensions of a triangle or a rectangle interactively and display the area.

Remember the two values given as input will be treated as lengths of two sides in the case
of
rectangles and as base and height in the case of triangles and used as follows:

Area of rectangle =x*y


Area of triangle =½*x*y

Note: At least 5 more exercises to be given by the teacher concerned.

Every Student needs to do minimum____numbers of experiments/practicals in a


semester.

5
3
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

CS- 315:Database Management Systems Lab


Periods/week Credits Max. Marks : 50
P :2 1 Internal : 25
Duration of Exam: 2 Hrs External
: 25

List of Practicals:
1. Create a student database (Roll No, Name, Dept) and write the queries to carry out
the following operations)
a) Add 20 new records to the database.
b) Delete 5 records from the database.
c) Add another column phone No. to this database.
d) Add values to the column phone No.
e) Change the data type of column phone No from number to var char2.
f) Delete a table from the database.
g) Drop the table.
2. Write queries to display records in ascending and descending order from the
student database.
3. Calculate and display the total no of students enrolled in following subjects from
students database:-
a) Mathematics
b) Science
c) English
4. Write queries to implement following functions to the student database.
a) Grouping functions.
b) Date and time functions.
c) Mathematical functions.
d) Character functions.
e) Conversion functions.

5. Create a view on student database to display the data of all the students in
Computer Science, Mechanical and IT departments.
6. Create an employee database and create the following two tables:
Employee (Empid, Name Department) and accounts (Empid, Salary)
Display the name of all Employees having salaries grater than 10,000.
7. Display the name of employees along with their respective manager name from the
following table.
Empid Emp Name Manager
E001 Ivan E003
E002 Bayross E004
E003 Cristinna E002
E004 Maria E001
8. Write queries to implement primary key, foreign key, Not Null and Check constraints
on employee database.
9. Write queries to implement database triggers on student database.
10. Create a PL/SQL procedure called QUERY_ EMP to query the employee database
retrieving the salary and job title for an employee when provided with the employee
number compile the code, invoke the procedure and display the salary and job title
for the employee.
11. Create a PL/SQL procedure NEW_EMP to insert a new employee into the EMP_
database. The procedure should contain a call to function VALID_ DEPI to check
whether the department number specified for the new employee exists in the
department table.

5
4
Test your NEW_EMP procedure by adding a new employee to the database.
12. Use a curser to retrieve the department number and department name from the
dept. table: Pass the dept. no. to another curser to retrieve from the employee
table the details of employee name, job and salary of all employees who is working
in that department.
13. Develop two menu driven project for management of database system:
1. Library Information System
(a) Engineering Courses
(b) MCA Course
2. Inventory Control System
(c) Computer Lab
(d) College Store
3. Student Information System
(e) Academic Section
(f) Finance Department
4. Time Table Development System
(g) CSE, IT and MCA Departments
(h) Electrical and Mechanical Departments

Note: At least 5 more exercises to be given by the teacher concerned.


Every Student needs to do minimum____numbers of experiments/practicals in a
semester

5
5
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

EC-312:Digital Electronics Lab

Periods/week Credits Max. Marks : 50


P :2 1 Internal : 25
Duration of Exam: 2 Hrs External
: 25

List of Experiments:

1. Study of TTL gates – AND, OR, NOT, NAND, NOR, EX-OR, EX-NOR.

2. Design & realize a given function using K-maps and verify its performance.

3. To verify the operation of multiplexer & Demultiplexer.

4. To verify the operation of comparator.

5. To verify the truth tables of S-R, J-K, T & D type flip flops.

6. To verify the operation of bi-directional shift register.

7. To design & verify the operation of 3-bit synchronous counter.

8. To design and verify the operation of synchronous UP/DOWN decade counter using J K
flip-flops & drive a
seven-segment display using the same.

9. To design and verify the operation of asynchronous UP/DOWN decade counter using J K
flip-flops & drive a
seven-segment display using the same.

10. To design & realize a sequence generator for a given sequence using J-K flip-flops.

11. Design a 4-bit shift-register and verify its operation . Verify the operation of a ring
counter and a Johnson counter.

NOTE: At least ten experiments are to be performed, atleast seven experiments should be
performed from above list. Remaining three experiments may either be performed from the
above list or designed & set by the concerned institution as per the scope of the syllabus.

Every Student needs to do minimum____numbers of experiments/practicals in a


semester.

5
6
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)

PD-301 : PERSONALITY DEVELOPMENT

Periods/week Credits Max. Marks : 50


P: 2 1 Internal : 25
Duration of Examination: 2 Hrs External : 25

5
7
MANAV RACHNA INTERNATIONAL UNIVERSITY
(Deemed to be University under section 3 of the UGC Act 1956)
SW-301 : EXTRA and CO-CURRICULAR ACTIVITIES

Periods/week Credits
1

Every student will associate himself / herself in one or more extra-curricular activities which
shall be conducted after college hours under Student Welfare team, it will entitle a student
for one assigned credit.

5
8

Vous aimerez peut-être aussi