Part A > Assume that class B is derived publicly from class A which is abstract. > The member functions that are private

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Part A > Assume that class B is derived publicly from class A which is abstract. > The member functions that are private

Post by answerhappygod »

Part A
> Assume that class B is derivedpublicly from class A which is abstract.
> The member functions that are privatein class A will be private/protected/public/not directly accessiblein class B.
Part B
> Assume that you have a class that hasan integer pointer as a private member.
> One of the member functions willdynamically allocate memory memory and assign the address to thatmember.
> Assume that an object of that classtype is instantiated and the function called to allocatememory.
> When the object reaches the end ofit's scope - will the memory that has been allocated be releasedautomatically? If not, how would you create a mechanism toaccomplish this. Be specific.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply