Question: JavaFX (Java) MVC (Model portion) Currently making an application that will project a Hogwarts (harry potter) type theme. In order to process this, I will
JavaFX (Java) MVC (Model portion) Currently making an application that will project a Hogwarts (harry potter) type theme. In order to process this, I will need the applicaiton, controller, model, and javaFXML files all while utilizing pictures. Need 3 classes to be made School.java, House.java, Student.java This is the model portion that I'm stuck on and the instructions are as follows.
The Model
The model of this application will be School.java, which will utilize House.java and Student.java. This app will have a single School object, which will contain four House objects. Following the MVC design pattern, none of the model classes may directly update the view - this should always be handled by a constructor. You will need to decide what other methods are needed in these classes. As a general rule, always include getters and setters for all class variables.
School objects must each have a name and four House objects.
House objects must each have a name, a color, the name of a professor who is the Head of the house, and a collection of Student objects. Houses also have a crest/logo associated with them, examples have been provided with this lab. For convenience, the heads of each house are currently assigned (but should be able to change in the future - read and save these from a file!):
Gryffindor: Minerva McGonagall
Ravenclaw: Filius Flitwick
Hufflepuff: Pomona Sprout
Slytherin: Severus Snape
Houses should sort their students by year first, then by last name, then first name. That is, if Ginny Weasley (year 1), Fred Weasley (year 4), and Hermione Granger (year 2) are in Gryffindor, then they should be listed in order with Ginny first, then Hermione, then Fred. Houses should be populated using the data from the text files given in Lab 1. Copy these into your project to ensure they are submitted in your zip file.
There is one file per house needed in this software. Each file is a csv (comma-separated values) containing one row per student in that house. The student name is first, followed by their year. For example: Harry Potter,2 Katie Bell,3
Student objects must each have a name (first & last) and a year. For example, the following could be used to instantiate a new Student:
Student student1 = new Student("Harry Potter", 2);
Valid years for students are 1-7.
Datafiles are in the following format: Gryffindor.csv, Hufflepuff.csv, Ravenclaw.csv, Slytherin.csv
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
