Coarse_Offered()
SCJP 6, SCWCD 5, SCBCD 5
Sowm Herur wrote:Now to access the method Coarse_Offered() in the class University do i have to create an instance of the class University in the class Student even though both these classes are in the same package?
Patricia Samuel wrote:nossnahoj, what will be the better way then to access course_offered method of the University.
I request you to explain more about the design university and student should have.
SCJP 6, SCWCD 5, SCBCD 5
SCJP 6, SCWCD 5, SCBCD 5
Patricia Samuel wrote:I think it follows command pattern ( I know its pretty obvious from the naming convention
)
Yes it's the Command design pattern.
The reason to use it in this case would be to isolate "requests" and handle them uniformly. The design looks a little complicated though and not quite functional.
For example what's the purpose of the Invoker class? It seems like an unmotivated complication to me.
And how does a Student receive the requested info? It's not enougth to print it at the University. This design allows you to request stuff but not to get your hands on it.
Also it's stated the design will enable you to forward requests to other educational institutes apart from universities but that's not visible in the design.
SCJP 6, SCWCD 5, SCBCD 5
Yes, my master! Here is the tiny ad you asked for:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|