Given two classes, customer and customer order, which class would probably have navigational visibility to which class?
Question
Given two classes, customer
and customer order
, which class would probably have navigational visibility to which class?
Solution
Navigational visibility refers to the ability of one class to see and interact with another class. In the context of the two classes you mentioned, the "Customer Order" class would likely have navigational visibility to the "Customer" class.
Here's a step-by-step explanation:
-
The "Customer Order" class would need to know about the "Customer" class because each order is associated with a customer. This association could be represented by a reference from an instance of the "Customer Order" class to an instance of the "Customer" class.
-
The "Customer Order" class would need to access the "Customer" class to get information about the customer who placed the order. This could include the customer's name, contact information, or other relevant details.
-
On the other hand, the "Customer" class may not need to have navigational visibility to the "Customer Order" class. A customer doesn't necessarily need to know about all the details of their orders. However, this could depend on the specific requirements of the system being modeled.
-
If the system requires that a customer be able to view their past orders, then the "Customer" class would also need to have navigational visibility to the "Customer Order" class. This could be represented by a list of references from an instance of the "Customer" class to multiple instances of the "Customer Order" class.
So, in conclusion, the "Customer Order" class would probably have navigational visibility to the "Customer" class, and possibly vice versa depending on the system's requirements.
Similar Questions
What is the very first private Class A address that can be assigned to clients?1
Which of these cannot be taken as a class for a library management system?MemberBookPatientLibrarian
What sense can the Guest use when you preview the order from a trolley?ATouchBHearCSight and smellDTaste
"Customer place many orders" in this sentence "place" is An AttributeAn EntityA RelationshipNone of the above
Access and visibility of a class should be limited as much as possible. True or False? True False
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.