Make my own web site - 784 Graphical User Interface Components: Part 2 Chapter

784 Graphical User Interface Components: Part 2 Chapter 13 Fig. 2.24). The model then notifies the view of the Person s creation. The view, in response to this notification, displays a Person on a Floor. The model is unaware of how the view displays the Person, and the view is unaware of how or why the model created the Person. The MVC architecture helps construct reliable and easily modifiable systems. If we desire text-based output rather than graphical output for the elevator simulation, we may create an alternate view to produce text-based output, without altering the model or the controller. We could also provide a three-dimensional view that uses a first-person perspective to allow the user to take part in the simulation; such views are commonly employed in virtual-reality-based systems. Elevator-Simulation MVC We now apply the MVC architecture to our elevator simulation. Every UML diagram we have provided to this point (with the exception of the use-case diagram) relates to the model of our elevator system. We provide a higher-level class diagram of the simulation in Fig. 13.19. Class ElevatorSimulation a JFrame subclass aggregates one instance each of classes ElevatorModel, ElevatorViewand ElevatorController to create the ElevatorSimulation application. As mentioned in Thinking About Objects Section 10.22, the rectangle with the upper-right corner folded over represents a note in the UML. In this case, each note points to a specific class (through a dotted line) to describe that class role in the system. Classes ElevatorModel, Elevator- View and ElevatorControllerencapsulate all objects comprising the model, view and controller portions of our simulation, respectively. ElevatorSimulation 1 1 1 1 application ElevatorModel ElevatorView javax.swing.JFrame ElevatorController 1 1 ElevatorModelListener controllerviewmodel Fig. 13.19Class diagram of the elevator simulation. 13.19
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Leave a Reply