Chapter 10: Problem 15
Suppose your program contains the following class definition: class Automobile \\{ public: void set_price(double new_price) void set_profit(double new_profit) double get_price(); private: double price double profit; double get_profit(); \\}; and suppose the main part of your program contains the following declaration and that the program somehow sets the values of all the member variables to some values: Automobile hyundai, jaguar; Which of the following statements are then allowed in the main part of your program? hyundai.price \(=4999.99\) jaguar.set_price(30000.97) double a_price, a_profit; \(a_{-}\) price \(=\) jaguar \(.\) get \(_{-}\) price () \(a_{-}\) profit \(=\) jaguar \(\cdot\) get \(_{-}\) profit () \(a_{-}\) profit \(=\) hyundai \(.\) get_profit () if (hyundai \(==\) jaguar) cout \( < < \) "Want to swap cars?"; hyundai = jaguar;
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.