Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please follow all the instructions. use this in MVC FORM. USE THE CODE THAT IS GIVE TO YOH BELOW MAKE SURE ITS BEGINNER FRIENDLY. package
please follow all the instructions.
use this in MVC FORM.
USE THE CODE THAT IS GIVE TO YOH BELOW
MAKE SURE ITS BEGINNER FRIENDLY.
package Model;
public class Model
{
public Model()
{
loadData();
}
public void loadData()
{
}
}
package View;
public class View
{
public View()
{
}
}
package Controller;
import Model.Model;
import View.View;
public class Controller
{
Model model;
View view;
public Controller(View v, Model m)
{
model = m;
view = v;
//................
}
}
import Controller.Controller;
import Model.Model;
import View.View;
public class App
{
public static void main(String[] args)
{
Model model = new Model();
View view = new View();
Controller controller = new Controller(view, model);
}
}
public class Person{
private String name;
private int weight;
private String hometown;
private String highSchool;
public Person(){
this.name="";
this.weight=0;
this.hometown="N/A";
this.highSchool="N/A";
}
public Person(String name, int weight, String hometown, String highSchool) {
this.name = name;
this.weight = weight;
this.hometown = hometown;
this.highSchool = highSchool;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public String getHometown() {
return hometown;
}
public void setHometown(String hometown) {
this.hometown = hometown;
}
public String getHighSchool() {
return highSchool;
}
public void setHighSchool(String highSchool) {
this.highSchool = highSchool;
}
@Override
public String toString() {
return "Person{" + "name=" + name + ", weight=" + weight + ", hometown=" + hometown + ", highSchool=" + highSchool + '}';
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started