BAEL-4994 Class name changed in mvp

This commit is contained in:
Md Moinul Hossain 2021-06-16 18:09:58 +06:00
parent 48993c9718
commit be2d8a668f
2 changed files with 6 additions and 6 deletions

View File

@ -6,10 +6,10 @@ public class MvpMainClass {
Product model = retrieveProductFromDatabase(); Product model = retrieveProductFromDatabase();
ProductView view = new ProductView(); ProductView view = new ProductView();
ProductController controller = new ProductController(model, view); ProductPresenter presenter = new ProductPresenter(model, view);
controller.showProduct(); presenter.showProduct();
controller.setProductName("SmartPhone"); presenter.setProductName("SmartPhone");
controller.showProduct(); presenter.showProduct();
} }
private static Product retrieveProductFromDatabase() { private static Product retrieveProductFromDatabase() {

View File

@ -1,10 +1,10 @@
package com.baeldung.mvp; package com.baeldung.mvp;
public class ProductController { public class ProductPresenter {
private final Product product; private final Product product;
private final ProductView productView; private final ProductView productView;
public ProductController(Product product, ProductView productView) { public ProductPresenter(Product product, ProductView productView) {
this.product = product; this.product = product;
this.productView = productView; this.productView = productView;
} }