0 penilaian0% menganggap dokumen ini bermanfaat (0 suara)
2K tayangan6 halaman
This document contains 31 programming assignments related to data structures and object-oriented programming in C++. The assignments cover topics like classes, structures, arrays, linked lists, stacks, queues, trees, and sorting algorithms. Students are asked to write C++ programs that implement common data structures and algorithms and demonstrate their use through examples.
This document contains 31 programming assignments related to data structures and object-oriented programming in C++. The assignments cover topics like classes, structures, arrays, linked lists, stacks, queues, trees, and sorting algorithms. Students are asked to write C++ programs that implement common data structures and algorithms and demonstrate their use through examples.
This document contains 31 programming assignments related to data structures and object-oriented programming in C++. The assignments cover topics like classes, structures, arrays, linked lists, stacks, queues, trees, and sorting algorithms. Students are asked to write C++ programs that implement common data structures and algorithms and demonstrate their use through examples.
THIRD SEMESTER B.E.-ELECTRONICS AND COMMUNICATION ENGINEERING EC6312: OOPS AND DATA STRUCTURES LABORATORY
Time:3 Hours Maximum Marks:100
1. Create a class Date for dates consisting of a month, day and year. Write a member function that allows the user operator+() - Add two dates. operator++() Increment date by one. Test the program with a appropriate main() function.
2. Create a Cake structure. Include two public fields that contain the price of the Cake and the CalorieCount of the Cake. Write a main( ) function that declares a Cake object. Prompt the user for field values. Echo the values, and then display the cost per calorie.
3. Create two classes. The first holds customer data-specifically, a customer number and zip code. The second, a class for cities, holds the city name, state, and zip code. Additionally, each class contains a constructor that takes parameters to set the field values. Create a friend function that displays a customer and the customers city, state, and zip code. Write a brief main( ) function to test the classes and friend function.
4. A CollegeCourse class includes fields representing department, course number, credit hours, and tuition. Its child, Labcourse, includes one more field that holds a lab fee charged in addition to the tuition. Create appropriate functions for these classes, and write a main () function that instantiates and uses object of each class.
5. Write a C++program to copy one text file into another text file in which the lines are numbered 1,2,3,with a number at the left of each line.
6. Write a C++program to implement a ArrayList ADT using array with the following member functions: ArrayList(), Empty() , Insert(), Erase() and Traverse().
7. Write a C++program to implement a ArrayList ADT using array with the following member function copy constructor, destructor, Insert(), Operator=(assign one list to another).
8. Create an ordered linked list in C++ using cursor based implementation with the following member function Constructor, Empty () , Insert(), Erase () and Traverse ().
9. Write a C++ program to implement a LinkedList ADT using linked list with the following member function Constructor, Insert() , Count() and Traverse ().
10. Write a C++ program to implement a LinkedList ADT using linked list with the following member function LinkedList(), Insert() , Search() and Traverse() - display the list in both the directions (i.e. left to right and right to left).
11. Write a C++ program to implement a LinkedList ADT using linked list with the following member function LinkedList(), Insert() , FindMin (), and Traverse().
12. Write a C++program to convert a number from base ten to base two using array based stack ADT.
13. Implement ArrayStack ADT class with the following operations IsEmpty(), Push(), Pop(), Top() and Display() using arrays.
14. Implement a LinkedStack ADT class with the following operations IsEmpty(), Push(), Pop(), Top() and Display() using linked list.
15. Implement a ArrayStack ADT class using arrays with the following operations Push(), Pop(), Display() and operator=() - assign one stack to another.
16. Implement a ArrayStack ADT class using arrays with the following operations Push(), Pop(), Display() and Bottom() - a friend function that returns the bottom element.
17. Create and Use ArrayStack ADT class, to evaluate a prefix expression.
18. Create and Use ArrayStack ADT class, to transform from prefix to postfix.
19. Write a C++code, to implement a LinkedStack ADT using linked list, with the following operations push(), pop(), reverse() and display().
20. Write a C++code, to implement a LinkedStack ADT using linked list, with the following operations push(), pop(), display() and clear() - empties the stack.
21. Write a C++code, to implement a LinkedStack ADT using linked list, with the following operations Push(), Operator-+=() Pop the contents of the Stack() and Display().
22. Write a C++code, to implement ArrayQueue ADT using arrays with the following operations ArrayQueue(), Enqueue(), Dequeue(), Front(), Back() and Display().
23. Write a C++code, to implement ArrayQueue ADT using arrays with the following operations ArrayQueue(),Enqueue (),Dequeue (), Size() and Display().
24. Write a C++code, to implement ArrayQueue ADT using arrays with the following operations ArrayQueue(),Enqueue (),Dequeue (), Operator=() -copies the contents of one queue to another.
25. Write a C++template functions to add and delete elements from Dequeue. (Dequeue - double ended Queue, a linear list in which additions and deletions may be made at either end).
26. Write a C++code to implement a priority queue with the following operations: enqueue() insert an element. Dequeue() delete an element with minimum value (lower priority). Display().
27. Write a BinarySearchTree class with the following operations create(), empty(), search() and inorder()-performs inorder traversal.
28. Write a BinarySearchTree class with the following operations Create(), Search() and Postorder()-performs the postorder traversal.
29. Write a BinarySearchTree class with the following operations Create(), Search(), Level Traversal Traverse the Binary Search Tree by level order.
30. Sort the following elements using Quicksort() E,A,F,D,C,B.
31. Sort the following elements using Quicksort() ball, Egg, apple, fox doll.
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More