M24-CAP-106 Practical -2
Part A – Introduction | |||
Name of the Programme | MCA | ||
Semester | Ist | ||
Name of the Course | Practical-2 | ||
Course Code | M24-CAP-106 | ||
Course Type | PC-2 | ||
Level of the course | 400-499 | ||
Pre-requisite for the course (if any) | |||
Course objectives | This is a laboratory course and the objective of this course is to acquaint the students with the understanding and implementation of various data structures. Also, the students will implement the concepts of programming with Java. | ||
Course Learning Outcomes (CLO)
After completing this course, the learner will be able to: |
CLO 1: Solve practical problems related to theory courses undertaken in the CC-3 and CC-4 from an application point of view.
CLO 2: Know how to use and implement the various data structures. CLO 3: Implement the various features of Java Programming by writing suitable programs. CLO 4: Designing and implementing applications in Java. |
||
Credits | Theory | Practical | Total |
0 | 4 | 4 | |
Teaching Hours per week | 0 | 8 | 8 |
Internal Assessment Marks | 0 | 30 | 30 |
End Term Exam Marks | 0 | 70 | 70 |
Max. Marks | 0 | 100 | 100 |
Examination Time | 0 | 4 hours | |
Part B- Contents of the Course | |||
Practicals | Contact Hours | ||
Practical course will consist of two components Part-A and Part-B. The examiner will set 5 questions at the time of practical examination asking 2 questions from the Part-A and 3 questions from the Part-B by taking course learning outcomes (CLO) into consideration. The examinee will be required to solve one problem from the Part-A and to write and execute 2 questions from the Part-B. | 120 | ||
Part-A
Task 1: Linked List Implementation • Implement a singly linked list in a programming language of your choice (e.g., C/C++, Java, Python). • Include functions/methods for insertion (at the beginning, end, and specific position), deletion, and traversal. Task 2: Stack Operations • Implement a stack using an array or linked list. • Include functions/methods for push, pop, peek, and checking if the stack is empty or full. Task 3: Queue Implementation • Implement a queue using an array or linked list. • Include functions/methods for enqueue, dequeue, peek, and checking if the queue is empty or full. Task 4: Binary Search Tree (BST) Operations • Implement a binary search tree (BST) in your chosen programming language. • Include functions/methods for insertion, deletion, searching for a key, finding minimum and maximum values, and traversing the tree (inorder, preorder, postorder). Task 6: Sorting Algorithms • Implement at least two sorting and searching algorithms (e.g., selection sort, insertion sort, merge sort, quick sort). • Compare their time complexity and performance using different input sizes. |
60 |
Task 7: Graph Representation and Algorithms
• Implement an adjacency list representation of a graph. • Include functions/methods for BFS (Breadth-First Search) and DFS (Depth-First Search) traversal of the graph. |
|||
Part-B
1) Write a Java program that converts temperatures between Celsius and Fahrenheit based on user input using methods for conversion and input validation. 2) Implement a Java program to perform matrix addition, multiplication, and transpose operations using arrays and methods. 3) Develop a Java program that converts a decimal number to its binary, octal, and hexadecimal equivalents using loops and methods. 4) Create a Java program to simulate a simple bank account management system with features like deposit, withdrawal, and balance inquiry using classes, objects, and encapsulation. 5) Write a Java program that reads a text file, counts the occurrences of each word, and displays the top N most frequent words using HashMap for storage and sorting. 6) Implement a Java program to generate the first N prime numbers using a combination of loops, methods, and optimizations like the Sieve of Eratosthenes algorithm. 7) Develop a Java program that takes a month and year as input and prints the calendar for that month using control flow statements and loops for date calculation. 8) Write a Java program that generates different number patterns like pyramid patterns using nested loops and methods for pattern printing. 9) Create a Java program to manage an employee payroll system with features for adding employees, calculating salaries based on hours worked or monthly salary, and generating pay slips using classes, inheritance, and polymorphism. 10) Implement Java programs to compare the performance of different sorting algorithms (like quicksort, mergesort, and heapsort) on large arrays of integers, measuring and analyzing time complexity. 11) Develop a Java program that recursively searches a directory for files matching a given pattern and displays the file paths using recursion and file handling classes. 12) Write a Java program to perform arithmetic operations (addition, subtraction, multiplication, division) on large numbers using BigInteger class and exception handling for division by zero. 13) Implement a Java program to solve the Tower of Hanoi problem for N disks using recursion, demonstrating the steps and movements required. 14) Write a Java program to find the largest and smallest elements in an array. 15) Implement a Java program to sort an array of integers using bubble sort. 16) Create a Java program to find the frequency of each element in an array. 17) Develop a Java program to reverse an array without using an additional array. 18) Write a Java program to merge two sorted arrays into a single sorted array. 19) Define a Java class representing a Student with private instance variables and public getter and setter methods. 20) Create a Java program to demonstrate constructor overloading in a class. 21) Implement a Java program to calculate the area and perimeter of a rectangle using a class and object. 22) Develop a Java program to implement inheritance by creating a base class Animal and derived classes like Dog and Cat. 23) Write a Java program to demonstrate method overriding by implementing a base class Shape and derived classes like Circle and Rectangle. |
60
(Lab hours include instructions for writing programs and demonstration by a teacher and for running the programs on computer by students.) |
||
Suggested Evaluation Methods | |||
Internal Assessment: 30 | End Term Examination: 70 | ||
➢ Practicum | 30 | ➢ Practicum | 70 |
• Class Participation: | 5 | Lab record, Viva-Voce, write-up and execution of the programs | |
• Seminar/Demonstration/Viva-voce/Lab records etc.: | 10 | ||
• Mid-Term Examination: | 15 | ||
Part C-Learning Resources |
Recommended Books/e-resources/LMS:
- Horowitz, , & Sahni, S. (2004). Fundamentals of Data Structures. Galgotia Book Source Pvt. Ltd.
- Samanta, (2012). Classic Data Structures (2nd ed.). Prentice-Hall of India Pvt. Ltd., India.
- Kruse, , Tondo, C. L., & Leung, B. (2007). Data Structures and Program Design in C (2nd ed.). Prentice-Hall of India Pvt. Ltd.
- Weiss, A. (2006). Data Structures and Algorithm Analysis in C (2nd ed.). Pearson Education.
- Balaguruswamy, (2009). Programming with JAVA: A Primer. Tata McGraw Hill.
- Naughton, , & Schildt, H. (2002). The Complete Reference Java 2. Tata McGraw Hill.
- Neimeyer, , & Peck, J. (1996). Exploring Java. O’Reilly.
- Hahn, (1996). Teach Yourself the Internet. Prentice-Hall of India (P.H.I.).
- Boone, , & Stanek, W. (2001). Java 2 Exam Guide. Tata McGraw Hill.