Question: HI PLEASE HELP AND ANSWER IT CLEARLY THANKS 0.5 pts Question 7 Suppose a program has the following House class (implementation details are omitted): class

HI PLEASE HELP AND ANSWER IT CLEARLY THANKS  HI PLEASE HELP AND ANSWER IT CLEARLY THANKS 0.5 pts Question
7 Suppose a program has the following House class (implementation details are
omitted): class House int num_of_bedrooms, House(): House(int b); void set_num_of_bedrooms(int b); int

0.5 pts Question 7 Suppose a program has the following House class (implementation details are omitted): class House int num_of_bedrooms, House(): House(int b); void set_num_of_bedrooms(int b); int get_num_of_bedrooms(): 1: And for each House object that is created, it needs to be guaranteed that the num_of_bedrooms is at least 1. In other words, input validation logic is needed to make sure that num_of_bedrooms is always at least 1. If code in the application program (e. in main) attempts to set num_of_bedrooms to less than 1, the input validation logic will detect this and simply set num_of_bedrooms to 1, and display an error message to the user that the number of bedrooms must be at least 1. Where in the House class would it be appropriate to place this input validation logic? Housefint b) O House vold set num of bedroomstint b) int got nom of bedrooms D Question 8 0.5 pts What is the relationship between throw, try, and catch? Throw handles an exception Try contains code that could possibly cause an exception Catch signals that an exception has occurred Throw signals that an exception has occurred Try contains code that could possibly cause an exception Catch handles an exception Throw handles an exception Try signals that an exception has occurred Catch contains code that could possibly cause an exception Throw signals that an exception has occurred Try handles an exception Catch contains code that could possibly cause an exception Question 9 0.5 pts The size of an object depends on the amount of memory required to store the class's what? All of the above O Functions Constructors O Variables D Question 10 0.5 pts Suppose there is a class named Computer, which can be used to create objects that store information about a particular computer. This class is developed by the class developer. A different person, the application developer, needs to use the Computer class in their application. However, as described above, the application developer did NOT develop the class - they are just using it. The application code is in a file named Main.cpp. In this scenario, the application developer would normally have access to all of the following files EXCEPT: O Computer.cpp Computer h Main exe Main obj

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!