This document contains a table of content listing 10 programming assignments with their dates and remarks. The assignments cover topics like swapping integers without a third variable, defining member functions outside a class, using friend functions to find the greater of two numbers, creating abstract and derived classes to print volumes of shapes, implementing pure virtual functions in derived stack and queue classes, defining function templates, designing a bank account class with methods to deposit, withdraw and display balance, creating a rodent inheritance hierarchy with overridden base class methods, using try-catch blocks to handle exceptions, and raising an index out of bounds exception.
This document contains a table of content listing 10 programming assignments with their dates and remarks. The assignments cover topics like swapping integers without a third variable, defining member functions outside a class, using friend functions to find the greater of two numbers, creating abstract and derived classes to print volumes of shapes, implementing pure virtual functions in derived stack and queue classes, defining function templates, designing a bank account class with methods to deposit, withdraw and display balance, creating a rodent inheritance hierarchy with overridden base class methods, using try-catch blocks to handle exceptions, and raising an index out of bounds exception.
This document contains a table of content listing 10 programming assignments with their dates and remarks. The assignments cover topics like swapping integers without a third variable, defining member functions outside a class, using friend functions to find the greater of two numbers, creating abstract and derived classes to print volumes of shapes, implementing pure virtual functions in derived stack and queue classes, defining function templates, designing a bank account class with methods to deposit, withdraw and display balance, creating a rodent inheritance hierarchy with overridden base class methods, using try-catch blocks to handle exceptions, and raising an index out of bounds exception.
WAP to swap two integers without using a third 1. variable. The swapping must be done in a different 07/04/2022 method in a different class.
WAP that uses a class where the member functions
2. are defined outside a class. 21/04/2022 WAP to find the greater of two given numbers in 28/04/2022 3. two different classes using friend function. 4. Create an abstract class Shape which has a field PI=3.14 as final and it has an abstract method 05/05/2022 Volume. Make two subclasses Cone and Sphere from this class and they print their volume. Create a class called LIST with two pure virtual 5. function store() and retrieve().To store a value call 12/05/2022 store and to retrieve call retrieve function. Derive two classes stack and queue from it and override store and retrieve. WAP to define the function template for 19/05/2022 6. calculating the square of given numbers with different data types. Design a class to represent a bank account. Which 7. include contains account number, name of the depositor, type of the account, balance amount in 26/05/2022 the account. Define Methods, to assign initial values, to Deposit an amount, to Withdraw amount after checking balance, to display name and balance. Create an inheritance hierarchy of Rodent, Mouse, 8. Gerbil, Hamster etc. In the base class provide methods that are common to all Rodents and 03/06/2022 override these in the derived classes to perform different behaviors, depending on the specific type of Rodent. Create an array of Rodent, fill it with different specific types of Rodents and call your base class methods. WAP Containing a Possible Exception. Use a Try 10/06/2022 9. Block to Throw it and a Catch Block to Handle it Properly. WAP to raise an exception if any attempt is made 10. to refer to an element whose index is beyond the 24/06/2022 array size.