Which one of the following is a good strategy for resolving class name collisions that occur during OO analysis? (Single Select) a) Discover better names for different concepts that are referred by the same term. b) Allow each team member to choose a preferred name. c) Create a class for each domain name, passing on requests to the one class that implements the behavior for all of them to share Can somebody please explain option c, I am not quite sure what it means? Thanks!
Well, it is normal that you don't understand what it means since it's nonsense! The correct answer is a). c) is a contrived answer that was made to look "serious" simply to make it harder for people to get the right answer. (or so I believe...) Panagiotis.
posted 19 years ago
Can somebody please give an example for option a? Thanks!
Hi, A is correct. Since in OO Analysis, you are not playing with software objects, it is easier to discover better names for different concepts that are referred by the same team.This emphasizes on names which look more realistic and comparable to real-world roles. For example, if the same team has identified two books as concepts in the problem domain;if one book is a "Journal" and another an "OOAD Book", then the concepts could be "Journal" and "OOADBook" to avoid class name collisions. C is incorrect. I think the examiner is trying to confuse us with Design and Analysis Phases."Implements" comes in OO Design not in OO Analysis.if I am correct, I can repharse this statement as "Polymorphism can resolve class name collisions", which is absolutely humbug!!
B is incorrect. What if two team members think alike?They are bound to have class name collisions.And what if you have 100 concepts- will you hire 100 developers to come out with different class names? .This is a horrible option. Hope this helps, Sandeep