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 derived publiclyfrom class A which is abstract.
> The member functions that are private inclass A will be private/protected/public/not directly accessible inclass B.
Part B
> Assume that you have a class that has aninteger 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 class typeis instantiated and the function called to allocate memory.
> When the object reaches the end of it'sscope - 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