Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Inheritance Hierarchy 15-2 Loan amount: double -nontest int -rate: double Loan (amount : double, months int, rate double) *set ronths (nonths 1 Int) get ronths)

image text in transcribed
Inheritance Hierarchy 15-2 Loan amount: double -nontest int -rate: double Loan (amount : double, months int, rate double) *set ronths (nonths 1 Int) get ronths) set rate (rate double) get_rate() get description() House -loan type: string Howe(amount dowle, months i int, rate double, type t string) get loan type() set loan type (type) get description() (Refer to Inheritance Hierarchy 15-2.) Assume that the get_description() function in the Loan class returns the amount data member. If this function is overridden by the get_description() function in the House class how could you code the definition in the House class so it returns the loan amount and loan type values? Ostd::string get_description() const return amount + - " + loan_type '); 3 O atd::string get_description() const return std::to_string(amount) + ( + loan_type + + ) std string get_description() const i return Loan::get_description() + ("loan_type. ) O all of the above ob and conly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Ages Of The Investor A Critical Look At Life Cycle Investing

Authors: William J Bernstein

1st Edition

1478227133, 978-1478227137

Students also viewed these Databases questions

Question

The "visual language of art and architecture consists of:

Answered: 1 week ago