CS FundamentalsHardGATE CS · TCS NQT Prime · Product Company SDE
A class diagram marks an attribute's visibility with a '#' symbol before its name. What does this denote?
- A. Public visibility, accessible from anywhere
- B. Protected visibility: accessible to the class itself and its subclasses, but not to unrelated classes
- C. Private visibility, accessible only within the class itself
- D. Package (default) visibility, accessible only within the same package
Correct answer: B. Protected visibility: accessible to the class itself and its subclasses, but not to unrelated classes
UML uses '+' for public, '-' for private, '#' for protected and '~' for package visibility; '#' specifically marks a member as accessible to the class and its subclasses, but hidden from unrelated external code.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Which of these is a defining feature of the V-model, distinguishing it from plain waterfall?
- Using Basic COCOMO for a embedded mode project (Effort = 3.6 × (KLOC)^1.2 person-months), what is the estimated effort for a 24 KLOC…
- A 'flaky test' is one that:
- What is the main reason software cost/effort estimates (such as those from COCOMO) are described as estimates rather than guarantees, even…
- A function has 3 independent input variables, each with its own valid range. Using robust BVA (standard BVA plus one invalid value just…
- In a UML class diagram, multiplicity '1..' on an association end means: