Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer in Java /** * Create a student a student with this name and id and * add the student to the list of
Please answer in Java
/** * Create a student a student with this name and id and * add the student to the list of students * @param studentName name of the student * @param studentId id of the student * public void addStudent(String studentName, int studentId) { Student junior=new Student(studentName, studentId); this.students.add(junior); } /** Return true if a person with the given name is a student at this university, * and false otherwise. * For the purpose of this exercise we assume that names are unique. * @param name name of the person * @return true if this person is a student at this university */ public boolean findStudent(String name) { // TODO: check if the student with this name is in the ArrayList return false; } /** * Return a string representation of the university * @return a string that contains the name of the university on the first line, and * then includes students, one on each line: * name, id */ public String toString() { // TODO: return a string representation of the university - see description above }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