subject

In C++ programming, suppose that you've implemented a class called FGH and that it has only one private member variable, a pointer x that points to an object of another class called JKL. It is not stated in particular here what problems FGH or JKL are intended to solve, nor the reason why FGH is storing the pointer x in a member variable. (To avoid biasing your answer to the questions below, I'm not specifying these things, because the questions ask you to explore various possibilities, focusing on why we would make certain design decisions instead of others.) Given these assumptions and no others, answer the following questions about them.
Under what circumstances would it be necessary to implement a destructor in the class FGH? Under what circumstances would it be fine to leave it out?
Suppose you felt that you needed to implement a destructor in FGH. Under what circumstances would it also be necessary to implement a copy constructor in the class FGH? Under what circumstances would it be fine to leave it out?
Suppose you felt that you needed to implement a destructor in FGH. Under what circumstances would it also be necessary to overload the assignment operator in the class FGH? Under what circumstances would it be fine not to overload it?

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, hannahliebl2000
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
image
Computers and Technology, 22.06.2019 07:30, alexandramendez0616
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, ansonhunter8891
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, kreshnikolloma
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
You know the right answer?
In C++ programming, suppose that you've implemented a class called FGH and that it has only one priv...

Questions in other subjects:

Konu
Mathematics, 05.07.2019 19:30