Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 7. 7. (TCO 2) You need to utilize a Plant class in your own object-orie

ID: 3558747 • Letter: Q

Question


Question 7.7. (TCO 2) You need to utilize a Plant class in your own object-oriented class using composition. Luckily, one of your fellow students just finished writing their own version of a Plant class. If the Plant class was properly designed as a black box, which of the following statements are false? (Points : 5)        All of the required inputs will be revealed to you.
       All of the outputs will be revealed to you.
       Only the implementation details will be revealed to you.
       Only the interface details will be revealed to you. Question 8.8. (TCO 2) Given a private string attribute called homeState, which of the following are proper pseudocode implementations for a getter and a setter? (Points : 5)        string getHomeState(){return homeState }
int setHomeState(string newHomeState){return homeState }
       void getHomeState(){return homeState }
void setHomeState (int newHomeState){homeState = newHomeState}
       string getHomeState(){return homeState }
void setHomeState (string newHomeState){ homeState = newHomeState}
       string getHomeState (){homeState = newHomeState}
void setHomeState (string newHomeState){ homeState = newHomeState} Question 9.9. (TCO 2) Encapsulation is an object-oriented concept that promotes the packaging or combination of _____ and _____ in to a single entity or class. (Points : 5)        attributes; methods
       getters; setters
       data type; return values
       public attributes; private methods
       None of the above Question 10.10. (TCO 7) Which of the following statements is true? (Points : 5)        A pure virtual function is a function without function implementation and is ended with =0;
       An actual object can be created from an abstract class.
       A pure virtual function is a function that cannot be inherited and therefore must be overloaded.
       A pure virtual function cannot be overridden. Question 11.11. (TCO 7) An abstract _____ is used only to form related derived classes using inheritance since it cannot be instantiated. (Points : 5)        method
       class
       object
       attribute Question 12.12. (TCO 7) In terms of object-oriented programming, rules for the use of an application programming interface or framework can be enforced through the use of a(n) _____. (Points : 5)        contract
       inheritance hierarchy
       has-a relationship
       object constructed with a multi-arg constructor
       All of the above

Explanation / Answer

7.7)Only the implementation details will be revealed to you.
8.8)setter void setHomeState (string newHomeState){ homeState = newHomeState;}
getter string getHomeState(){return homeState ;}
9.9) attributes; methods
10.10)A pure virtual function is a function without function implementation and is ended with =0;
11.11) class
12.12) Contract

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote