Java programming: (1) 35. What is likely occuring as part of the following model
ID: 3909094 • Letter: J
Question
Java programming:
(1) 35. What is likely occuring as part of the following model-view-controller code? MyModel model - new MyModel); MyView view - new MyView ); model.addObserver (view) MyController controller = new MyController (model, view); A. model calls on notifyObservers (Object o), B. Observable object calls on update (Observable o, Object obj) of view, C. view casts Object variable, D. all of the above, E. none of the above (1) 36. What is likely occurring as part of the following model-view-controller code? MyModel model - new MyModel); MyFirstView viewl -new MyFirstView ) model.addObserver (viewl); MyFirstController ctrll -new MyFirstController (model, viewl) MySecondView view2 - new MySecondvView ); model.addObserver (view2); MySecondController ctri2 = new My SecondCont roller (model, view2 ); A. the two views are independent of each other, B. only the first view will receive updates, C. two different views update when model changes., D. none of the above. (1) 37. What is the return type of the method public static String doSomething (El] e)? A, E, B. C. String, D. depends on E, E. does not compileExplanation / Answer
Answer 35: D.
When we add the view to model mentioned all actions will takes place
Answer 36:
C, here wer are adding both views adding to samel model so if we change something at model than both views get changes
Answer 37:
D, here we are using generics so it will depends in E, which object we created for that class
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.