Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 17 1 pts How do you make a class member variable read-only? O make the member variable private O add a getter method to
Question 17 1 pts How do you make a class member variable read-only? O make the member variable private O add a getter method to retrieve the variable value O do not add a setter method. all of the above D Question 18 1 pts Why is it common to make a separate.h file for each class? to encapsulate all of the prototype information without needing the details O you can't put header information and implementation in the same file the h file is where you implement all the methods o this is not a common practice Question 19 1 pts Why do you add pre-processor directives (like Sifndet) to .h files? because pre-processor directives are fun for the whole family they prevent the class definition from being loaded more than once Don't ask questions. just do what you're told that's the only way the compiler knows it's in a header ile
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started