Question: In our engineering school, students can be a CS, SE or CE student. Therefore, four classes are developed: Student, CS, SE, and CE. Because CS

In our engineering school, students can be a CS, SE or CE student. Therefore, four classes are developed: Student, CS, SE, and CE. Because CS and SE are in the same department, you are asked to develop exactly one function foo() in class MyProg that can accept an object of CS or SE, but not CE. Which design pattern can be easily applied to accomplish this? _____________________

Show the UML class diagram to depict the changes. Extra interfaces or classes can be added.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!