We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Q1.
When and why we need to define a custom member
wise constructor?
Q2. A software company is building an application to manage a
library system.a system should supports multiple types of users and resources.as a senior software architect construct a UML class diagram.
Q3. Explain how polymorphism affects object installation
Q4. How does constructor delegation improve code efficiency in
class hierarchies
Q5. Describe a scenario where a protected member in a class
would be more suitable than a private member
Q6. Describe a scenario where a protected member in a class
would be more suitable than a private member
Q7. Explain the purpose of pure virtual functions
Q8. Can constructor be inherited
Q9. What would you create a custom exception class?
Q10. What is the purpose of STD:: exception class?
Q11. Bank Account Management System Create a C++ program to manage bank accounts using classes and inheritance. Implement classes for different types of accounts (e.g., savings, current) and provide functions to deposit, withdraw, and check balance. Add exception handling for invalid transactions.
Q12. Polynomial Arithmetic Using Operator Overloading
Create a Polynomial class that represents a polynomial expression. Overload operators to add, subtract, and multiply polynomials. Include a function to evaluate the polynomial for a given value of x.
Q13. Car Showroom System Using Virtual Functions
Create a Car class with virtual functions for attributes like model, price, and mileage. Use derived classes for different types of cars (e.g., sedan, SUV, hatchback). Implement functions to display the details of each car type, and a function to sort cars by price.
Q14. Queue-Based Ticket Reservation System
Design a ticket reservation system using a queue to manage people waiting for tickets. Implement functions to add a person to the queue, serve the next person, and display the current queue. Use exception handling to manage an empty queue. Q15. Write a C++ program to evaluate a postfix arithmetic expression using a stack. Implement functions to push and pop operands, apply operators, and display the final result. Include error handling for invalid expressions.
Q16. Undo-Redo Functionality Using Two Stacks
Implement an undo-redo system using two stacks. One stack keeps track of actions for undo, and the other stack is used for redo. Provide functions to perform an action, undo the last action, redo an action, and display the current state.
Q17. Stack-Based Infix to Prefix Conversion
Write a program that converts an infix arithmetic expression to prefix notation using a stack. Implement functions to handle operator precedence, push/pop operators, and display the final prefix expression.
Q18. Priority Queue for Task Scheduler
Build a task scheduler using a priority queue where each task has a priority level and execution time. Provide functions to add tasks, retrieve the highest-priority task, complete a task, and display all pending tasks in order of priority. Q19. Doubly Linked List for Recently Played Songs Create a music player system that keeps track of recently played songs using a doubly linked list. Each node should store song information, and provide functions to add a song to the list, delete a song, go to the previous/next song, and display the playlist in order.
Q20. Circular Linked List for Car Race Simulation
Simulate a car race where each car is represented by a node in a circular linked list. Implement functions to simulate each car's lap completion, display the lap status, remove a car from the race if it crashes, and determine the winner based on completed laps.
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More