Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions