Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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 compile

Explanation / 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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote