Skip to content

Commit ad46ac8

Browse files
committed
add: cpp-programming-questions 13_virtual_abstract 06
1 parent 319d36a commit ad46ac8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

13_virtual_function_and_abstract_class/00_questions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
05. Design a class hierarchy for a banking system with a base class Account and two derived classes SavingsAccount and CurrentAccount. Each class should have data members for account balance, account number, and an interest rate (for savings account). Implement virtual functions for deposit, withdraw, and display account details. Demonstrate the use of these classes by creating objects and performing transactions.
1616

17-
06.
17+
06. Define a class Animal with a pure virtual function makeSound(). Derive three classes Dog, Cat, and Bird from Animal and implement the makeSound() function in each derived class. Create objects of each class and make them produce sounds.
1818

1919
07. Create a base class called Matrix. Use this class to store 4 int type values that could be used to calculate determinants and create matrices. Create class
2020
calculate_determinant which will calculate the determinant of a matrix.Using these classes, calculate the determinant of the matrix.

0 commit comments

Comments
 (0)