Hope you're having fun building the Quidditch application.
Our first task is to the necessary field to the team class, I obtained every field from requirements
text.
And they are private string house.
Private string keeper.
Private drink seeker.
And private, an array of string chasers, because there are three chasers.
And because there are four fields we need to add a constructor that receives four parameters.
And then we'll update every field with a parameter value.
And for a raise, remember to use a raised copy of to avoid the reference trap.
OK, now we're going to copy constructor in case we need to create copies of a team object, which we
most likely will.
And instead of receiving values from a parameter, it's going to receive values from a source object.
OK, now we can autocomplete the getters and setters.
In this letter, we don't want to return a reference that points directly to the field will return a
raised copy of that, copies every element from Chaser's.
And we'll keep you the full length of the.
OK, same thing in the center, remember to set the field equal to a copy of the outside variable.
All right, the final task is not to string method, public string to string.
We'll copy the format from the workbook article.
OK, and it tells us the test our code by creating two objects of the team class, so copy that over
and main.
And your terminal should point to the folder Quidditch game.
But Main Java is inside source slash maner.
So you need to write Gervasi.
Source slash, mean slash, mean java.
We're basically telling the terminal, hey, the file we want to run is not inside the folder Quidditch
game.
You can compile me, not Java, by drilling into source.
And we need to do the same thing for the Java command by telling the terminal where the file is that
we want to run.
OK, and printing an object should internally call its two string method and everything looks good now
to see you in part two.