Sunday 18 September 2016

DATA STRUCTURES

Data Structures Lab (DSL)

Second Year (Sem 1 Practical Program Set)

(According to 2016 New Syllabus)

Download The file from here (G Drive)

File Contains : Following University Questions :

(UPDATED)

1

In Second year Computer Engineering class of M students, set A of students play cricket and set B of students play badminton. Write C/C++ program to find and displayi. Set of students who play either cricket or badminton or both ii. Set of students who play both cricket and badminton iii. Set of students who play only cricket iv. Set of students who play only badminton v. Number of students who play neither cricket nor badminton (Note- While realizing the set duplicate entries are to avoided)

2

Write C/C++ program for storing matrix. Write functions for
a) Check whether given matrix is upper triangular or not
b) Compute summation of diagonal elements
c) Compute transpose of matrix
d) Add, subtract and multiply two matrices
DOWNLOAD THIS PROGRAM

3

An m x n matrix is said to have a saddle point if some entry a[i][j] is the smallest value in row i and the largest value in j. Write C/ C++ function that determines the location of a saddle point if one exists
DOWNLOAD THIS PROGRAM

4

Write C++ program to store set of negative and positive numbers using linked list. Write functions to a) Insert numbers
 b) Delete nodes with negative numbers 
c) Create two more linked lists using this list, one containing all positive numbers and other containing negative numbers
 d) For two lists that are sorted; Merge these two lists into third resultant list that is sorted
DOWNLOAD THIS PROGRAM

5

Write C++ program for string operations- copy, concatenate, check substring, equal, reverse and length
DOWNLOAD THIS PROGRAM

6

Department of Computer Engineering has student's club named 'Pinnacle Club'. Students of Second, third and final year of department can be granted membership on request. Similarly one may cancel the membership of club. First node is reserved for president of club and last node is reserved for secretary of club. Write C++ program to maintain club member‘s information using singly linked list. Store student PRN and Name. Write functions to 
a) Add and delete the members as well as president or even secretary.
 b) Compute total number of members of club
 c) Display members 
d) Display list in reverse order using recursion 
e) Two linked lists exists for two divisions. Concatenate two lists.
DOWNLOAD THIS PROGRAM

7

Second year Computer Engineering class, set A of students like Vanilla Ice-cream and set B of students like butterscotch ice-cream. Write C/C++ program to store two sets using linked list. compute and displayi. Set of students who like either vanilla or butterscotch or both ii. Set of students who like both vanilla and butterscotch iii. Set of students who like only vanilla not butterscotch iv. Set of students who like only butterscotch not vanilla v. Number of students who like neither vanilla nor butterscotch
DOWNLOAD THIS PROGRAM


8


In any language program mostly syntax error occurs due to unbalancing delimiter such as (),{},[].  Write C++ program using stack to check whether given expression is well parenthesized or not

DOWNLOAD THIS PROGRAM
9

Write C++ program to store roll numbers of student in array who attended training program
 in random order. Write function for-
a) Searching whether particular student attended training program or not using linear search
 and sentinel search.
b) Searching whether particular student attended training program or  not using binary search and Fibonacci search.

DOWNLOAD THIS PROGRAM(Only Fibonacci Search)


10

Pizza parlor accepting maximum M orders. Orders are served in first come first served basis. Order once placed cannot be cancelled. Write C++ program to simulate the system using circular queue using array. 
DOWNLOAD THIS PROGRAM

11

Write C++ program to store first year percentage of students in array. Sort array of floating point numbers in ascending order using quick sort and display top five scores.
DOWNLOAD THIS PROGRAM
.
.
.
.....Wait for remaining Progs ;)
































Thursday 15 September 2016

Object oriented programming

               

Subject:  OOP (Object Oriented Programming) Programs

Second Year (Sem 1 Practical Program Set)

(According to 2016 New Syllabus)

Download The file from here (G Drive)

File Contains : Following University Questions :

1. Implement a class Complex which represents the Complex Number data type. Implement the
following operations:
1. Constructor (including a default constructor which creates the complex number 0+0i).
2. Overloaded operator+ to add two complex numbers.
3. Overloaded operator* to multiply two complex numbers.
4. Overloaded << and >> to print and read Complex Numbers.Download This Program


2. Write a C++ program create a calculator for an arithmetic operator (+, -, *, /). The program
should take two operands from user and performs the operation on those two operands
depending upon the operator entered by user. Use a switch statement to select the operation.
Finally, display the result.
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    


3.Develop an object oriented program in C++ to create a database of student information
system containing the following information: Name, Roll number, Class, division, Date of
Birth, Blood group, Contact address, telephone number, driving license no. etc Construct the
database with suitable member functions for initializing and destroying the data viz
constructor, default constructor, Copy constructor, destructor, static member functions, friend
class, this pointer, inline code and dynamic memory allocation operators-new and delete.







5A book shop maintains the inventory of books that are being sold at the shop. The list includes

details such as author, title, price, publisher and stock position. Whenever a customer wants a
book, the sales person inputs the title and author and the system searches the list and displays
whether it is available or not. If it is not, an appropriate message is displayed. If it is, then the
system displays the book details and requests for the number of copies required. If the
requested copies book details and requests for the number of copies required. If the requeste
copies are available, the total cost of the requested copies is displayed; otherwise the message
―Required copies not in stock‖ is displayed. Design a system using a class called books with
suitable member functions and Constructors. Use new operator in constructors to allocate
memory space required. Implement C++ program for the system.





6.Create employee bio-data using following classes i) Personal record ii))Professional record iii)
Academic record Assume appropriate data members and member function to accept required
data & print bio-data. Create bio-data using multiple inheritance using C++.



7.Crete User defined exception to check the following conditions and throw the exception if the

criterion does not meet.
a. User has age between 18 and 55
b. User stays has income between Rs. 50,000 – Rs. 1,00,000 per month
c. User stays in Pune/ Mumbai/ Bangalore / Chennai
d. User has 4-wheeler
Accept age, Income, City, Vehicle from the user and check for the conditions mentioned
above. If any of the condition not met then throw the exception.



8.
Write a menu driven program that will create a data file containing the list of telephone
numbers in the following form
John 23456
Ahmed 9876
........... .........
Use a class object to store each set of data, access the file created and implement the following
tasks
I. Determine the telephone number of specified perso
II. Determine the name if telephone number is known
III. Update the telephone number, whenever there is a change.



9. Write a C++ program that creates an output file, writes information to it, closes the file and

open it again as an input file and read the information from the file.



10.Write a function template selection Sort. Write a program that inputs, sorts and outputs an

integer array and a float array.


11.Write C++ program using STL for implementation of Singly, doubly and circular linked list.


12. Write C++ program using STL for implementation of stack & queue using SLL


13. Write C++ program using STL to add binary numbers (assume one bit as one number); use

STL stack.     
14. Write C++ program using STL for Dqueue (Double ended queue)  
15.
Write C++ program using STL for Sorting and searching with user-defined records such as
Person Record (Name, birth date, telephone no), item record (item code, item name, quantity
and cost)