Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

IBM- class name collision

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Caroline Iux
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody please give an example for option a? Thanks!
 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Bookmark Topic Watch Topic
  • New Topic