Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public class DishModel { private int dish_id;//dish id private String dish_name;//dish name private double dish_price;//dish price private String dish_description;//dish description private String dish_image;//dish image public

public class DishModel { private int dish_id;//dish id private String dish_name;//dish name private double dish_price;//dish price private String dish_description;//dish description private String dish_image;//dish image public DishModel(int dish_id, String dish_name, double dish_price, String dish_description, String dish_image) { super(); this.dish_id = dish_id; this.dish_name = dish_name; this.dish_price = dish_price; this.dish_description = dish_description; this.dish_image = dish_image; } public DishModel(){ } @Override public String toString() { return "Dish [ dish_name=" + dish_name + ", dish_price=" + dish_price + ", dish_description=" + dish_description + ", dish_image=" + dish_image + "]"; } public int getDish_id() { return dish_id; }

public void setDish_id(int dish_id) { this.dish_id = dish_id; }

public String getDish_name() { return dish_name; }

public void setDish_name(String dish_name) { this.dish_name = dish_name; }

public double getDish_price() { return dish_price; }

public void setDish_price(double dish_price) { this.dish_price = dish_price; }

public String getDish_description() { return dish_description; }

public void setDish_description(String dish_description) { this.dish_description = dish_description; }

public String getDish_image() { return dish_image; }

public void setDish_image(String dish_image) { this.dish_image = dish_image; }

}

This code is model part in MVC architecture, please explain the meaning of each piece of code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago