Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objectives: ArrayList File /O UML diagrams Task: Hogwarts is going digital...and they need your help! The school for witchcraft and wizardry needs a program to
Objectives: ArrayList File /O UML diagrams Task: Hogwarts is going digital...and they need your help! The school for witchcraft and wizardry needs a program to keep track of their enrollment and houses. If you're unfamiliar with Harry Potter, Hogwarts is the name of a school instructing young wizards and witches. The school has four "houses", and each student enrolled in the school belongs to one. (There's also a bit about sorting, but we'll assume everyone has a house already). Students are additionally identified by what year they are presently in new students are in their first year, and so on. Getting Started Your application will read in data from four text files: yearl.txt, year2.txt, year3.txt, and year4.txt. These can be downloaded as a zip file here-unzip it and place the four files in the top of your project in Eclipse To get you started, we've provided a test class, Lab2.java. Your final submission must include this class exactly as it appears here. The only permitted modification to this code is to add Javadoc comments as needed. Once your application is completed, running Lab2.java with the given data files will result in the exact output shown below. In addition to this class, you will also create School.java and Student.java. All three of these classes must be in the default package in your project. public class Lab2 public static void main String args School hogwarts- new School("Hogwarts school of Witchcraft& wizardry") hogwarts.importstudents("yearl.txt"); hogwarts.importstudents ("year2.txt" hogwarts.importstudents("year3.txt) hogwarts.importStudents( year4.txt) System.out.println hogwarts
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