Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I do know the guidelines of chegg..but please do help me with these problems...I've been stuck on them for a long time... JAVA Problems-THE GRAY
I do know the guidelines of chegg..but please do help me with these problems...I've been stuck on them for a long time... JAVA Problems-THE GRAY WORDS ARE THE ONES I NEED TO DO....
Code titled Main.java is an example-
Gotta do the gray words for the code titled Student.java-
Gray words for the code titled StudentDatabase.java-
I appreciate your time!!
Man.java StudentDatabase.java import java.util. *; * Represents a database of Students. * The Students are to be held in an Arraylist. class StudentDatabase \{ // instance variable(s) here. // ultimately all you need is an Arraylist of // Student objects. // instance variable(s) ABOVE this line! // constructor public StudentDatabase( ) \{ \} // report the size of the student database. public int sizel) \{ 3 // Here, just return the .tostring() of // your ArrayList! :) public String tostring() \{ 3 // Add a new Strudent s to the database I/ // NOTE: You are to keep an ordered database! 11 // So you should add the student into // the list based on where it belongs. 1/ // You can ask a Student ' a ' whether or not I/ it belongs before another student // with a.before(b) // which returns a boolean. public void add(Student s) \{ 3 // Remove the Student s from the database 11 // Just using the , remove() from your // Arraylist should work! public void remove(Student s) \{ 3 // Returns the first Student in the database // with the given Last Name. // if none is found, then I/ return null; public Student getByLastName(String lastName) \{ \} // Given a grade number, return how // many Students in the database // are in that grade. public int classsize(int grade) \{ \} // Given a grade number, return a I/ new ArrayList of Students containing // all of the Students who are in that 1/ grade, in order. public ArrayList getFullClass(int grade) \{ \} \}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