MDU CSE B.Tech 2nd Year Syllabus
MDU CSE B.Tech 2nd Year Syllabus
---------- ---------------
(COMMON FOR ALL BRANCHES)
Part-A
Part-B
Part-C
TEXT BOOKS :
REFERENCE BOOKS :
Note: Examiner will set eight questions, taking two from Part-A,
three from Part-B and three from Part-C. Students will be
required to attempt five question taking atleast one from
each part.
CSE-201 E Data Structures & Algorithms
(CSE,EL,IT)
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-1: Introduction to Data Structures: Definition of data structures and abstract data types,
Static and Dynamic implementations, Examples and real life applications; The Stacks :
Definition, Array based implementation of stacks, Linked List based implementation of stacks,
Examples : Infix, postfix, prefix representation, Conversions, Applications.
Unit-2: Queues and Lists: Definition, Array based implementation of Queues / Lists, Linked
List implementation of Queues / Lists, Circular implementation of Queues and Singly linked
Lists, Straight / circular implementation of doubly linked Queues / Lists, Priority Queues,
Applications.
Unit-3: Trees: Definition of trees and Binary trees, Properties of Binary trees and
Implementation, Binary Traversal pre-order, post order, In- order traversal, Binary Search Trees,
Implementations, Threaded trees, Balanced multi way search trees, AVL Trees, Implementations
Unit-4: Graphs: Definition of Undirected and Directed Graphs and Networks, The Array based
implementation of graphs, Adjacency matrix, path matrix implementation, The Linked List
representation of graphs, Shortest path Algorithm, Graph Traversal – Breadth first Traversal,
Depth first Traversal, Tables : Definition, Hash function, Implementations and Applications.
Unit-5: Running time: Time Complexity, Big – Oh - notation, Running Times, Best Case,
Worst Case, Average Case, Factors depends on running time, Introduction to Recursion, Divide
and Conquer Algorithm, Evaluating time Complexity.
Unit-6: Sorting Algorithms : Introduction, Sorting by exchange, selection, insertions : Bubble
sort, Straight selection sort, Efficiency of above algorithms,; Shell sort, Performance of shell
sort, Merge sort, Merging of sorted arrays& Algorithms; Quick sort Algorithm analysis,
Heap sort: Heap Construction, Heap sort, bottom – up, Top – down Heap sort approach;
Searching Algorithms: Straight Sequential Search, Binary Search (recursive & non–recursive
Algorithms)
Text Book:
• Data Structures using C by A. M. Tenenbaum, Langsam, Moshe J. Augentem, PHI Pub.
Reference Books:
• Data Structures and Algorithms by A.V. Aho, J.E. Hopcroft and T.D. Ullman, Original
edition, Addison-Wesley, 1999, Low Priced Edition.
• Fundamentals of Data structures by Ellis Horowitz & Sartaj Sahni, Pub, 1983,AW
• Fundamentals of computer algorithms by Horowitz Sahni and Rajasekaran.
• Data Structures and Program Design in C By Robert Kruse, PHI,
• Theory & Problems of Data Structures by Jr. Symour Lipschetz, Schaum’s outline by TMH
• Introduction to Computers Science -An algorithms approach , Jean Paul Tremblay,
Richard B. Bunt, 2002, T.M.H.
• Data Structure and the Standard Template library – Willam J. Collins, 2003, T.M.H
Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
CSE-203 E Discrete Structures
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-1: Set Theory: Introduction to set theory, Set operations, Algebra of sets, Duality, Finite
and Infinite sets, Classes of sets, Power Sets, Multi sets, Cartesian Product, Representation of
relations, Types of relation, Equivalence relations and partitions , Partial ordering relations and
lattices
Function and its types, Composition of function and relations, Cardinality and inverse relations
Unit-2: Propositional Calculus: Basic operations: AND(^), OR(v), NOT(~), Truth value of a
compound statement, propositions, tautologies, contradictions.
Unit-4: Recursion And Recurrence Relation :Polynomials and their evaluation, Sequences,
Introduction to AP, GP and AG series, partial fractions, linear recurrence relation with constant
coefficients, Homogeneous solutions, Particular solutions, Total solution of a recurrence relation
using generating functions.
Unit-5: Algebric 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, Eurelian path and circuits,
Hamilton paths and circuits, Planar graphs, Euler’s formula, Trees, Spanning trees, Binary trees
and its traversals
Text Book:
• Elements of Discrete Mathematics C.L Liu, 1985, McGraw Hill
Reference Books:
• Discrete Mathematics by Johnson Bough R., 5th Edition, PEA, 2001..
• Concrete Mathematics: A Foundation for Computer Science, Ronald Graham, Donald
Knuth and Oren Patashik, 1989, Addison-Wesley.
• Mathematical Structures for Computer Science, Judith L. Gersting, 1993, Computer Science Press.
• Applied Discrete Structures for Computer Science, Doerr and Levasseur, (Chicago: 1985,SRA
• Discrete Mathematics by A. Chtewynd and P. Diggle (Modular Mathematics series),
1995, Edward Arnold, London,
• Schaums Outline series: Theory and problems of Probability by S. Lipshutz, 1982,
McGraw-Hill Singapore
• Discrete Mathematical Structures, B. Kolman and R.C. Busby, 1996, PHI
• Discrete Mathematical Structures with Applications to Computers by Tembley &
Manohar, 1995, Mc Graw Hill.
• Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
EE-217 E Digital and Analog Communication
(CSE,IT)
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-3: Standards in data communications: Communication modes: simplex, half duplex, full
duplex; Transmission modes: serial-, parallel-transmission; Synchronizations: Asynchronous-,
synchronous-transmission; Type of services: connection oriented-, connectionless-services; Flow
control: unrestricted simplex protocol, simplex stop- and -wait protocol, sliding window
protocol; Switching systems: circuit switching; picketing switching: data gram , virtual circuits,
permanent virtual circuits.
Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
EE-204-E DIGITAL ELECTRONICS
L T P CLASS WORK : 50
3 1 0 EXAM : 100
TOTAL : 150
DURATION OF EXAM : 3 HRS
TEXT BOOK :
1. Modern Digital Electronics(Edition III) : R. P. Jain; TMH
REFERENCE BOOKS :
1. Digital Integrated Electronics : Taub & Schilling; MGH
2. Digital Principles and Applications : Malvino & Leach; McGraw Hill.
3. Digital Design : Morris Mano; PHI.
NOTE : Eight questions are to be set in all by the examiner taking at least one question from
each unit. Students will be required to attempt five questions in all.
HUM-201-E ECONOMICS
(COMMON FOR ALL BRANCHES)
L T P Class Work : 50 Marks
3 1 - Theory : 100 Marks
Total : 150 Marks
Duration of Exam. : 3 Hrs.
COURSE OBJECTIVE : The purpose of this course is to :
1. Acquaint the student in the basic economic concepts and their operational significance and
2 .Stimulate him to think systematically and objectively about contemporary economic problems.
UNIT-I
Definition of Economics - various definitions, Nature of Economic problem, Production possibility curve Economic
laws and their nature. Relation between Science, Engineering, Technology and Economics.
UNIT-II
Concepts and measurement of utility, Law of Diminishing Marginal Utility, Law of equi-marginal utility - its
practical application and importance.
UNIT-III
Meaning of Demand, Individual and Market demand schedule, Law of demand, shape of demand curve, Elasticity of
demand, measurement of elasticity of demand, factors effecting elasticity of demand, practical importance & applications
of the concept of elasticity of demand.
UNIT-IV
Meaning of production and factors of production; Law of variable proportions, Returns to scale, Internal and
External economics and diseconomies of scale.
Various concepts of cost - Fixed cost, variable cost, average cost, marginal cost, money cost, real cost
opportunity cost. Shape of average cost, marginal cost, total cost etc. in short run and long run.
UNIT-V
Meaning of Market, Types of Market - Perfect Competition, Monopoly, Oligoply, Monoplistic Competition (Main
features of these markets)
Supply and Law of Supply, Role of Demand & Supply in Price Determinition and effect of changes in demand and
supply on prices.
UNIT-VI
Nature and characteristics of Indian economy (brief and elementary introduction), Privatization - meaning, merits
and demerits. Globalisation of Indian economy - merits and demerits. Elementary Concepts of VAT, WTO, GATT & TRIPS
agreement.
Books Recommended :
TEXT BOOKS :
REFERENCE BOOKS :
NOTE: Eight questions are to be set atleast one question from each unit and the students will have to attempt five questions in
all.
IT-201 E PC Lab.
L T P Class Work: 50
- - 3 Exam: 50
Total: 100
Duration of Exam: 3 Hrs.
PC Software: Application of basics of MS Word 2000, MS Excel 2000, MS Power Point 2000,
MS Access 2000.
1. To prepare the Your Bio Data using MS Word
2. To prepare the list of marks obtained by students in different subjects and show with
the help of chart/graph the average, min and max marks in each subject.
3. Preapare a presentation explaining the facilities/infrastructure available in your
college/institute.
4. Create a database of books in the library on a mini scale w.r.t. Computers and
manipulate the database using different forms and reports.
PC Hardware :
1. To check and measure various supply voltages of PC.
2. To make comparative study of motherboards.
3. To observe and study various cables, connections and parts used in computer communication.
4. To study various cards used in a system viz. display card, LAN card etc.
5. To remove, study and replace floppy disk drive.
6. To remove, study and replace hard disk.
7. To remove, study and replace CD ROM drive.
8. To study monitor, its circuitry and various presents and some elementary fault detection.
9. To study printer assembly and elementary fault detection of DMP and laser printers.
10. To observe various cables and connectors used in networking.
11. To study parts of keyboard and mouse.
12. To assemble a PC.
13. Troubleshooting exercises related to various components of computer like monitor, drives,
memory and printers etc.
Reference Books:
• Complete PC upgrade & maintenance guide, Mark Mines, BPB publ.
• PC Hardware: The complete reference, Craig Zacker & John Rouske, TMH
• Upgrading and Repairing PCs, Scott Mueller, 1999, PHI,
L T P Class Work: 50
- - 3 Exam: 50
Total: 100
Duration of Exam: 3 Hrs.
2. Using iteration & recursion concepts write programs for finding the element in the array
using Binary Search Method
4. Using iteration & recursion concepts write the programs for Quick Sort Technique
6. Write a program for swapping of two numbers using ‘call by value’ and ‘call by
reference strategies.
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.
11. Write a program to simulate the various searching & sorting algorithms and compare
their timings for a list of 1000 elements.
13. Write a program which simulates the various tree traversal algorithms.
L T P CLASS WORK : 25
0 0 2 EXAM : 25
TOTAL : 50
DURATION OF EXAM : 3 HRS
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.
5. To verify the truth tables of S-R, J-K, T & D type flip flops.
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. Study of CMOS NAND & NOR gates and interfacing between TTL and CMOS gates.
12. 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.
CSE-202 E Database Management Systems
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-3: File Organisation: Sequential Files, index sequential files, direct files, Hashing, B-trees
Index files.
Unit-4: Relational Model, Relational Algebra & various operations, Relational and Tuple
calculus.
Unit-5: Introduction to Query Languages :QLB , QBE, Structured query language – with
special reference of (SQL of ORACLE), integrity constraints, functional dependencies &
NORMALISATION – (up to 4th Normal forms), BCNF (Boyce – code normal forms)
Unit-6: Introduction to Distributed Data processing, parallel Databases, data mining & data
warehousing, network model & hierarchical model, Introduction to Concurrency control and
Recovery systems.
Text Books:
• Database System Concepts by A. Silberschatz, H.F. Korth and S. Sudarshan, 3rd edition,
1997, McGraw-Hill, International Edition.
• Introduction to Database Management system by Bipin Desai, 1991, Galgotia Pub.
Reference Books:
• Fundamentals of Database Systems by R. Elmasri and S.B. Navathe, 3rd edition, 2000,
Addision-Wesley, Low Priced Edition.
Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
CSE-204 E Programming Languages
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-2: Structured data objects : Structured data objects & data types , specification &
implementation of structured data types, Declaration & type checking of data structure ,vector &
arrays, records Character strings, variable size data structures , Union, pointer & programmer
defined data objects, sets, files.
Unit-3 : Subprograms and Programmer Defined Data Types: Evolution of data type concept
,abstraction, encapsulation & information hiding , Subprograms ,type definitions, abstract data
types.
Unit–4: Sequence Control: Implicit & explicit sequence control ,sequence control within
expressions, sequence control within statement, Subprogram sequence control: simple call return
,recursive subprograms, Exception & exception handlers, co routines, sequence control .
Unit-5: Data Control: Names & referencing environment, static & dynamic scope, block
structure, Local data & local referencing environment, Shared data: dynamic & static scope.
Parameter & parameter transmission schemes.
Unit-6: Storage Management: Major run time elements requiring storage ,programmer and
system controlled storage management & phases , Static storage management , Stack based
storage management, Heap storage management ,variable & fixed size elements.
Text Book:
• Programming languages Design & implementation by T.W. .Pratt, 1996, Prentice Hall
Pub.
• Programming Languages – Principles and Paradigms by Allen Tucker & Robert Noonan,
2002, TMH,
Reference Books:
• Fundamentals of Programming languages by Ellis Horowitz, 1984, Galgotia publications
(Springer Verlag),
• Programming languages concepts by C. Ghezzi, 1989, Wiley Publications.,
• Programming Languages – Principles and Pradigms Allen Tucker , Robert Noonan 2002, T.M.H.
Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
CSE-206 E Theory of Automata Computation
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-1: Finite Automata and Regular Expressions: Finite State Systems, Basic Definitions
Non-Deterministic finite automata (NDFA), Deterministic finite automata (DFA), Equivalence
of DFA and NDFA Finite automata with E-moves, Regular Expressions, Equivalence of finite
automata and Regular Expressions, Regular expression conversion and vice versa.
Unit-3: Properties of Regular Sets: The Pumping Lemma for Regular Sets, Applications of the
pumping lemma, Closure properties of regular sets, Myhill-Nerode Theorem and minimization
of finite Automata, Minimization Algorithm.
Unit-4: Grammars: Definition, Context free and Context sensitive grammar, Ambiguity regular
grammar, Reduced forms, Removal of useless Symbols and unit production, Chomsky Normal
Form (CNF), Griebach Normal Form (GNF).
Text Book:
• Introduction to automata theory, language & computations- Hopcroaft & O.D.Ullman, R
Mothwani, 2001, AW
Reference Books:
• Theory of Computer Sc.(Automata, Languages and computation):K.L.P.Mishra &
N.Chandrasekaran, 2000, PHI.
• Introduction to formal Languages & Automata-Peter Linz, 2001, Narosa Publ..
• Fundamentals of the Theory of Computation- Principles and Practice by
RamondGreenlaw and H. James Hoover, 1998, Harcourt India Pvt. Ltd..
• Elements of theory of Computation by H.R. Lewis & C.H. Papaditriou, 1998, PHI.
• Introduction to languages and the Theory of Computation by John C. Martin 2003, T.M.H.
Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
IT-202 E Object Oriented Programming Using C++
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit–1: Introduction to C++, C++ Standard Library, Basics of a Typical C++ Environment, Pre-
processors Directives, Illustrative Simple C++ Programs. Header Files and Namespaces, library files.
Unit-2: Object Oriented Concepts : Introduction to Objects and Object Oriented Programming, Encapsulation
(Information Hiding), Access Modifiers: Controlling access to a class, method, or variable (public, protected,
private, package), Other Modifiers, Polymorphism: Overloading,, Inheritance, Overriding Methods, Abstract
Classes, Reusability, Class’s Behaviors.
Unit–3: Classes and Data Abstraction: Introduction, Structure Definitions, Accessing Members of
Structures, Class Scope and Accessing Class Members, Separating Interface from Implementation, Controlling
Access Function And Utility Functions, Initializing Class Objects: Constructors, Using Default Arguments
With Constructors, Using Destructors, Classes : Const(Constant) Object And Const Member Functions, Object
as Member of Classes, Friend Function and Friend Classes, Using This Pointer, Dynamic Memory Allocation
with New and Delete, Static Class Members, Container Classes And Integrators, Proxy Classes, Function
overloading.
Unit-4: Operator Overloading: Introduction, Fundamentals of Operator Overloading, Restrictions On
Operators Overloading, Operator Functions as Class Members vs. as Friend Functions, Overloading, <<, >>
Overloading Unary Operators, Overloading Binary Operators.
Unit-5: Inheritance: Introduction, Inheritance: Base Classes And Derived Classes, Protected Members,
Casting Base- Class Pointers to Derived- Class Pointers, Using Member Functions, Overriding Base –Class
Members in a Derived Class, Public, Protected and Private Inheritance, Using Constructors and Destructors in
derived Classes, Implicit Derived –Class Object To Base- Class Object Conversion, Composition Vs.
Inheritance.
Unit–6: Virtual Functions and Polymorphism: Introduction to Virtual Functions, Abstract Base Classes
And Concrete Classes, Polymorphism, New Classes And Dynamic Binding, Virtual Destructors,
Polymorphism, Dynamic Binding.
Unit-7: Files and I/O Streams: Files and Streams, Creating a Sequential Access File, Reading Data From A
Sequential Access File, Updating Sequential Access Files, Random Access Files, Creating A Random Access
File, Writing Data Randomly To a Random Access File, Reading Data Sequentially from a Random Access
File. Stream Input/Output Classes and Objects, Stream Output, Stream Input, Unformatted I/O (with read and
write), Stream Manipulators, Stream Format States, Stream Error States.
Unit-8: Templates & Exception Handling: Function Templates, Overloading Template Functions, Class
Template, Class Templates and Non-Type Parameters, Templates and Inheritance, Templates and Friends,
Templates and Static Members.
Introduction, Basics of C++ Exception Handling: Try Throw, Catch, Throwing an Exception, Catching an
Exception, Rethrowing an Exception, Exception specifications, Processing Unexpected Exceptions, Stack
Unwinding, Constructors, Destructors and Exception Handling, Exceptions and Inheritance.
Text Books:
• C++ How to Program by H M Deitel and P J Deitel, 1998, Prentice Hall
• Object Oriented Programming in Turbo C++ by Robert Lafore ,1994, The WAITE Group Press.
• Programming with C++ By D Ravichandran, 2003, T.M.H
Reference books:
• Object oriented Programming with C++ by E Balagurusamy, 2001, Tata McGraw-Hill
• Computing Concepts with C++ Essentials by Horstmann, 2003, John Wiley,
• The Complete Reference in C++ By Herbert Schildt, 2002, TMH.
Note: Eight questions will be set in all by the examiners taking at least one question from each
unit. Students will be required to attempt five questions in all.
CSE-208 E Internet Fundamentals
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-1: Electronic Mail: Introduction, advantages and disadvantages, Userids, Pass words, e-
mail addresses, message components, message composition, mailer features, E-mail inner
workings, E-mail management, Mime types, Newsgroups, mailing lists, chat rooms.
Unit-2 : The Internet: Introduction to networks and internet, history, Working of Internet,
Internet Congestion, internet culture, business culture on internet. Collaborative computing &
the internet. Modes of Connecting to Internet, Internet Service Providers(ISPs), Internet address,
standard address, domain name, DNS, IP.v6.Modems and time continuum, communications
software; internet tools.
Unit-3 : World Wide Web : Introduction, Miscellaneous Web Browser details, searching the
www: Directories search engines and meta search engines, search fundamentals, search
strategies, working of the search engines, Telnet and FTP.
Introduction to Browser, Coast-to-coast surfing, hypertext markup language, Web page
installation, Web page setup, Basics of HTML & formatting and hyperlink creation.
Using FrontPage Express, Plug-ins.
Unit-4: Languages: Basic and advanced HTML, java script language, Client and Server Side
Programming in java script. Forms and data in java script, XML basics.
Unit-5 : Servers : Introduction to Web Servers: PWS, IIS, Apache; Microsoft Personal Web
Server. Accessing & using these servers.
Unit-6: Privacy and security topics: Introduction, Software Complexity, Encryption schemes,
Secure Web document, Digital Signatures, Firewalls.
Text Book:
• Fundamentals of the Internet and the World Wide Web, Raymond Greenlaw and Ellen
Hepp – 2001, TMH
• Internet & World Wide Programming, Deitel,Deitel & Nieto, 2000, Pearson Education
Reference Books:
• Complete idiots guide to java script,. Aron Weiss, QUE, 1997
• Network firewalls, Kironjeet syan -New Rider Pub.
• www.secinf.com
• www.hackers.com
• Alfred Glkossbrenner-Internet 101 Computing MGH, 1996
Note: Eight questions will be set in all by the examiners taking at least one question
from each unit. Students will be required to attempt five questions in all.
CSE- 210 E Computer Architecture & Organization
L T P Class Work: 50
3 1 - Exam: 100
Total: 150
Duration of Exam: 3 Hrs.
Unit-1: Basic Principles: Boolean algebra and Logic gates, Combinational logic blocks(Adders,
Multiplexers, Encoders, de-coder), Sequential logic blocks(Latches, Flip-Flops, Registers,
Counters)
Unit-2: General System Architecture: Store program control concept, Flynn’s classification of
computers (SISD, MISD, MIMD); 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-3: 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 (fixed, variable, hybrid); Language of the machine: 8086 ; simulation
using MSAM.
Unit-4: 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 stage); microinstruction sequencing, implementation of control
unit, Enhancing performance with pipelining.
Unit-5: 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-6: Introduction to Parallelism: Goals of parallelism (Exploitation of concurrency,
throughput enhancement); Amdahl’s law; Instruction level parallelism (pipelining, super scaling
–basic features); Processor level parallelism (Multiprocessor systems overview).
L T P Class Work: 50
- - 3 Exam: 50
Total: 100
Duration of Exam: 3 Hrs.
I. Create a database and write the programs to carry out the following operation :
Usage of S/w:
L T P Class Work: 25
- - 2 Exam: 25
Total: 50
Duration of Exam: 3 Hrs.
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. Than 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.
• 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.
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 the 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.
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
CSE 214 E Internet Lab.
L T P Class Work: 25
- - 2 Exam: 25
Total: 50
Duration of Exam: 3 Hrs.
Exercises involving: