semester 4 - rajagiri school of engineering & technology · semester 4 period: jan 2017 – ......
TRANSCRIPT
Rajagiri School of Engineering & Technology
1 Department of Information Technology
SEMESTER 4
PERIOD: Jan 2017 –Apr 2017
Rajagiri School of Engineering & Technology
2 Department of Information Technology
INDEX
Sl. No Page No
1 Assignment Schedule for S4 IT 4
2 CS202 : Computer Organization and Architecture 5
2.1 Course Information Sheets 6
2.2 Course Plan 10
2.3 Tutorial 12
2.4 Assignment 13
3 IT 202: Algorithm Analysis and Design 14
3.1 Course Information Sheets 15
3.2 Course Plan 19
3.3 Tutorial 21
3.4 Assignment 25
4 IT 204 : Object Oriented Techniques 26
4.1 Course Information Sheets 27
4.2 Course Plan 31
4.3 Tutorial 31
4.4 Assignment 32
5 CS208 : Principles of Database Design 33
5.1 Course Information Sheets 34
5.2 Course Plan 39
5.3 Tutorial 41
5.4 Assignment 43
Rajagiri School of Engineering & Technology
3 Department of Information Technology
6
IT232: Object Oriented Programming Lab 44
6.1 Course Information Sheets 45
6.2 Course Plan 49
6.3 Lab cycle 56
6.4 Open and Advanced questions 60
7 IT 234: Algorithm Design Lab 62
7.1 Course Information Sheets 63
7.2 Course Plan 66
7.3 Lab cycle 67
7.4 Open and Advanced questions 69
Rajagiri School of Engineering & Technology
4 Department of Information Technology
ASSIGNMENT SCHEDULE FOR S4 IT
Week Subject Subject Teacher Date of Submission
4th
week of
February Computer Organization and
Architecture Mary John 28/02/2017
2nd week of
March Algorithm Analysis and Design Nikhila T Bhuvan 10/03/2017
1st week of
March Object Oriented Techniques Mathews Abraham 03/03/2017
2nd week of
March Principles of Database Design Lakshmi K S 07/03/2017
4th
week of
February Object Oriented Programming Lab Mathews Abraham 24/02/2017
3rd
week
of
February
Algorithm Design Lab Nikhila T Bhuvan 20/02/2017
4th week of
March
Computer Organization and
Architecture Mary John 28/03/2017
3rd
week
of April Algorithm Analysis and Design Nikhila T Bhuvan 21/04/2017
2nd
week
of April Object Oriented Techniques Mathews Abraham 06/04/2017
1st week of
April Principles of Database Design Lakshmi K S 03/04/2017
2nd
week
of April Object Oriented Programming Lab Mathews Abraham 11/04/2017
4th week of
March Algorithm Design Lab Nikhila T Bhuvan 24/03/2017
Prepared By Approved By
Mary John BINU A, HOD
Rajagiri School of Engineering & Technology
5 Department of Information Technology
CS202
Computer Organization and
Architecture
Rajagiri School of Engineering & Technology
6 Department of Information Technology
CS202 : COMPUTER ORGANIZATION AND ARCHITECTURE
COURSE INFORMATION SHEET
PROGRAMME : Information Technology DEGREE : BTECH
COURSE : Computer Organization
and Architecture
SEMESTER : IV
CREDITS : 4
COURSE CODE : CS202
REGULATION : 2016 COURSE TYPE : CORE
COURSE AREA/DOMAIN : CONTACT HOURS : 3+1 (Tutorial)
ours/Week.
CORRESPONDING LAB COURSE CODE
(IF ANY) : LAB COURSE NAME :
SYLLABUS:
UNIT DETAILS HOURS
I
Basic Structure of computers–functional units –basic operational concepts
–bus structures –software. Memory locations and addresses – memory
operations – instructions and instruction sequencing – addressing modes –
ARM Example (programs not required). Basic I/O operations – stacks
subroutine calls.
6
II
Basic processing unit – fundamental concepts – instruction cycle -
execution of a complete instruction –multiple- bus organization –
sequencing of control signals.
Arithmetic algorithms: Algorithms for multiplication and division of
binary and BCD numbers — array multiplier —Booth‘s multiplication
algorithm — restoring and non-restoring division — algorithms for
floating point, multiplication and division.
10
III I/O organization: accessing of I/O devices –interrupts –direct memory
access –buses –interface circuits –standard I/O interfaces (PCI, SCSI,
USB)
8
IV Memory system : basic concepts –semiconductor RAMs –memory system
considerations –semiconductor ROMs –flash memory –cache memory
and mapping functions.
9
V
Processor Logic Design: Register transfer logic –inter register transfer –
arithmetic, logic and shift micro operations –conditional control
statements.
Processor organization:–design of arithmetic unit, logic unit, arithmetic
logic unit and shifter –status register –processor unit –design of
accumulator.
9
VI
Control Logic Design: Control organization –design of hardwired control
–control of processor unit –PLA control. Micro-programmed control:
Microinstructions –horizontal and vertical micro instructions – micro-
program sequencer –micro programmed CPU organization.
9
TOTAL HOURS 51
Rajagiri School of Engineering & Technology
7 Department of Information Technology
TEXT/REFERENCE BOOKS:
T/R BOOK TITLE/AUTHORS/PUBLICATION
T Hamacher C., Z. Vranesic and S. Zaky, Computer Organization ,5/e, McGraw Hill,
2011.
T Mano M. M., Digital Logic & Computer Design, 4/e, Pearson Education, 2013.
R Patterson D.A. and J. L. Hennessey, Computer Organization and Design, 5/e, Morgan
Kauffmann Publishers, 2013.
R William Stallings, Computer Organization and Architecture: Designing for
Performance, Pearson, 9/e, 2013.
R Chaudhuri P., Computer Organization and Design, 2/e, Prentice Hall, 2008.
R Rajaraman V. and T. Radhakrishnan, Computer Organization and Architecture,
Prentice Hall, 2011.
R Messmer H. P., The Indispensable PC Hardware Book, 4/e, Addison-Wesley, 2001
COURSE PRE-REQUISITES:
C.CODE COURSE NAME DESCRIPTION SEM
CS203 Switching theory and logic design Basics In Digital Concepts 3
COURSE OBJECTIVES:
1 To impart an understanding of the internal organization and operations of a computer.
2 To introduce the concepts of processor logic design and control logic design.
COURSE OUTCOMES:
SNO DESCRIPTION Blooms’ Taxonomy
Level
CS202.
1
Students will be able to identify the basic structure and
functional units of a digital computer.
Knowledge,
Understand (level 1,
2 )
CS202.
2
Students will be able to analyze the effect of addressing
modes on the execution time of a program.
Analyze (level
4)
CS202.
3
Students will be able to design processing unit using the
concepts of ALU and control logic design. Apply (level 3)
CS202.
4
Students will be able to identify the pros and cons of
different types of control logic design in processors.
Knowledge,
Understand (level 1,
Rajagiri School of Engineering & Technology
8 Department of Information Technology
2 )
CS202.
5
Students will be able to select appropriate interfacing
standards for I/O devices.
Knowledge,
Understand, Evaluate
(level 1, 2 and 5)
CS202.
6
Students will be able to identify the roles of various
functional units of a computer in instruction execution.
Knowledge,
Understand (level 1,
2 )
CO-PO AND CO-PSO MAPPING
PO
1
PO
2
PO
3
PO
4
PO
5
PO
6
PO
7
PO
8
PO
9
PO
10
PO
11
PO
12
PS
O1
PS
O2
PS
O3
CS202.1 2 _ _ _ _ _ _ _ _ _ _ _ 2 _ _
CS202.2 3 2 _ _ _ _ _ _ _ _ _ _ 2 _ _
CS202.3 3 2 2 _ _ _ _ _ _ _ _ _ 3 1 _
CS202.4 3 1 _ _ _ _ _ _ _ _ _ _ 2 _ _
CS202.5 3 2 2 1 _ _ _ _ _ _ _ _ 2 1 _
CS202.6 2 2 _ _ _ _ _ _ _ _ _ _ 3 - _
CS202
Overall
Level
3 2 2 1 _ _ _ _ _ _ _ _ 2 1 _
GAPES IN THE SYLLABUS - TO MEET INDUSTRY/PROFESSION
REQUIREMENTS:
SNO DESCRIPTION PROPOSED ACTIONS
1 Pipelining & Parallel Processing techniques Seminar
PROPOSED ACTIONS: TOPICS BEYOND SYLLABUS/ASSIGNMENT/INDUSTRY
VISIT/GUEST LECTURER/NPTEL ETC
TOPICS BEYOND SYLLABUS/ADVANCED TOPICS / DESIGN:
1 RISC and CISC paradigm
WEB SOURCE REFERENCES:
1 http://nptel.iitm.ac.in
Rajagiri School of Engineering & Technology
9 Department of Information Technology
2 www.srmuniv.ac.in
3 www.svecw.edu.in
4 https://en.wikiversity.org
5 www.techtud.com
6 nptel.iitg.ernet.in
7 www.ddegjust.ac.in
DELIVERY/INSTRUCTIONAL METHODOLOGIES:
CHALK & TALK STUD.
ASSIGNMENT
WEB
RESOURCES
LCD/SMART BOARDS STUD. SEMINARS ADD-ON
COURSES
ASSESSMENT METHODOLOGIES-DIRECT
ASSIGNMENTS STUD.
SEMINARS
TESTS/MODE
L EXAMS
UNIV.
EXAMINATION
STUD. LAB
PRACTICES
☐ STUD.
VIVA
☐ MINI/MAJOR
PROJECTS
☐
CERTIFICATIONS
☐ ADD-ON COURSES ☐ OTHERS
ASSESSMENT METHODOLOGIES-INDIRECT
ASSESSMENT OF COURSE OUTCOMES
(BY FEEDBACK, ONCE)
STUDENT FEEDBACK ON
FACULTY (TWICE)
☐ ASSESSMENT OF MINI/MAJOR
PROJECTS BY EXT. EXPERTS ☐ OTHERS
Prepared by Approved by
Ms. Mary John Mr. Binu A
Faculty HOD
Rajagiri School of Engineering & Technology
10 Department of Information Technology
COURSE PLAN 2017
Sl.No Day Module Topics
1 Day 1 1 Introduction
2 Day 2 1 Basic structure of computers
3 Day 3 1 Memory locations and addresses
4 Day 4 1 instructions and instruction sequencing
5 Day 5 1 ARM Example
6 Day 6 1 Basic I/O operations
7 Day 7 2 Basic processing unit
8 Day 8 2 execution of a complete instruction
9 Day 9 2 multiple- bus organization
10 Day 10 2 sequencing of control signals.
11 Day 11 2 Arithmetic algorithms
12 Day 12 2 Algorithms for multiplication and division of binary and BCD
numbers
13 Day 13 2 array multiplier
14 Day 14 2 Booth‘s multiplication algorithm
15 Day 15 2 restoring and non-restoring division
16 Day 16 2 algorithms for floating point,
multiplication and division.
17 Day 17 3 I/O organization
18 Day 18 3 accessing of I/O devices
19 Day 19 3 interrupts
20 Day 20 3 direct memory access
21 Day 21 3 buses
22 Day 22 3 interface circuits
23 Day 23 3 standard I/O interfaces - PCI
Rajagiri School of Engineering & Technology
11 Department of Information Technology
24 Day 24 3 SCSI, USB
25 Day 25 4 Memory system
26 Day 26 4 basic concepts
27 Day 27 4 semiconductor RAMs
28 Day 28 4 memory system considerations
29 Day 29 4 semiconductor ROMs
30 Day 30 4 flash memory
31 Day 31 4 cache memory
32 Day 32 4 mapping functions
33 Day 33 5 Processor Logic Design
34 Day 34 5 Register transfer logic
35 Day 35 5 inter register transfer
36 Day 36 5 arithmetic, logic and shift micro operations
37 Day 37 5 conditional control statements
38 Day 38 5 Processor organization
39 Day 39 5 design of arithmetic unit, logic unit, arithmetic logic unit and
shifter
40 Day 40 5 status register
41 Day 41 5 processor unit
42 Day 42 5 design of accumulator.
43 Day 43 6 Control Logic Design
44 Day 44 6 design of hardwired control
45 Day 45 6 control of processor unit
46 Day 46 6 PLA control
47 Day 47 6 Micro-programmed control
48 Day 48 6 Microinstructions
49 Day 49 6 horizontal and vertical micro instructions
50 Day 50 6 micro-program sequencer
Rajagiri School of Engineering & Technology
12 Department of Information Technology
51 Day 51 6 micro programmed CPU organization
Tutorial Questions –Feb2017
1. Distinguish between auto increment and auto decrement addressing mode.
2. Describe the role of system software to improve the performance of a computer.
3. What are the special registers in a typical computer? Explain their purposes in detail.
4. Briefly describe the design of a hardwired control unit.
5. What are the advantages and disadvantages of hardwired and micro programmed
control?
6. Explain how the virtual address is converted into real address in a paged virtual
memory system.
7. Describe the hardware mechanism for handling multiple interrupt requests.
8. What are the needs for input-output interface? Explain the functions of a typical 8-bit
parallel interface in detail.
9. Describe the USB architecture with the help of a neat diagram.
10. What are handshaking signals? Explain the handshake control of data transfer during
input and output operation.
11. Explain the Working of a Carry-Look Ahead adder.
12. What is a mapping function? What are the ways the cache can be mapped?
13. List and explain the steps involved in the execution of a complete instruction.
14. With a neat sketch explain the working principle of DMA.
15. Explain the working of PCI interface.
Rajagiri School of Engineering & Technology
13 Department of Information Technology
Assignment Questions –Feb 2017
Assignment I
Write short note on
Functional Units of computer
Bus Structures
Basic Operational concepts of a computer
Software
Assignment II
Write short note on:
Semiconductor RAM
Semiconductor ROM
Flash Memory
Cache Memory
Rajagiri School of Engineering & Technology
14 Department of Information Technology
IT 202
Algorithm Analysis and
Design
Rajagiri School of Engineering & Technology
15 Department of Information Technology
IT 202: ALGORITHM ANALYSIS AND DESIGN
COURSE INFORMATION SHEET
PROGRAMME: INFORMATION
TECHNOLOGY
DEGREE: BTECH
COURSE: Algorithm Analysis & Design SEMESTER: VI CREDITS: 4
COURSE CODE: IT202
REGULATION: 2016
COURSE TYPE: CORE
COURSE AREA/DOMAIN: DESIGN AND
ALAYSIS
CONTACT HOURS: 3+1(Tutorial) hours/Week.
CORRESPONDING LAB COURSE CODE (IF
ANY):
LAB COURSE NAME: IT 234 Algorithm Design Lab
SYLLABUS:
UNIT DETAILS HOURS
I Introduction and Complexity
What is an algorithm – Properties of an Algorithm, Development of an algorithm, Pseudo-
code Conventions, Recursive Algorithms – Performance Analysis - Space and Time
Complexity –Asymptotic Notations – ‗Oh‘, ‗Omega‘, ‗Theta‘, Worst, Best and Average
Case Complexity, Running Time Comparison, Common Complexity Functions -
Recurrence Relations – Solving Recurrences using Iteration and Recurrence Trees –
Example Problems – Profiling - Amortized Complexity.
8
II Divide and Conquer - Control Abstraction, Finding Maximum and Minimum, Costs
associated element comparisons and index comparisons, Binary Search, Divide and
Conquer Matrix Multiplication, Stressen‘s Matrix Multiplication, Quick Sort, Merge Sort.
10
III Greedy Strategy - Control Abstraction, General Knapsack Problem, Minimum Cost
Spanning Trees – PRIM‘s Algorithm, Kruskal‘s Algorithm, Job sequencing with
deadlines.
8
IV Backtracking – State Space Tree - Fixed Tuple and Variable Tuple Formulation - Control
Abstraction – Generating Function and Bounding Function - Efficiency of the method -
Monte Carlo Method – N-Queens Problem, Sum of Subsets.
Branch and Bound Techniques – FIFO, LIFO, and LC Control Abstractions, 15-puzzle.
9
V Dynamic Programming- Principle of Optimality, Multistage Graph Problem, Forward
Approach, Backward Approach, All-Pairs Shortest Paths, Traveling Salesman Problem.
Sophisticated Algorithms- Approximation Algorithms – Planar Graph Coloring, Vertex
cover
10
VI String Matching Algorithms – Rabin Karp algorithm - Topological Sort - Deterministic
and Non-Deterministic Algorithms.
Lower Bound Theory - Comparison Trees for Searching and Sorting, lower bound on
comparison based algorithms, Sorting, Selection & Merging; Oracles and Adversary
Arguments –Merging, Basic concepts of randomized algorithm-Las Vagas algorithm for
search.
9
Rajagiri School of Engineering & Technology
16 Department of Information Technology
TOTAL HOURS 54
TEXT/REFERENCE BOOKS:
T/R BOOK TITLE/AUTHORS/PUBLICATION
T
R
R
R
R
Fundamentals of Computer Algorithms – Horowitz and Sahni, Galgotia
Computer Algorithms – Introduction to Design and Analysis – Sara Baase & Allen Van Gelder,
Pearson Education
Data Structures algorithms and applications – Sahni, Tata McGrHill
Foundations of Algorithms – Richard Neapolitan, Kumarss N., DC Hearth & Company
Introduction to algorithm- Thomas Coremen, Charles, Ronald Rivest -PHI
COURSE PRE-REQUISITES:
C.CODE COURSE NAME DESCRIPTION SEM
CS 205 DATA STRUCTURES
Detailed study of different data structures and
algorithms
S3
COURSE OBJECTIVES:
1 To develop an understanding about basic algorithms and different problem solving strategies.
2 To improve creativeness and the confidence to solve non-conventional problems and expertise for
analyzing existing solutions.
COURSE OUTCOMES:
Si.NO DESCRIPTION Blooms’
Taxonomy
Level
C605.1 Students will be able to define the various algorithm analysis methods. Knowledge
(level1)
C605.2 Students will be able to estimate the asymptotic time complexities of various
recurrence relations.
Evaluate
(level 5)
C605.3 Students will be able to choose the appropriate method to solve the recurrence
relations
Apply
(level 3 )
C605.4 Students will be able to distinguish and give examples for the different types of
algorithm development strategies.
Understand
and Analyze
(level 4)
C605.5 Students will be able to describe the use of Lower Bound Theory to improve the
complexity of an algorithm
Understand
(level 2)
C605.6 The students will be able to interpret the approximation algorithms,
randomized algorithms and string matching algorithms
Level 2
Rajagiri School of Engineering & Technology
17 Department of Information Technology
CO-PO AND CO-PSO MAPPING
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
C605.1 1 1 1 1 _ _ _ _ _ _ _ _ _ _ _
C605.2 _ _ 3 3 _ _ _ _ _ _ _ _ 3 _ _
C605.3 - _ 1 _ 3 _ _ _ _ _ _ _ 3 _ _
C605.4 2 2 2 _ _ _ _ _ _ _ _ _ _ _ _
C605.5 _ _ 1 1 _ _ _ _ _ _ _ _ - _ _
C605.6 2 2 2 2 - - - - - - - - 3 - -
C605 2 2 2 2 3 - _ _ _ _ _ _ 3 _ _
GAPS IN THE SYLLABUS - TO MEET INDUSTRY/PROFESSION REQUIREMENTS:
Si
NO
DESCRIPTION PROPOSED
ACTIONS
RELEVANCE
WITH POs
RELEVANCE
WITH PSOs
1 Introduce to the notion of NP-complete
problems.
SEMINARS 2,4,10 -
2 Encourage students to write programs based on
the taught algorithms to solve problems.
ASSIGNMENTS 3,12 1
PROPOSED ACTIONS: TOPICS BEYOND SYLLABUS/ASSIGNMENT/INDUSTRY VISIT/GUEST
LECTURER/NPTEL ETC
TOPICS BEYOND SYLLABUS/ADVANCED TOPICS/DESIGN:
Si
NO
DESCRIPTION PROPOSED
ACTIONS
RELEVANCE
WITH POs
RELEVANCE
WITH PSOs
1 Recurrence relation solving
using substitution and master‘s
method
NPTEL 3,5 1
2 Graph Traversals – Connected
Components
Assignments 1,2,3 -
WEB SOURCE REFERENCES:
1 https://www.cs.duke.edu/courses/fall08/cps230/Book.pdf
2 http://www.cse.iitd.ernet.in/~ssen/csl356/root.pdf
3 http://www.imsc.res.in/~vraman/pub/intro_notes.pdf
4 http://www.ics.uci.edu/~goodrich/teach/cs161/notes/
5 http://elearning.vtu.ac.in/06CS43.html
DELIVERY/INSTRUCTIONAL METHODOLOGIES:
CHALK & TALK STUD.
ASSIGNMENT
WEB
RESOURCES
LCD/SMART
BOARDS
STUD.
SEMINARS
☐ ADD-ON COURSES
ASSESSMENT METHODOLOGIES-DIRECT
ASSIGNMEN
TS
STUD.
SEMINARS
TESTS/MODEL
EXAMS
UNIV.
EXAMINATIO
N
Rajagiri School of Engineering & Technology
18 Department of Information Technology
STUD. LAB
PRACTICES
STUD. VIVA ☐ MINI/MAJOR
PROJECTS
☐ CERTIFICATIONS
☐ ADD-ON
COURSES
☐ OTHERS
ASSESSMENT METHODOLOGIES-INDIRECT
ASSESSMENT OF COURSE OUTCOMES
(BY FEEDBACK, ONCE)
STUDENT FEEDBACK ON FACULTY
(TWICE)
☐ ASSESSMENT OF MINI/MAJOR
PROJECTS BY EXT. EXPERTS
☐ OTHERS
Prepared by Approved
by
Nikhila T Bhuvan BINU A, HoD
Rajagiri School of Engineering & Technology
19 Department of Information Technology
COURSE PLAN
Sl.No Module Planned Day Planned
1 1 Day 1 Why we study the subject? Its role in Algorithm design and analysis
2 1 Day 2 What is an algorithm – Properties of an Algorithm, Development of an algorithm
3 1 Day 3 Pseudo Conventions, Recursive Algorithms
4 1 Day4 Performance Analysis - Space and Time Complexity
5 1 Day 5 Asymptotic Notations – ‗Oh‘, ‗Omega‘, ‗Theta‘, Worst, Best and Average Case Complexity
6 1 Day 6 Running Time complexity Comparison
7 1 Day 7 Common Complexity Functions -Recurrence Relations – Solving Recurrences using Iteration and
Recurrence Trees
8 1 Day 8 Common Complexity Functions -Recurrence Relations – Solving Recurrences using Iteration and
Recurrence Trees
9 1 Day 9 Common Complexity Functions -Recurrence Relations – Solving Recurrences using Iteration and
Recurrence Trees
10 1 Day 10 Profiling - Amortized Complexity
11 1 Day 11 Profiling - Amortized Complexity
12 1 Day 12 Module 1 Revision
13 2 Day 13 Divide and Conquer - Control Abstraction
14 2 Day 14 Finding Maximum and Minimum
15 2 Day 15 Costs associated element comparisons and index comparisons
16 2 Day 16 Binary Search
17 2 Day 17 Divide and Conquer-Matrix Multiplication,
18 2 Day 18 Stressen‘s Matrix Multiplication
19 2 Day 19 Stressen‘s Matrix Multiplication
20 2 Day 20 Quick Sort
21 2 Day 21 Quick Sort,Merge Sort. – Refinements.
22 2 Day 22 Merge Sort. –Refinements.
23 2 Day 23 Module 2 Revision
Rajagiri School of Engineering & Technology
20 Department of Information Technology
24 3 Day 24 Greedy Strategy - Control Abstraction
25 3 Day 25 General Knapsack Problem
26 3 Day 26 General Knapsack Problem
27 3 Day 27 Minimum Cost Spanning Trees
28 3 Day 28 Prim's algorithm
29 3 Day 29 Kruskal‘s Algorithm
30 3 Day 30 Job sequencing with deadlines
31 4 Day 31 Backtracking – State Space Tree
32 4 Day 32 Fixed Tuple and Variable Tuple Formulation - Control Abstraction
33 4 Day 33 Generating Function and Bounding Function-Efficiency of the method
34 4 Day 34 Monte Carlo Method
35 4 Day 35 N-Queens Problem, Sum of Subsets
36 4 Day 36 N-Queens Problem, Sum of Subsets
37 4 Day 37 Branch and Bound Techniques – FIFO, LIFO, and LC Control Abstractions
38 4 Day 38 15-puzzle problem
39 5 Day 39 Dynamic Programming - Principle of Optimality
40 5 Day 40 Multistage Graph Problem
41 5 Day 41 Forward and Backward Approach
42 5 Day 42 Forward and Backward Approach
43 5 Day 43 All-Pairs Shortest Paths, Traveling Salesman Problem
44 5 Day 44 All-Pairs Shortest Paths, Traveling Salesman Problem
45 5 Day 45 Approximation Algorithms
46 5 Day 46 Planar Graph Coloring, Vertex cover
47 6 Day 47 String Matching Algorithms – Rabin Karp algorithm - Topological Sort - Deterministic and Non-
Deterministic Algorithms.
48 6 Day 48 String Matching Algorithms – Rabin Karp algorithm - Topological Sort - Deterministic and Non-
Deterministic Algorithms.
49 6 Day49 Lower Bound Theory - Comparison Trees for Searching and Sorting, lower bound on comparison
based algorithms, Arguments –Merging
Rajagiri School of Engineering & Technology
21 Department of Information Technology
50 6 Day 50 Basic concepts of randomized algorithm-Sorting, Selection & Merging
51 6 Day 51 Oracles and Adversary Arguments –Merging,Basic concepts of randomized algorithm-Las Vagas
algorithm for search.
Tutorial Topics(questions and answers)
1. Write the control abstraction for Greedy method?
Algorithm Greedy (a,n)
{
solution= 0;
for i=1 to n do
{
x=select(a);
if feasible(solution,x) then
solution=Union(solution,x);
}
Return solution;
}
2. Give the algorithm for insertion sort.
//Sorts a given array by insertion sort
//Input: An array A[0..n-1] of n orderable elements
//Output: Array A[0..n-1] sorted in non-decreasing order
for I =1 to n-1 do
v = A[I]
j = I-1
while j= 0 and A[j] > v do
A[j+1] = A[j]
j = j – 1
A[j+1] = v
3. Discuss the Asymptotic notations with efficiency classes and examples
Explain about
• Big-Oh notation
• Big-Theta notation
• Big-Omega notation
Rajagiri School of Engineering & Technology
22 Department of Information Technology
• Properties of notations
• Orders of growth
• Efficiency classes
4. What is n-queens problem? How can you solve it using Backtracking
N-Queens Problem: N queens are to be placed on an nxn chessboard so that no two of them
are in attacking position. i.e., no two queens are in same row or same row or same diagonal.
Let us assume that queen i is placed in row i. So the problem can be represented as n-tuple
(x1, ..., xn) where each xi represents the column in which we have to place queen i.
Hence the explicit constraints is Si ={1,2,..,n}. No two xi can be same and no two queens can be in
same diagonal is the implicit constraint. Since we fixed the row number the solution space reduce
from nn to n!.
Consider the case where n=4. A permutation tree shows all possible elements in solution space.
Edge from level i to level i+1 specify the value of xi. Hence there are 4! = 24 leaves for the tree.
Algorithm 1.1
Algorithm Place (k, i)
{
// Returns true if queen can be placed on kth row, ith column. Otherwise return false. //
Assume that first k-1 elements of x is set.
For j=1 to k-1 do
if ((x[j] = i) || (abs(x[j]-i) = abs(j-k))) //same column or same diagonal
Rajagiri School of Engineering & Technology
23 Department of Information Technology
then return false;
return true;
}
Algorithm NQueens (k, n)
{
// Prints all possible permutations to place n queens on an nxn chess board so that
// none of them are in attacking position.
for i=1 to n do
{
if (Place(k,i))then
{
x[k] = i;
if (k==n) then write (x[1:n]);
else
NQueens(k+1, n);
}
}
4. Define 15 puzzle problem and its solution
This problem was invented by Sam Loyd in 1878. There are 15 numbered tiles placed on a square
frame with capacity of 16 tiles. Given an initial arrangement and objective to transform any initial
arrangement to a goal arrangement through a series of legal moves. A legal move is the one that
move a tile adjacent to an empty space(ES) to ES. Each move creates a new arrangement of tile
called states of the puzzle. Initial and final arrangements are called initial state and goal states
respectively.
Given any initial state a goal state is reachable iff the value calculated for both
the initial state and the goal state is of the same parity (i.e., either both odd or both even).
Here, less(i) is the number of tiles j such that j<i and position(j) > position(i).
r is the row number of empty state(ES)
Rajagiri School of Engineering & Technology
24 Department of Information Technology
Here the children of the node x is the state reachable from x by one legal move. Consider the
move as a move of empty space. Hence there are four possible moves, moving up, down, right
and left. Here, no node p has a child state same as p‘s parent.
Here if we perform a breadth first search, the search will be blind. An intelligent move for search
method will be one that seeks an answer node and adapt to the path after each move.
Instead of calculating c(x), calculate c‘(x) as c‘(x) = f(x) + g‘(x).
f(x) : length of the path from root to x.
g‘(x) : number of non blank tiles not in their goal position.
In the state space tree, node1 dies after leaving behind nodes 2, 3, 4 and 5.
Calculating c‘(x) for these nodes, we have
c‘(2) = 1+4 = 5
c‘(3) = 1+4 = 5
c‘(4) = 1+2 = 3
c‘(5) = 1+4 = 5
Rajagiri School of Engineering & Technology
25 Department of Information Technology
Since c‘(4) is the lowest value, next E-node is node 4. It will generates children 10, 11 and 12.
Now the live nodes are 2,3,5,10,11 and 12.
c‘(10) = 2+1 = 3
c‘(11) = 2+3 = 5
c‘(12) = 2+3 = 5
Now select node10. Continuing the same we get the next E-node as node 23 which is the answer
node.
Assignment Topics Assignment I
1. Define little oh and little omega notation. What makes it different from big oh and big
omega
2. Using substitution method find the time complexity of T(n)=7T(n/2) for n>1 and n a
power of 2 where T(1)=1
3. Define recursive tree method and find the time complexity of T(n)=T(n/4)+T(n/2)+n2
using the same
Assignment II
Lower Bound Theory - Comparison Trees for Searching and Sorting
Rajagiri School of Engineering & Technology
26 Department of Information Technology
IT 204
Object Oriented Techniques
Rajagiri School of Engineering & Technology
27 Department of Information Technology
IT 204 : OBJECT ORIENTED TECHNIQUES
COURSE INFORMATION SHEET
PROGRAMME: Information Technology DEGREE: BTECH
COURSE: OBJECT ORIENTED
TECHNIQUES
SEMESTER: 4 CREDITS: 3
COURSE CODE:IT 204REGULATION: 2017 COURSE TYPE: CORE
COURSE AREA/DOMAIN: CONTACT HOURS: 4
hours/Week.
CORRESPONDING LAB COURSE CODE
(IF ANY): IT 232
LAB COURSE NAME: Object Oriented
programing lab
SYLLABUS:
UNIT DETAILS HOURS
I Why Do We Need Object-Oriented Programming? - Procedural Languages - The
Object-Oriented Approach - Characteristics of Object-Oriented Languages –
Objects – Classes – Inheritance – Reusability - Creating New Data Types -
Polymorphism and Overloading - C++ and C
Objects and Classes - A Simple Class - Classes and Objects - Defining the Class -
Using the Class - Calling Member Functions - C++ Objects as Physical Objects -
C++ Objects as Data Types – Constructors – Destructors - Objects as Function
Arguments - Overloaded Constructors - Member Functions Defined Outside the
Class - Objects as Arguments - The Default Copy Constructor - Static Class Data
- const and Classes
7
II Arrays and Strings - Array Fundamentals - Arrays as Class Member Data -
Arrays of Objects - The Standard C++ string Class
Operator Overloading - Overloading Unary Operators - Overloading Binary
Operators - Data Conversion
6
III Inheritance - Derived Class and Base Class - Derived Class Constructors -
Overriding Member Functions - Which Function Is Used?
Class Hierarchies - Public and Private Inheritance - Levels of Inheritance -
Multiple Inheritance
7
IV Pointers - Addresses and Pointers - The Address-of Operator & - Pointers and
Arrays
Pointers and Functions - Memory Management: new and delete - Pointers to
Objects
8
V Virtual Functions - Friend Functions - Static Functions - Assignment and Copy
Initialization - The this Pointer
Streams and Files - Stream Classes - Stream Errors - Disk File I/O with Streams -
File Pointers - File I/O with Member functions
8
Rajagiri School of Engineering & Technology
28 Department of Information Technology
VI Templates and Exceptions - Function Templates - Class Templates
Exceptions - Exception Syntax - Multiple Exceptions - Exceptions with
Arguments
7
Total Hours 43
TEXT/REFERENCE BOOKS:
T/R BOOK TITLE/AUTHORS/PUBLICATION
R Lafore R., Object Oriented Programming in C++, Galgotia Publications, 2001.
R Schildt H., Teach Yourself C++, Tata McGraw Hill, 2000.
R Hubbard J. R., Schaum‘s Outline of Programming with C++, McGraw Hill, 2000.
R Balagurusamy, Object Oriented Programming with C++, Tata McGraw Hill, 2008.
R Stephen D. R., C. Diggins, J. Turkanis and J. Cogswell, C ++ Cook book, O'Reilly Media,
2013.
R Oualline S., Practical C++ Programming, 2/e, O'Reilly Media, 2002.
R Meyers S., Effective C++, Addison Wesley, 2011. Error Control Coding Fundamentals and
Applications: Prentice Hall Inc.
COURSE PRE-REQUISITES:
C.CODE COURSE NAME DESCRIPTION SEM
IT204 Problem solving and computer
programming
To have an idea of the basic programming
syntax.
4
COURSE OBJECTIVES:
1 To build an understanding of basic concepts of object oriented programming techniques
2 To develop programming skills in C++ programming language
3 To implement object oriented techniques using C++ language features.
4 To develop software using object oriented programming paradigms
COURSE OUTCOMES:
Sl.NO DESCRIPTION Blooms’ Taxonomy
Level
1 ApplyObject Oriented Programming concepts. Apply
[Level 4]
2 To understand the special features of C++ Programming
language
Understand
[Level 5]
3 To Analyse existing procedure oriented softwares to
object oriented based ones
Analyse
[level 3]
PO
1
PO
2
PO
3
PO
4
PO
5
PO
6
PO
7
PO
8
PO
9
PO
10
PO
11
PO
12
PSO
1
PSO
2
PSO
3
IT204.1 1 - - - - 1 - - - - - - 2 -
IT204.2 - - - - 2 - 1 - - - - - 2 -
Rajagiri School of Engineering & Technology
29 Department of Information Technology
IT204.3 - 1 - - - - - - - - - - 1 - -
JUSTIFICATIONS FOR CO-PO MAPPING
MAPPING LOW/MEDIUM/HIG
H JUSTIFICATION
IT204.1-PO1 H
Apply the knowledge of mathematics, science,
engineering Fundamentals, understand the object oriented
concepts
IT204.1-PO6 H Students apply appropriate techniques, to formulate
object oriented ideas.
IT204.1-
PSO2 M
Students acquire their engineering skills in computing
and information engineering domains to oops programs.
IT204.2-PO5
M
Select appropriate resources, to design simple project
using oops ideas.
IT204.2-PO7 H Understand the impact of the professional engineering
solutions in the use of standard templates.
IT204.2-
PSO2 M
engineering skills in computing and information
engineering domains like object oriented paradigm
IT204.3-PO2 H
IT204.3-
PSO1 H
PROPOSED ACTIONS: TOPICS BEYOND SYLLABUS/ASSIGNMENT/INDUSTRY VISIT/GUEST
LECTURER/NPTEL ETC
GAPS IN THE SYLLABUS - TO MEET INDUSTRY/PROFESSION REQUIREMENTS:
SNO DESCRIPTION PROPOSED
ACTIONS
1 Familiarizing different areas where object oriented programming
language can be applied
Home assignments/
Industry visit
2 Implementation issues related to object-oriented techniques Extra labs to be
given/ home
assignments
Rajagiri School of Engineering & Technology
30 Department of Information Technology
3 Familiarizing the role of object oriented programming language in
developing system level programs
Seminar
TOPICS BEYOND SYLLABUS/ADVANCED TOPICS/DESIGN:
1 Implementation issues related to object-oriented techniques
2 Understanding structs and apply them in C++ programs.
WEB SOURCE REFERENCES:
1 http://thatchna.weebly.com/uploads/4/1/9/3/4193382/std_c_notes_03.pdf
2 http://www.idiap.ch/~fleuret/files/Francois_Fleuret_-_C++_Lecture_Notes.pdf
3 http://www.bcanotes.com/Info%20About%20C++.html
4 http://www.tutorialspoint.com/java/java_overview.htm
5 http://www.java-questions.com/oops_interview_questions.html
6 http://javaconcept.in/
7 http://www.javaworld.com/channel_content/jw-concepts-index.html
DELIVERY/INSTRUCTIONAL METHODOLOGIES:
CHALK & TALK STUD. ASSIGNMENT WEB RESOURCES
LCD/SMART BOARDS STUD. SEMINARS ☐ ADD-ON COURSES
ASSESSMENT METHODOLOGIES-DIRECT
ASSIGNMENTS STUD. SEMINARS TESTS/MODEL
EXAMS
UNIV.
EXAMINATION
STUD. LAB
PRACTICES
STUD. VIVA ☐ MINI/MAJOR
PROJECTS
☐ CERTIFICATIONS
☐ ADD-ON
COURSES
☐ OTHERS
ASSESSMENT METHODOLOGIES-INDIRECT
ASSESSMENT OF COURSE OUTCOMES (BY
FEEDBACK, ONCE)
STUDENT FEEDBACK ON FACULTY
(TWICE)
ASSESSMENT OF MINI/MAJOR PROJECTS
BY EXT. EXPERTS
☐ OTHERS
Prepared by Approved by
Mathews Abraham Binu A
(HOD)
Rajagiri School of Engineering & Technology
31 Department of Information Technology
COURSE PLAN
Sl no Date Module Planned Day Topic
1 2/2/2017 1 Day1 Object oriented Techniques introduction.
2 3/2/ 1 Day 2 Inheritance, Reusability, Creating New Data
Types
3 6/2 1 Day 3 Polymorphism and Overloading , C++ and
C
Objects and Classes
4 7/2 1 Day 4 Classes and Objects , Defining the Class
,Using the Class, Calling Member Functions
5 8/2 1 Day 5 C++ Objects as Physical Objects, C++
Objects as Data Types, Constructors
6 9/2/ 1 Day 6 Overloaded Constructors ,Member
Functions Defined Outside the Class,
Objects as Arguments.
7 13/2 1 Day 7 The Default Copy Constructor , Static Class
Data ,constant and Classes
8 14/2 2 Day 8 Arrays and Strings , Array Fundamentals
9 15/2 2 Day 9 Arrays as Class Member Data , Arrays of
Objects
10 16/2 2 Day 10 The Standard C++ string Class
11 20/2 2 Day 11 Operator Overloading
12 21/2 2 Day 12 Overloading Unary Operators
13 22/2 2 Day 13 Overloading Binary Operators examples.
14 23/2 3 Day 14 Inheritance , Derived Class and Base Class
15 27/2 3 Day 15 Derived Class Constructors ,Overriding
Member Functions
16 28/2 3 Day 16 Class Hierarchies , Public and Private
Inheritance
17 1/3 3 Day 17 Levels of Inheritance
18 2/3 3 Day 18 Multiple Inheritance
19 6/3 3 Day 19 Inheritance programs.
TUTORIAL 1
1. Disscuss the characteristics of object oriented languages.
TUTORIAL 2
Write a program in C++on
1. Classes and objects
2. Constructors
3. Operator overloading
4. Inheritance
5. Virtual function
Rajagiri School of Engineering & Technology
32 Department of Information Technology
Assigment1
1. Discuss Constructors and destructors in detail with suitable examples.
2. Write a program for overloading the assignment operator.
Assignment 2
1. Explain briefly about
1. Templates
2. Standard Template Library
2. Write a program to explain the manipulation of Strings using operators
Rajagiri School of Engineering & Technology
33 Department of Information Technology
CS208
Principles of Database
Design
Rajagiri School of Engineering & Technology
34 Department of Information Technology
CS208 : PRINCIPLES OF DATABASE DESIGN
COURSE INFORMATION SHEET
PROGRAMME: INFORMATION TECHNOLOGY DEGREE: B.TECH
COURSE: Principles of Database Design
SEMESTER: IV CREDITS: 3
COURSE CODE: CS208 REGULATION: 2016 COURSE TYPE: CORE
COURSE AREA/DOMAIN: DATABASE
MANAGEMENT SYSTEM
CONTACT HOURS: 2+1 (Tutorial)
hours/Week
CORRESPONDING LAB COURSE CODE (IF ANY):
IT333
LAB COURSE NAME: DATABASE LAB
SYLLABUS:
UNIT DETAILS HOURS
I
Introduction: Data: structured, semi-structured and unstructured data, Concept &
Overview of DBMS, Data Models, Database Languages, Database Administrator,
Database Users, Three Schema architecture of DBMS. Database architectures and
classification. (Reading: Elmasri Navathe, Ch. 1 and 2. Additional Reading: Silberschatz,
Korth, Ch. 1) Entity-Relationship Model: Basic concepts, Design Issues, Mapping
Constraints, Keys, Entity-Relationship Diagram, Weak Entity Sets, Relationships of
degree greater than 2 (Reading: Elmasri Navathe, Ch. 7.1-7.8)
06
II
Relational Model: Structure of relational Databases, Integrity Constraints, synthesizing
ER diagram to relational schema (Reading: Elmasri Navathe, Ch. 3 and 8.1, Additional
Reading: Silbershatz, Korth, Ch. 2.1-2.4) Database Languages: Concept of DDL and
DML relational algebra (Reading: Silberschatz, Korth, Ch 2.5-2.6 and 6.1-6.2, Elmasri
Navathe, Ch. 6.1-6.5)
06
III
Structured Query Language (SQL): Basic SQL Structure, examples, Set operations,
Aggregate Functions, nested sub-queries (Reading: Elmasri Navathe, Ch. 4 and 5.1)
Views, assertions and triggers (Reading: Elmasri Navathe, Ch. 5.2-5.3, Silberschatz,
Korth Ch. 5.3). Functions, Procedures and HLL interfaces (Reading: Silberschatz,
Korth Ch. 5.1-5.2)
07
IV
Relational Database Design: Different anomalies in designing a database, normalization,
functional dependency (FD), Armstrong‘s Axioms, closures, Equivalence of FDs, minimal
Cover (proofs not required). Normalization using functional dependencies, INF, 2NF, 3NF
and BCNF, lossless and dependency preserving decompositions (Reading: Elmasri and
Navathe, Ch. 14.1-14.5, 15.1-15.2. Additional Reading: Silberschatz, Korth Ch. 8.1-8.5)
07
V
Physical Data Organization: index structures, primary, secondary and clustering indices,
Single level and Multi-level indexing, B-Trees and B+-Trees (basic structure only,
algorithms not needed), Indexing on multiple keys (Reading Elmasri and Navathe, Ch.
17.1-17.4) Query Optimization: algorithms for relational algebra operations, heuristics-
based query optimization, Cost-based query optimization (Reading Elmasri and Navathe,
Ch. 18.1-18.3, 18.6-18.8)
08
VI
Transaction Processing Concepts: overview of concurrency control and recovery acid
properties, serial and concurrent schedules, conflict serializability. Two-phase locking,
failure classification, storage structure, stable storage, log based recovery, deferred
database modification, check-pointing, (Reading Elmasri and Navathe, Ch. 20.1-20.5
(except 20.5.4-20.5.5) , Silberschatz, Korth Ch. 15.1 (except 15.1.4-15.1.5), Ch. 16.1 –
16.5) Recent topics (preliminary ideas only): Semantic Web and RDF(Reading: Powers
Ch.1, 2), GIS, biological databases (Reading: Elmasri and Navathe Ch. 23.3-23.4) Big
Data (Reading: Plunkett and Macdonald, Ch. 1, 2)
08
TOTAL HOURS 42
TEXT/REFERENCE BOOKS:
T/R BOOK TITLE/AUTHORS/PUBLICATION
T Elmasri R. and S. Navathe, Database Systems: Models, Languages, Design and Application
Programming, Pearson Education, 2013.
Rajagiri School of Engineering & Technology
35 Department of Information Technology
T Silberschatz A., H. F. Korth and S. Sudarshan, Database System Concepts, 6/e, McGraw Hill, 2011.
R Powers S., Practical RDF, O‘Reilly Media, 2003.
R Plunkett T., B. Macdonald, et al., Oracle Big Data Hand Book, Oracle Press, 2013.
COURSE PRE-REQUISITES:
C.CODE COURSE NAME SEM
CS205 Data structures
3
COURSE OBJECTIVES:
1 To impart the basic understanding of the theory and applications of database management systems.
2 To give basic level understanding of internals of database systems.
3 To expose to some of the recent trends in databases.
COURSE OUTCOMES:
SNO DESCRIPTION Blooms’ Taxonomy
Level
1
Define, explain and illustrate the fundamental concepts of databases and
construct an Entity-Relationship (E-R) model from specifications and to perform
the transformation of the conceptual model into corresponding logical data
structures.
Knowledge,
Understand, Apply,
Create
(Level1,2,3,6)
2
Model and design a relational database following the design principles.
Create (Level 6)
3
Develop queries for relational database in the context of practical applications
Apply, Create
(Level 3, Level 6)
4 Students will be able to design databases using the concepts of normalization and
will be able to distinguish and summarize different normal forms.
Understand,
Analyze, Evaluate
(Level 2,4,5)
5 Students will be able to explain and use the concepts of indexing and query
processing.
Apply, Analyze
(Level 3, Level 4)
6 Define, explain and illustrate fundamental principles of data organization, query
optimization and concurrent transaction processing and appreciate latest trends in
databases.
Knowledge,
Understand, Apply
(Level 1,2,3)
CO-PO AND CO-PSO MAPPING
PO
1
PO
2
PO
3
PO
4
PO
5
PO
6
PO
7
PO
8
PO
9
PO
10
PO
11
PO
12
PSO
1
PSO
2
PSO
3
C208.1 _ _ 2 _ 1 _ _ _ _ _ _ _ _ 3 _
C208.2 _ 2 2 _ 2 _ _ _ _ _ _ _ 1 2 _
C208.3 _ 2 3 _ _ _ _ _ _ _ _ _ 2 _ _
C208.4 2 2 2 2 _ _ _ _ _ _ _ _ _ 2 1
C208.5 1 1 1 _ _ _ _ _ _ _ _ _ 1 2 _
C208.6 _ 2 2 _ 1 _ _ _ _ _ _ _ 1 _ _
C208 2 2 3 2 2 _ _ _ _ _ _ _ 2 3 1
JUSTIFICATIONS FOR CO-PO MAPPING
Rajagiri School of Engineering & Technology
36 Department of Information Technology
MAPPING LOW/MEDIUM/HIGH JUSTIFICATION
C208.1-PO3 M Learning the fundamentals of database systems helps the students to
design databases that meet specified needs.
C208.1-PO5 L Students acquire skills to choose appropriate dbms software needed for
various applications.
C208.1-PSO2 H Students will be able to contribute their skills in database designing by
learning the fundamental concepts.
C208.2-PO2 M Analyze the requirement and design efficient database systems needed
for specific application.
C208.2-PO3 M Acquire skills to design systems that meet specific needs of public.
C208.2-PO5 M Learning the basics of relational algebra helps in using modern tools
available for database designing.
C208.2-PSO1 L Students will be able to apply the database fundamentals for analyzing
needs and designing systems accordingly.
C208.2-PSO2 M Students will be able to contribute their skills in database designing.
C208.3-PO2 M Students will be able to analyze and identify specific database
requirement which can be solved using SQL.
C208.3-PO3 H Acquire skills to develop solutions for complex problems using SQL.
C208.3-PSO1 M Acquire skills to design and manipulate database systems using SQL.
C208.4-PO1 M Apply the basic knowledge of normalization in order to design efficient
database systems.
C208.4-PO2 M Acquire skills to identify the database requirement and design systems
applying normalization principles.
C208.4-PO3 M Design and develop efficient database systems by applying
normalization techniques.
C208.4-PO4 M Complex database designing will be done effectively using
normalization techniques.
C208.4-PSO2 M Contribute skills in developing normalized database systems.
C208.4-PSO3 L Develop strong skills in developing and designing easily manageable
database systems by applying normalization techniques.
C208.5-PO1 L Apply the knowledge of indexing and query optimization for the
effective utilization of DBMS.
C208.5-PO2 L Identify and analyze complex queries and choose the optimized query
for solving engineering problems.
C208.5-PO3 L Design systems with effective indexing mechanisms for the fast
retrieval of data.
C208.5-PSO1 L Design and implement efficient query processing system for fast
retrieval of database information.
C208.5-PSO2 M Design databases using proper indexing mechanisms and query
Rajagiri School of Engineering & Technology
37 Department of Information Technology
optimization techniques.
C208.6-PO2 M Identify and formulate solutions for concurrency control in database
designing.
C208.6-PO3 M Design and develop efficient database systems that support concurrent
transactions.
C208.6-PO5 L Students will be able to apply modern database techniques to solve
complex engineering problems.
C208.6-PSO1 L Acquire skills to develop and manage database transactions.
GAPS IN THE SYLLABUS - TO MEET INDUSTRY/PROFESSION REQUIREMENTS:
SNO DESCRIPTION PROPOSED
ACTIONS
1 Case study - Microsoft access ASSIGNMENT
2 XML database and XML advanced concepts NPTEL
3 Data mining - knowledge and discovery NPTEL
PROPOSED ACTIONS: TOPICS BEYOND SYLLABUS/ASSIGNMENT/INDUSTRY VISIT/GUEST
LECTURER/NPTEL ETC
TOPICS BEYOND SYLLABUS/ADVANCED TOPICS/DESIGN:
1 Case study of SQL server 2008
2 Conceptual design pattern for relational databases
3 Improving DBMS Performance through Diverse Redundancy – Distributed systems
4 DB2 A case study
5 Mongo DB
WEB SOURCE REFERENCES:
1 www.w3schools.com
2 www.docs.oracle.com
3 www.sqlcourse.com
4 www.beginner-sql-tutorial.com
5 www.plsql-tutorial.com
6 www.ibm.com
7 www.tizag.com
8 www.slideshare.net
9 www.sqlexamples.info
10 www.dbms-tutorial.blogspot.com
DELIVERY/INSTRUCTIONAL METHODOLOGIES:
☐ CHALK & TALK ☐ STUD.
ASSIGNMENT
☐ WEB RESOURCES
☐ LCD/SMART
BOARDS
☐ STUD. SEMINARS ☐ ADD-ON COURSES
Rajagiri School of Engineering & Technology
38 Department of Information Technology
ASSESSMENT METHODOLOGIES-DIRECT
☐ ASSIGNMENTS ☐ STUD. SEMINARS ☐ TESTS/MODEL
EXAMS
☐ UNIV.
EXAMINATION
☐ STUD. LAB
PRACTICES
☐ STUD. VIVA ☐ MINI/MAJOR
PROJECTS
☐ CERTIFICATIONS
☐ ADD-ON COURSES ☐ OTHERS
ASSESSMENT METHODOLOGIES-INDIRECT
☐ ASSESSMENT OF COURSE OUTCOMES (BY
FEEDBACK, ONCE)
☐ STUDENT FEEDBACK ON FACULTY
(TWICE)
☐ ASSESSMENT OF MINI/MAJOR PROJECTS BY
EXT. EXPERTS
☐ OTHERS
Prepared by Approved
by
Lakshmi K.S Binu A
(Faculty) (HOD)
Rajagiri School of Engineering & Technology
39 Department of Information Technology
COURSE PLAN
Sl.No Module Planned
Day Planned
1 1 Day 1 Introduction: Data: structured, semi-structured and unstructured data,
Concept & Overview of DBMS, Data Models
2 1 Day 2 Database Languages, Database Administrator, Database Users, Three
Schema architecture of DBMS
3 1 Day 3 Database architectures and classification
4 1 Day 4 Entity-Relationship Model: Basic concepts, Design Issues
5 1 Day 5 Mapping Constraints, Keys, Entity-Relationship Diagram
6 1 Day 6 Weak Entity Sets, Relationships of degree greater than 2
7 2 Day 7 Structure of relational Databases, Integrity Constraints
8 2 Day 8 Synthesizing ER diagram to relational schema
9 2 Day 9 Synthesizing ER diagram to relational schema
10 2 Day 10 Database Languages: Concept of DDL and DML
11 2 Day 11 Relational Algebra – Fundamental Operations
12 2 Day 12 Relational Algebra – Additional Operations
13 3 Day 13 Structured Query Language (SQL): Basic SQL Structure, examples
14 3 Day 14 Set operations, Aggregate Functions
15 3 Day 15 Nested sub-queries
16 3 Day 16 Views, assertions
17 3 Day 17 Triggers
18 3 Day 18 Functions, Procedures
19 3 Day 19 HLL interfaces
20 4 Day 20 Relational Database Design: Different anomalies in designing a database,
normalization, functional dependency (FD)
21 4 Day 21 Armstrong‘s Axioms, closures, Equivalence of FDs
22 4 Day 22 Minimal Cover
23 4 Day 23 Normalization using functional dependencies, INF, 2NF
24 4 Day 24 3NF and BCNF
25 4 Day 25 Lossless and dependency preserving decompositions
26 4 Day 26 Examples
27 5 Day 27 Physical Data Organization: index structures, primary, secondary indices
28 5 Day 28 Clustering indices
29 5 Day 29 Single level and Multi-level indexing
30 5 Day 30 B-Trees and B+-Trees
31 5 Day 31 Indexing on multiple keys
32 5 Day 32 Query Optimization: algorithms for relational algebra operations
33 5 Day 33 Heuristics-based query optimization
34 5 Day 34 Cost-based query optimization
35 6 Day 35 Transaction Processing Concepts: overview of concurrency control and
recovery acid properties
Rajagiri School of Engineering & Technology
40 Department of Information Technology
36 6 Day 36 Serial and concurrent schedules, conflict serializability
37 6 Day 37 Two-phase locking, Failure classification
38 6 Day 38 Storage structure, stable storage, log based recovery
39 6 Day 39 Deferred database modification, check-pointing
40 6 Day 40 Semantic Web and RDF
41 6 Day 41 GIS, biological databases
42 6 Day 42 Big Data
Rajagiri School of Engineering & Technology
41 Department of Information Technology
TUTORIAL
Tutorial 1
1. Design a relational database corresponding to the E-R diagram given below:
2. Design a relational database for a university registrar‘s office. The office maintains data about each class,
including the instructor, the number of students enrolled, and the time and place of the class meetings. For each
student-class pair, a grade is recorded.
3. Consider the following relational database schema:
employee (person-name, street, city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)
Give an expression in the relational algebra to express each of the following queries:
a. Find the names of all employees who work for First Bank Corporation.
b. Find the names and cities of residence of all employees who work for First Bank Corporation.
c. Find the names, street address, and cities of residence of all employees who work for First Bank Corporation
and earn more than $10,000 per annum.
d. Find the names of all employees in this database who live in the same city as the company for which they
work.
e. Find the names of all employees who live in the same city and on the same street as do their managers.
f. Find the names of all employees in this database who do not work for First Bank Corporation.
g. Find the names of all employees who earn more than every employee of Small Bank Corporation.
h. Assume the companies may be located in several cities. Find all companies located in every city in which
Small Bank Corporation is located.
4. Consider the following relational database schema:
employee (person-name, street, city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)
a. Modify the database so that Jones now lives in Newtown.
Rajagiri School of Engineering & Technology
42 Department of Information Technology
b. Give all employees of First Bank Corporation a 10 percent salary raise.
c. Give all managers in this database a 10 percent salary raise.
d. Give all managers in this database a 10 percent salary raise, unless the salary would be greater than
$100,000. In such cases, give only a 3 percent raise.
e. Delete all tuples in the works relation for employees of Small Bank Corporation.
5. Repeat Question 4 with tuple relational calculus.
Tutorial 2
1. Examine the table shown below:
a. Why is this table not in 1NF?
b. Describe and illustrate the process of normalizing the data shown in this table to third normal form
(3NF).
c. Identify the primary, alternate and foreign keys in your 3NF relations.
Rajagiri School of Engineering & Technology
43 Department of Information Technology
ASSIGNMENT
ASSIGNMENT NO: 1
For the following relation schema:
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)
Give an expression in SQL for each of the following queries:
a) Find the names, street address, and cities of residence for all employees who work for 'First Bank
Corporation' and earn more than $10,000.
b) Find the names of all employees in the database who live in the same cities as the companies for which
they work.
c) Find the names of all employees in the database who live in the same cities and on the same streets as
do their managers.
d) Find the names of all employees in the database who do not work for 'First Bank Corporation'. Assume
that all people work for exactly one company.
e) Find the names of all employees in the database who earn more than every employee of 'Small Bank
Corporation'. Assume that all people work for at most one company.
f) Assume that the companies may be located in several cities. Find all companies located in every city in
which 'Small Bank Corporation' is located.
ASSIGNMENT NO: 2
Semantic Web and RDF, GIS, biological databases
Rajagiri School of Engineering & Technology
44 Department of Information Technology
IT232
Object Oriented
Programming Lab
Rajagiri School of Engineering & Technology
45 Department of Information Technology
IT232: OBJECT ORIENTED PROGRAMMING LAB
COURSE INFORMATION SHEET
PROGRAMME: Information Technology DEGREE: BTECH
COURSE:Object Oriented Programming Lab SEMESTER: 4 CREDITS: 3
COURSE CODE:IT 232REGULATION: 2017 COURSE TYPE: CORE
COURSE AREA/DOMAIN: CONTACT HOURS: 3
hours/Week.
SYLLABUS:
UNIT DETAILS
I Programs Using Functions
a. Functions with default arguments
b. Implementation of Call by Value, Call by Address and Call by Reference
II Simple Classes for understanding objects, member functions and Constructors
a. Classes with primitive data members
b. Classes with arrays as data members
c. Classes with pointers as data members – String Class
d. Classes with constant data members
e. Classes with static member functions
III Compile time Polymorphism
a. Operator Overloading including Unary and Binary Operators.
b. Function Overloading
IV Runtime Polymorphism
a. Inheritance – Simple, Multiple, Multi-level, Hierarchical and Hybrid
b. Virtual functions
c. Virtual Base Classes
V File Handling
a. Sequential access
b. Random access
VI Exception handling
a. exception handling mechanisms
b.specifying exception
TEXT/REFERENCE BOOKS:
T/R BOOK TITLE/AUTHORS/PUBLICATION
R Lafore R., Object Oriented Programming in C++, Galgotia Publications, 2001.
R Schildt H., Teach Yourself C++, Tata McGraw Hill, 2000.
R Hubbard J. R., Schaum‘s Outline of Programming with C++, McGraw Hill, 2000.
R Balagurusamy, Object Oriented Programming with C++, Tata McGraw Hill, 2008.
R Stephen D. R., C. Diggins, J. Turkanis and J. Cogswell, C ++ Cook book, O'Reilly Media,
2013.
R Oualline S., Practical C++ Programming, 2/e, O'Reilly Media, 2002.
R Meyers S., Effective C++, Addison Wesley, 2011. Error Control Coding Fundamentals and
Rajagiri School of Engineering & Technology
46 Department of Information Technology
Applications: Prentice Hall Inc.
COURSE PRE-REQUISITES:
C.CODE COURSE NAME DESCRIPTION SEM
IT204 Introduction to computing and
problem solving
To have an idea of the basic programming
syntax.
S1
COURSE OBJECTIVES:
1 Provide hands-on experience to students in implementing object oriented programming concepts
COURSE OUTCOMES:
Sl.NO DESCRIPTION Blooms’ Taxonomi
Level
1 The students will be able to Design, develop and troubleshoot software
based on object oriented programming methodologies.
Apply
[Level 4]
2 To understand the special features of C++ Programming language Understand
[Level 5]
3 To Analyse existing procedure oriented softwares to object oriented based
ones
Analyse
[level 3]
GAPES IN THE SYLLABUS - TO MEET INDUSTRY/PROFESSION REQUIREMENTS:
SNO DESCRIPTION PROPOSED
ACTIONS
1 Familiarizing different areas where object oriented programming
language can be applied
Home assignments/
Industry visit
2 Implementation issues related to object-oriented techniques Extra labs to be
given/ home
assignments
3 Familiarizing the role of object oriented programming language in
developing system level programs
Seminar
PO
1
PO
2
PO
3
PO
4
PO
5
PO
6
PO
7
PO
8
PO
9
PO
10
PO
11
PO
12
PSO
1
PSO
2
PSO
3
IT204.1 1 - - - - 1 - - - - - - 2 -
IT204.2 - - - - 2 - 1 - - - - - 2 -
IT204.3 - 1 - - - - - - - - - - 1 - -
JUSTIFICATIONS FOR CO-PO MAPPING
MAPPING LOW/MEDIUM/HIG JUSTIFICATION
Rajagiri School of Engineering & Technology
47 Department of Information Technology
H
IT204.1-PO1 H
Apply the knowledge of mathematics, science,
engineering Fundamentals, understand the object oriented
concepts
IT204.1-PO6 H Students apply appropriate techniques, to formulate
object oriented ideas.
IT204.1-
PSO2 M
Students acquire their engineering skills in computing
and information engineering domains to oops programs.
IT204.2-PO5
M
Select appropriate resources, to design simple project
using oops ideas.
IT204.2-PO7 H Understand the impact of the professional engineering
solutions in the use of standard templates.
IT204.2-
PSO2 M
engineering skills in computing and information
engineering domains like object oriented paradigm
IT204.3-PO2 H Analyse complex engineering problems using object oriented
methods.
IT204.3-
PSO1 H
Acquire skills to design polymorphism concepts in object
oriented sides.
PROPOSED ACTIONS: TOPICS BEYOND SYLLABUS/ASSIGNMENT/INDUSTRY
VISIT/GUEST LECTURER/NPTEL ETC
TOPICS BEYOND SYLLABUS/ADVANCED TOPICS/DESIGN:
1 Implementation issues related to object-oriented techniques
2 Understanding structs and apply them in C++ programs.
WEB SOURCE REFERENCES:
1 http://thatchna.weebly.com/uploads/4/1/9/3/4193382/std_c_notes_03.pdf
2 http://www.idiap.ch/~fleuret/files/Francois_Fleuret_-_C++_Lecture_Notes.pdf
3 http://www.bcanotes.com/Info%20About%20C++.html
4 http://www.tutorialspoint.com/java/java_overview.htm
DELIVERY/INSTRUCTIONAL METHODOLOGIES:
CHALK & TALK STUD. ASSIGNMENT WEB RESOURCES
Rajagiri School of Engineering & Technology
48 Department of Information Technology
LCD/SMART BOARDS STUD. SEMINARS ☐ ADD-ON COURSES
ASSESSMENT METHODOLOGIES-DIRECT
ASSIGNMENTS STUD. SEMINARS TESTS/MODEL
EXAMS
UNIV.
EXAMINATION
STUD. LAB
PRACTICES
STUD. VIVA ☐ MINI/MAJOR
PROJECTS
☐ CERTIFICATIONS
☐ ADD-ON
COURSES
☐ OTHERS
ASSESSMENT METHODOLOGIES-INDIRECT
ASSESSMENT OF COURSE OUTCOMES (BY
FEEDBACK, ONCE)
STUDENT FEEDBACK ON FACULTY
(TWICE)
ASSESSMENT OF MINI/MAJOR PROJECTS
BY EXT. EXPERTS
☐ OTHERS
Prepared by Approved by
Mathews Abraham Binu A
(Faculty) (HOD)
Rajagiri School of Engineering & Technology
49 Department of Information Technology
Course plan
Sl no Date Plan
1 7/2/2017 C++ introduction and basics of programing
concepts.
2 14/2/2017 1. Write Program for finding the sum
and average of a Series of N
Numbers.
2. Write a program to check whether a
given number is odd or even.
3. Write a program to check whether a
given number is palindrome or not.
4. Write a program to print Fibonacci
series upto n.
5. Write a program to find the number
of vowels in a String.
3 21/2/2017 1. Write a program to print factorial n
numbers using function with default
arguments.
2. Write a program to sort an array of
integer in ascending order using a
function called exchange ( ) which
accepts two integer arguments by
reference.
3. Write a program to find the sum of
digits of a number. Use two functions
get_input( ) and print_output( ).
4. Write a function that takes two
Distance values as arguments and
returns the larger one includes main(
) program that accepts two Distance
values from the user, compares them
and displays the larger?
Rajagiri School of Engineering & Technology
50 Department of Information Technology
5. Write a program to find the value of a
number raised to its power that
demonstrates a function using call by
value.
6. Write a program to swap two number
by both call by address and call by
reference mechanism, using two
functions swap_value() and
swap_reference respectively , by
getting the choice from the user and
executing the user‘s choice by
switch-case.
4 28/2/2017 1. Create a class called time that has
separate int member data for hours,
minutes and seconds. one constructor
should initialize this data to 0,and
another should initialize it to fixed
values. Another member function
should display it in 11:59:59 format.
The final member function should
add two objects of type time passed
as arguments. A main() program
should create two initialized time
objectsand one that is‘nt initialized.
Then it should add the two initialized
values together,leaving in the third
time variable. Finally it should
display the value of this third
variable. Make appropriate member
functions const
2. Define a class to represent a bank
account, include the following
Rajagiri School of Engineering & Technology
51 Department of Information Technology
members:
Data members
i. Name of the depositor
ii. Account number
iii. Type of account
iv. Balance amount in the
account
Member Functions
i. To assign initial values
ii. To deposit an amount
iii. To withdraw an amount
after checking the
balance.
iv. To display name and
balance.
Write a main program to test the
program.
3. Given that an EMPLOYEE class
contains following data members:
Employee number, Employee name,
Basic, DA, IT, Net Salary. Write a
program to read the data of N
employee and compute Net salary of
each employee (DA=52% of Basic
and Income Tax (IT) =30% of the
gross salary).
5 7/3/2017 4. Create a 'DISTANCE' class with :
feet and inches as data
members
member function to input
distance
member function to output
Rajagiri School of Engineering & Technology
52 Department of Information Technology
distance
member function to add two
distance objects
Write a main function to create
objects of DISTANCE class. Input
two distances and output the sum.
5. Create a class called 'EMPLOYEE'
that has
EMPCODE and EMPNAME
as data members
member function getdata( ) to
input data
member function display( )
to output data
Write a main function to create EMP,
an array of EMPLOYEE objects.
Accept and display the details of at
least 6 employees.
1. Write a program to design a class
complex to represent complex
numbers. The complex class should
use an operator overloaded function
for ‗+‘ operator to add two complex
numbers. The function should return
an object of type complex
representing the sum of two complex
numbers.
6 14/3/2017
2. Write a program to count the number
of persons inside a bank, by
increasing count whenever a person
enters a bank, using an increment
(++) operator overloading function,
Rajagiri School of Engineering & Technology
53 Department of Information Technology
and decrease the count whenever a
person leaves the bank using a
decrement (--) operator overloading
function inside a class.
3. Write a program to implement
function overloading in order to
compute power(m, n) where
i) m is double and n is int
ii) m and n are int.
4. Create a 'MATRIX' class of size m x
n. Overload the ‗+‘ operator to add
two MATRIX objects. Write a main
function to implement it.
7 21/3/2017 1. Create a base class called 'SHAPE'
having
two data members of type double
member function get-data( ) to
initialize base class data members
pure virtual member function
display-area( ) to compute and
display the area of the
geometrical object.
2. Derive two specific classes
'TRIANGLE' and 'RECTANGLE'
from the base class. Using these three
classes design a program that will
accept dimension of a triangle /
rectangle interactively and display
the area.
3. Write a program to design a student
class representing student roll no. and
a test class (derived class of student)
Rajagiri School of Engineering & Technology
54 Department of Information Technology
representing the scores of the student
in various subjects and sports class
represents the score in sports. The
sports and test class should be
inherited bya result class having the
functionality to add the scores and
display the final result fora student.
4. Assume that a bank maintains two
kinds of accounts for customers, one
called as savings account and other as
current account. Create a class
account that stores customer name,
account number and type of account.
From this derive the classes cur_acct
and sav_acct to make them more
specific to their requirements.
Include necessary member functions
to achieve the following tasks.
i. Accept deposit from a
customer and update the
balance.
ii. Display the balance.
iii. Compute and deposit
interest.
5. Permit withdrawal and update
balance
8 28/3/2017 1. Write a program to write text in the
file. Read the text from the file from
end of file. Display the contents of
the file in reverse order.
2. Write a program to copy the contents
of one file to another file.
3. Write a menu driven program to enter
Rajagiri School of Engineering & Technology
55 Department of Information Technology
the details of a student (id, name,
address, age, marks) into a file, to
display records from the file and to
modify records in the file.
4. A data file ―NUM.DAT‖ contains a
set of numbers. Write a program to
select all armstrong numbers, square
the number and place it in a file
called ―ARMS.DAT‖
10 4/4/2017 1. Two integers are taken from
keyboard. Then perform division
operation.
a) A try block to throw an exception
when a wrong type of data is keyed.
b) When division by zero occurs.
write appropriate catch block to
handle the exception thrown.
2. Design stack and queue classes with
necessary exception handling
3. Write
afunction calculateAverage() which
takes four int arguments which are
marks for four courses in the
semester and returns their average as
a
float.The calculateAverage() function
should take only valid range for
marks which is between 0 - 100. If
the marks are out of range throw
an OutOfRangeException
11/4/2017 Class test
Rajagiri School of Engineering & Technology
56 Department of Information Technology
LAB CYCLE
Basic Experiments
1. Write Program for finding the sum and average of a Series of N Numbers.
2. Write a program to check whether a given number is odd or even.
3. Write a program to check whether a given number is palindrome or not.
4. Write aprogram to print Fibonacci seriesupto n.
5. Write a program which identifies twin prime numbers below a given range.
6. Write a program to find the number of vowels in a String.
EXPERIMENT NO : 1
7. Write a program to print factorial n numbers using function with default arguments.
8. Write a program to sort an array of integer in ascending order using a function called
exchange ( ) which accepts two integer arguments by reference.
9. Write a program to find the sum of digits of a number.Use two functions get_input()
and print_output().
10. Write a function that takes two Distance values as arguments and returns the larger
one includes main() program that accepts two Distance values from the user,
compares them and displays the larger?
11. Write a program to find the value of a number raised to its power that demonstrates a
function using call by value.
12. Write a program to swap two number by both call by address and call by reference
mechanism, using two functions swap_value() and swap_reference respectively , by
getting the choice from the user and executing the user‘s choice by switch-case.
EXPERIMENT NO : 2
1. Create a class called time that has separate intmember data for hours,minutes and
seconds. one constructor should initialize this data to 0,and another should initialize it
to fixed values. Another member function should display it in 11:59:59 format. The
final member function should add two objects of type time passed as arguments.A
main() program should create two initialized time objectsand one that is‘nt initialized.
Then it should add the two initialized values together,leaving in the third time
variable. Finally it should display the value of this third variable. Make appropriate
member functions const
Rajagiri School of Engineering & Technology
57 Department of Information Technology
2. Define a class to represent a bank account, include the following members:
Data members
v. Name of the depositor
vi. Account number
vii. Type of account
viii. Balance amount in the account
Member Functions
v. To assign initial values
vi. To deposit an amount
vii. To withdraw an amount after checking the balance.
viii. To display name and balance.
Write a main program to test the program.
3. Given that an EMPLOYEE class contains followingdata members: Employee number,
Employee name, Basic, DA, IT, Net Salary. Write a program to read the data of N
employeeand compute Net salary of each employee (DA=52% of Basic and Income
Tax (IT) =30% of the gross salary).
4. Create a 'DISTANCE' class with :
feet and inches as data members
member function to input distance
member function to output distance
member function to add two distance objects
Write a main function to create objects of DISTANCE class. Input two distances
andoutput the sum.
5. Create a class called 'EMPLOYEE' that has
EMPCODE and EMPNAME as data members
member function getdata( ) to input data
member function display( ) to output data
Write a main function to create EMP, an array of EMPLOYEE objects. Accept
anddisplay the details of at least 6 employees.
6. Write a Program to display names, roll no‘s, and grades of 3students who have
appeared in the examination. Declare the class of name,roll no‘s and grade. Create an
array of class objects. Read and display thecontents of the array.
Rajagiri School of Engineering & Technology
58 Department of Information Technology
EXPERIMENT NO : 3
1. Write a program to design a class complex to representcomplex numbers. The
complex class should use an operator overloaded function for ‗+‘ operator to
add twocomplex numbers. The function should return an object oftype complex
representing the sum of two complex numbers.
2. Write a program to count the number of persons inside a bank, by increasing count
whenever a person enters a bank, using an increment (++) operator overloading
function, and decrease the count whenever a person leaves the bank using a decrement
(--) operator overloading function inside a class.
3. Write a program to implement function overloading in order to compute power(m, n)
where
iii) m is double and n is int
iv) m and n are int.
4. Create a 'MATRIX' class of size m x n. Overload the ‗+‘ operator to add
twoMATRIX objects. Write a main function to implement it.
5. Create a 'STRING' class which overloads ‗ = = ' operator to compare two
STRINGobjects.
EXPERIMENT NO :4
1. Create a base class called 'SHAPE' having
two data members of type double
member function get-data( ) to initialize base class data members
pure virtual member function display-area( ) to compute and display the area ofthe
geometrical object.
2. Derive two specific classes 'TRIANGLE' and 'RECTANGLE' from the base
class.Using these three classes design a program that will accept dimension of a
triangle /rectangle interactively and display the area.
3. Write a program to design a student class representingstudent roll no. and a test class
(derived class of student)representing the scores of the student in various subjectsand
sports class represents the score in sports.The sportsand test class should be inherited
by a result class having thefunctionality to add the scores and display the final result
fora student.
Rajagiri School of Engineering & Technology
59 Department of Information Technology
4. Assume that a bank maintains two kinds of accounts for customers, one called as
savings account and other as current account.Create a class account that stores
customer name,account number and type of account. From this derive the
classescur_acct and sav_acctto make them more specific to their
requirements.Include necessary member functions to achieve the following tasks.
iv. Accept deposit from a customer and update the balance.
v. Display the balance.
vi. Compute and deposit interest.
vii. Permit withdrawal and update balance.
5. Create a base class called 'SHAPE' having - two data members of type double -
member function get-data( ) to initialize base class data members - pure virtual
member function display-area( ) to compute and display the area of the geometrical
object.
EXPERIMENT NO : 5
1. Write a program to write text in the file. Read the text from the file from end of file.
Display the contents of the file in reverse order.
2. Write a program to copy the contents of one file to another file.
3. Write a menu driven program to enter the details of a student (id, name, address, age,
marks) into a file, to display records from the file and to modify records in the file.
4. A data file ―NUM.DAT‖ contains a set of numbers. Write a program to select all
armstrong numbers, square the number and place it in a file called ―ARMS.DAT‖
5. A data file ―TEXT.DAT‖ contains a text. Write a program to read the text and to store
all palindromes to a file called ―PAL.DAT‖ which already contains data.
6. A file contains a list of names and telephone numbers in the following form:
Name :Tel. No.
Write a program to read the file and output the list in the tabular format. Thename
should be left-justified and numbers right-justified. Use a class object to storeeach set
of data.
EXPERIMENT NO : 5
1. Two integers are taken from keyboard. Then perform division operation.
a) A try block to throw an exception when a wrong type of data is keyed.
b) When division by zero occurs.
Rajagiri School of Engineering & Technology
60 Department of Information Technology
write appropriate catch block to handle the exception thrown.
2. Design stack and queue classes with necessary exception handling
3. Write a function calculateAverage() which takes four int arguments which are marks
for four courses in the semester and returns their average as a
float.The calculateAverage() function should take only valid range for marks which is
between 0 - 100. If the marks are out of range throw an OutOfRangeException
Open Questions
1. Write a program to read the file and output the list in the tabular format. The name
should be left-justified and numbers right-justified. Use a class object to store each
set of data.
2. Create a 'STRING' class which overloads ‗ = = ' operator to compare two STRING
objects.
3. A data file ―TEXT.DAT‖ contains a text. Write a program to read the text and to
store all palindromes to a file called ―PAL.DAT‖ which already contains data.
4. Create a base class called 'SHAPE' having - two data members of type double -
member function get-data( ) to initialize base class data members - pure virtual
member function display-area( ) to compute and display the area of the geometrical
object.
Advanced Questions
1. A Bank gives 4% interest on current account and 6% interest on savings account. An
additional 3% interest is provided for savings duration of 5 years and above. Using
dynamicinitialization of constructor write banking program using C++.
2. Create a class called 'TIME' that has
three integer data members for hours, minutes and seconds
constructor to initialize the object to zero
constructor to initialize the object to some constant value
member function to add two TIME objects
member function to display time in HH:MM:SS format
Rajagiri School of Engineering & Technology
61 Department of Information Technology
Write a main function to create two TIME objects, add them and display the result
inHH:MM:SS format.
3. Write a C++ program to create a class called COMPLEX and implement the
following overloading functions ADD that return a COMPLEX number.
a. ADD (a, s2) - where a is an integer (real part) and s2 is a complex number.
b. ADD (s1, s2)-where s1 & s2 are complex numbers.
4. Create a 'MATRIX' class of size m x n. Overload the ‗+‘ operator to add two
MATRIX objects. Write a main function to implement it. Derive a class ‗MAT‘ from
MATRIX. Add a member function to overload ‗*‘ operator to multiply two objects.
(Single Inheritance)
.
5. Write an interactive, menu-driven program that will access the file created in program
No.5 and implement the following tasks:
i. To determine the telephone numbers of the specified person.
ii. To determine the name if a telephone number is given.
iii. To update the telephone number whenever there is a change.
6. Write a program that creates a binary file by reading the data for the students from the
terminal. The data of each student consists of roll no., name (a string of 30 or lesser
no.of characters) and marks
7. Write a C++ program, which initializes a string variable to the content "Time is a
great teacher but unfortunately it kills all its pupils. Berlioz" and outputs the string to
the disk file OUT.TXT. You have to include all the header files if required. Write
separate user-defined functions to do the following
i. Read the content from a text file.
ii. Count and display the number of alphabets present in it
iii. Count the number of blank present in a text file.
iv. Count number of words in a text file.
8. Write a Program to display names, roll no‘s, and grades of 3 students who have
appeared in the examination. Declare the class of name, roll no‘s and grade. Create an
array of class objects. Read and display the contents of the array.
9. A file contains a list of names and telephone numbers in the following form:
Name : Tel. No.
Rajagiri School of Engineering & Technology
62 Department of Information Technology
IT 234
Algorithm Design Lab
Rajagiri School of Engineering & Technology
63 Department of Information Technology
IT 234: Algorithm Design Lab
COURSE INFORMATION SHEET
PROGRAMME: INFORMATION
TECHNOLOGY
DEGREE: BTECH
COURSE: Algorithm Design Lab SEMESTER: VI CREDITS: 1
COURSE CODE: IT234
REGULATION: 2016
COURSE TYPE: CORE
COURSE AREA/DOMAIN: DESIGN AND
ALAYSIS
CONTACT HOURS: 3+1(Tutorial) hours/Week.
CORRESPONDING LAB COURSE CODE (IF
ANY):
SYLLABUS:
UNIT DETAILS HOURS
I
List of Exercises/Experiments : 1. Time Space Trade off implementation
2. Time analysis of different Sorting and Searching Methods.
3. String matching algorithms
4. Graphs traversal using Adjacency List and Adjacency Matrix.
5. Shortest path using Dijikstra‘s algorithm
6. Implement minimum spanning tree algorithms – Prim‘s and Kruskal‘s
7. Dynamic Programming implementation
8. Backtracking method implementation
TEXT/REFERENCE BOOKS:
T/R BOOK TITLE/AUTHORS/PUBLICATION
T
R
R
R
R
Fundamentals of Computer Algorithms – Horowitz and Sahni, Galgotia
Computer Algorithms – Introduction to Design and Analysis – Sara Baase & Allen Van Gelder,
Pearson Education
Data Structures algorithms and applications – Sahni, Tata McGrHill
Foundations of Algorithms – Richard Neapolitan, Kumarss N., DC Hearth & Company
Introduction to algorithm- Thomas Coremen, Charles, Ronald Rivest -PHI
COURSE PRE-REQUISITES:
C.CODE COURSE NAME DESCRIPTION SEM
CS 231 DATA STRUCTURES LAB
Detailed study of different data structures and
algorithms and its implementation
S3
Rajagiri School of Engineering & Technology
64 Department of Information Technology
COURSE OBJECTIVES:
1 To develop an understanding about basic algorithms and different problem solving strategies.
2 To improve creativeness and the confidence to solve non-conventional problems and expertise for
analyzing existing solutions.
COURSE OUTCOMES:
Si.NO DESCRIPTION Blooms’
Taxonomy
Level
C234.1 Identify the problem given and design the algorithm using various algorithm
design techniques.
Design
(level5/6)
C234.2 Implement various algorithms in a high level language. Implement
(level 3)
C234.3 Analyze the performance of various algorithms Understand
and Analyze
(level 4)
C234.4 Compare the performance of different algorithms for same problem. Comparing
(level 3)
CO-PO AND CO-PSO MAPPING
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
C234.1 1 1 1 1 _ _ _ _ _ _ _ _ _ _ _
C234.2 _ _ 3 3 _ _ _ _ _ _ _ _ 3 _ _
C234.3 - _ 1 _ 3 _ _ _ _ _ _ _ 3 _ _
C234.4 2 2 2 _ _ _ _ _ _ _ _ _ _ _ _
C234 2 2 2 2 3 - _ _ _ _ _ _ 3 _ _
GAPS IN THE SYLLABUS - TO MEET INDUSTRY/PROFESSION REQUIREMENTS:
Si
NO
DESCRIPTION PROPOSED
ACTIONS
RELEVANCE
WITH POs
RELEVANCE
WITH PSOs
1 Encourage students to do open and advanced
questions based on the syllabus
ASSIGNMENTS 3,12 1
PROPOSED ACTIONS: TOPICS BEYOND SYLLABUS/ASSIGNMENT/INDUSTRY VISIT/GUEST
LECTURER/NPTEL ETC
TOPICS BEYOND SYLLABUS/ADVANCED TOPICS/DESIGN:
Si
NO
DESCRIPTION PROPOSED
ACTIONS
RELEVANCE
WITH POs
RELEVANCE
WITH PSOs
1 Graph Traversals – Connected
Components
Assignments 1,2,3 -
WEB SOURCE REFERENCES:
Rajagiri School of Engineering & Technology
65 Department of Information Technology
1 https://www.cs.duke.edu/courses/fall08/cps230/Book.pdf
2 http://www.cse.iitd.ernet.in/~ssen/csl356/root.pdf
3 http://www.imsc.res.in/~vraman/pub/intro_notes.pdf
4 http://www.ics.uci.edu/~goodrich/teach/cs161/notes/
5 http://elearning.vtu.ac.in/06CS43.html
DELIVERY/INSTRUCTIONAL METHODOLOGIES:
CHALK & TALK STUD.
ASSIGNMENT
WEB
RESOURCES
LCD/SMART
BOARDS
STUD.
SEMINARS
☐ ADD-ON COURSES
ASSESSMENT METHODOLOGIES-DIRECT
ASSIGNMEN
TS
STUD.
SEMINARS
TESTS/MODEL
EXAMS
UNIV.
EXAMINATIO
N
STUD. LAB
PRACTICES
STUD. VIVA ☐ MINI/MAJOR
PROJECTS
☐ CERTIFICATIONS
☐ ADD-ON
COURSES
☐ OTHERS
ASSESSMENT METHODOLOGIES-INDIRECT
ASSESSMENT OF COURSE OUTCOMES
(BY FEEDBACK, ONCE)
STUDENT FEEDBACK ON FACULTY
(TWICE)
☐ ASSESSMENT OF MINI/MAJOR
PROJECTS BY EXT. EXPERTS
☐ OTHERS
Prepared by Approvedby
Nikhila T Bhuvan BINU A, HoD
Rajagiri School of Engineering & Technology
66 Department of Information Technology
Course plan 2016-17(jan-june)
SI.# Week Week wise plan
1 Week 1
Time Space Trade off Implementation
2 Week 2,3 and 4
Time analysis of different sorting and searching methods
3 Week 5
Implement Minimum Spanning Tree algorithm – Prim‘s
and Kruskal‘s(Greedy methodology)
4 Week 6:
Backtracking method implementation
5 Week 7
Dynamic Programming Implementation
6 Week 8
Graph traversals using adjacency list and adjacency matrix
7 Week 9
String matching algorithms
Rajagiri School of Engineering & Technology
67 Department of Information Technology
LAB CYCLE (2015- 19 BATCH)
Week 1:
1. Time Space Trade off Implementation
a. Let S be an integer array of n elements perform two operations
remove(i)-I is removed from S
next(i)- returns the next larger element j, where j>i, jε S, if such j exists.
Implement the same using linked list.
b. Make observations on the two methods and comment on time-space tradeoff.
Week 2,3 and 4:
2. Time analysis of different sorting and searching methods
a. Sorting time calculation for bubble sort, insertion sort, selection sort, quick sort
b. Perform time analysis on three different cases of input (i) random order (ii) Ascending
and (iii) Descending numbers. Draw graphs for sorting techniques in terms of input size
versus time.
c. Searching time calculation for linear search, binary search and interpolation search
d. Perform time analysis for different input sizes on the searching algorithms. Draw
graphs for sorting techniques in terms of input size versus time.
Note:
Program to be executed for various sizes of input.
Table to be filled with data
Size: n
Random Order
Time taken
Ascending
Time taken
Descending
Time taken
4
8
16
32
Rajagiri School of Engineering & Technology
68 Department of Information Technology
Week 5:
3. Implement Minimum Spanning Tree algorithm – Prim’s and Kruskal’s(Greedy
methodology)
a. Implement MST using Kruskal‘s or Prims algorithm(half of the students will do
Prim‘s and the rest will do Kruskal‘s)
Week 6:
4. Backtracking method implementation
a. Implement N Queens problem
Week 7:
5. Dynamic Programming Implementation
Find shortest path between source and destination using Dijikstra‘s algorithm
.
Week 8:
6. Graph traversals using adjacency list and adjacency matrix
a. Find connected component in a graph
b. Perform topological sorting in the graph.
Week 9:
7. String matching algorithms
a. Implement Rabin Karp‘s algorithm compare it with trivial string matching algorithm
Rajagiri School of Engineering & Technology
69 Department of Information Technology
Advanced Questions
1. Use divide and conquer method to recursively implement and to find the maximum
and minimum in a given list of n elements.
#include <stdio.h>
#include <stdlib.h>
void fnRecMaxMin(int [], int , int, int*, int*);
int main( int argc, char **argv)
{
int iaArr[500000],iNum,i;
int iMax=0,iMin=0;
printf("\nEnter the size of the array\n");
scanf("%d",&iNum);
printf("\nEnter the elements of the array:\n");
for(i=0;i<iNum;i++)
scanf("%d",&iaArr[i]);
fnRecMaxMin(iaArr, 0, iNum-1, &iMax, &iMin);
printf("\nMax Element = %d\nMin Element = %d\n", iMax, iMin);
return 0;
}
void fnRecMaxMin(int a[],int low,int high, int *max, int *min)
{
int mid,max1,max2,min1,min2;
if(high-low == 1)
{
if(a[low] > a[high])
{
*max = a[low];
*min = a[high];
}
else
{
*max = a[high];
*min = a[low];
}
}
else if(low == high)
{
*min = *max = a[low];
}
else if(low<high)
{
mid=(low+high)/2;
fnRecMaxMin(a,low,mid,&max1,&min1);
fnRecMaxMin(a,mid+1,high,&max2,&min2);
if(max1 > max2)
*max = max1;
else
*max = max2;
if(min1 < min2)
*min = min1;
Rajagiri School of Engineering & Technology
70 Department of Information Technology
else
*min = min2;
}
}
OUTPUT
SAMPLE 1
Enter the size of the array
6
Enter the elements of the array:
7 2 3 6 5 4
Max Element = 7
Min Element = 2
SAMPLE 2
Enter the size of the array
7
Enter the elements of the array:
7 1 2 6 5 3 4
Max Element = 7
Min Element = 1
SAMPLE 3
Enter the size of the array
7
Enter the elements of the array:
1 3 5 7 2 4 6
Max Element = 7
Min Element = 1
Q 2. Implement 0/1 Knapsack problem using dynamic programming.
#include <iostream>
#include <cstdlib>
using namespace std;
const int MAX = 10;
inline int max(int a, int b);
void fnProfitTable(int w[MAX], int p[MAX], int n, int c, int t[MAX][MAX]);
void fnSelectItems(int n,int c, int t[MAX][MAX], int w[MAX], int l[MAX]);
int main(void)
{
int i, j, totalProfit;
int weight[MAX];
int profit[MAX];
int capacity;
int num;
int loaded[MAX];
int table[MAX][MAX];
cout << "Enter the maxium number of objects : ";
cin >> num;
cout << "Enter the weights : \n";
for (i=1; i<=num; i++)
{
Rajagiri School of Engineering & Technology
71 Department of Information Technology
cout << "\nWeight " << i << ": ";
cin >> weight[i];
}
cout << "\nEnter the profits : \n";
for (i=1; i<=num; i++)
{
cout << "\nProfit " << i << ": ";
cin >> profit[i];
}
cout << "\nEnter the maximum capacity : ";
cin >> capacity;
totalProfit = 0;
for( i=1; i<=num; i++)
loaded[i] = 0;
fnProfitTable(weight,profit,num,capacity,table);
fnSelectItems(num,capacity,table,weight,loaded);
cout << "Profit Matrix\n";
for (i=0; i<=num; i++)
{
for(j=0; j<=capacity; j++)
{
cout <<"\t"<<table[i][j];
}
cout << endl;
}
cout << "\nItem numbers which are loaded : \n{ ";
for (i=1; i<=num; i++)
{
if (loaded[i])
{
cout << i << " ";
totalProfit += profit[i];
}
}
cout << "}" << endl;
cout << "\nTotal Profit : " << totalProfit << endl;
return 0;
}
inline int max(int a, int b)
{
return a>b ? a : b;
}
void fnProfitTable(int w[MAX], int p[MAX], int n, int c, int t[MAX][MAX])
{
int i,j;
for (j=0; j<=c; j++)
t[0][j] = 0;
for (i=0; i<=n; i++)
t[i][0] = 0;
Rajagiri School of Engineering & Technology
72 Department of Information Technology
for (i=1; i<=n; i++)
{
for (j=1; j<=c; j++)
{
if (j-w[i] < 0)
t[i][j] = t[i-1][j];
else
t[i][j] = max( t[i-1][j], p[i] + t[i-1][j-w[i]]);
}
}
}
void fnSelectItems(int n,int c, int t[MAX][MAX], int w[MAX], int l[MAX])
{
int i,j;
i = n;
j = c;
while (i >= 1 && j >= 1)
{
if (t[i][j] != t[i-1][j])
{
l[i] = 1;
j = j - w[i];
i--;
}
else
i--;
}
}
OUTPUT
Enter the maxium number of objects : 4
Enter the weights :
Weight 1: 2
Weight 2: 1
Weight 3: 3
Weight 4: 2
Enter the profits :
Profit 1: 12
Profit 2: 10
Profit 3: 20
Profit 4: 15
Enter the maximum capacity : 5
Profit Matrix
0 0 0 0 0 0
0 0 12 12 12 12
0 10 12 22 22 22
0 10 12 22 30 32
0 10 15 25 30 37
Item numbers which are loaded :
{ 1 2 4 }
Total Profit : 37
Rajagiri School of Engineering & Technology
73 Department of Information Technology
Q3. Find a subset of a given set S = {s1,s2,.....,sn} of n positive integers whose sum is
equal to a given positive integer d. For example, if S= {1, 2, 5, 6, 8} and d = 9 there are
two solutions{1,2,6}and{1,8}.A suitable message is to be displayed if the given problem
instance doesn't have a solution.
#include <iostream>
using namespace std;
// Constant definitions
const int MAX = 100;
// class definitions
class SubSet
{
int stk[MAX], set[MAX];
int size, top, count;
public:
SubSet()
{
top = -1;
count = 0;
}
void getInfo(void);
void push(int data);
void pop(void);
void display(void);
int fnFindSubset(int pos, int sum);
};
void SubSet :: getInfo(void)
{
int i;
cout << "Enter the maximum number of elements : ";
cin >> size;
cout << "Enter the weights of the elements : \n";
for (i=1; i<=size; i++)
cin >> set[i];
}
void SubSet :: push(int data)
{
stk[++top] = data;
}
void SubSet :: pop(void)
{
top--;
}
void SubSet :: display()
{
int i;
cout << "\nSOLUTION #"<< ++count <<" IS\n{ ";
for (i=0; i<=top; i++)
cout << stk[i] << " ";
cout << "}" << endl;
}
Rajagiri School of Engineering & Technology
74 Department of Information Technology
int SubSet :: fnFindSubset(int pos, int sum)
{
int i;
static int foundSoln = 0;
if (sum>0)
{
for (i=pos; i<=size; i++)
{
push(set[i]);
fnFindSubset(i+1, sum - set[i]);
pop();
}
}
if (sum == 0)
{
display();
foundSoln = 1;
}
return foundSoln;
}
int main(void)
{
int i,sum;
SubSet set1;
set1.getInfo();
cout << "Enter the total required weight : ";
cin >> sum;
cout << endl;
if (!set1.fnFindSubset(1, sum))
cout << "\n\nThe given problem instance doesnt have any solution."
<< endl;
else
cout << "\n\nThe above-mentioned sets are the required solution to
the given instance." << endl;
return 0;
}
OUTPUT
SAMPLE 1
Enter the maximum number of elements : 5
Enter the weights of the elements :
1 2 3 4 5
Enter the total required weight : 5
SOLUTION #1 IS
{ 1 4 }
SOLUTION #2 IS
{ 2 3 }
SOLUTION #3 IS
{ 5 }
The above-mentioned sets are the required solution to the given instance.
SAMPLE 2
Rajagiri School of Engineering & Technology
75 Department of Information Technology
Enter the maximum number of elements : 4
Enter the weights of the elements :
1 2 3 4
Enter the total required weight : 11
The given problem instance doesn‘t have any solution.