Skip to content

Commit ef887e6

Browse files
committed
iluwatar#107 Improve JavaDoc for Model-View-Controller example
1 parent 8701833 commit ef887e6

File tree

2 files changed

+13
-4
lines changed
  • model-view-controller/src
    • main/java/com/iluwatar/model/view/controller
    • test/java/com/iluwatar/model/view/controller

2 files changed

+13
-4
lines changed

model-view-controller/src/main/java/com/iluwatar/model/view/controller/App.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
*
55
* Model-View-Controller is a pattern for implementing user interfaces. It divides the application
66
* into three interconnected parts namely the model, the view and the controller.
7-
*
7+
* <p>
88
* The central component of MVC, the model, captures the behavior of the application in terms of its problem
99
* domain, independent of the user interface. The model directly manages the data, logic and rules of the
1010
* application. A view can be any output representation of information, such as a chart or a diagram
1111
* The third part, the controller, accepts input and converts it to commands for the model or view.
12-
*
13-
* In this example we have a giant (GiantModel) with statuses for health, fatigue and nourishment. GiantView
14-
* can display the giant with its current status. GiantController receives input affecting the model and
12+
* <p>
13+
* In this example we have a giant ({@link GiantModel}) with statuses for health, fatigue and nourishment. {@link GiantView}
14+
* can display the giant with its current status. {@link GiantController} receives input affecting the model and
1515
* delegates redrawing the giant to the view.
1616
*
1717
*/
1818
public class App {
1919

20+
/**
21+
* Program entry point
22+
* @param args command line args
23+
*/
2024
public static void main( String[] args ) {
2125
// create model, view and controller
2226
GiantModel giant = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED);

model-view-controller/src/test/java/com/iluwatar/model/view/controller/AppTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
import com.iluwatar.model.view.controller.App;
66

7+
/**
8+
*
9+
* Application test
10+
*
11+
*/
712
public class AppTest {
813

914
@Test

0 commit comments

Comments
 (0)