Answer to Question #246576 in Java | JSP | JSF for Aubrey Eso Jozela

Question #246576
Code a method displayAllStudents(). This method has no parameters and is void. This method displays all the objects in the array. a) Display a heading . b) Loop through the array and use the show() of every object to display the object details. c) Print a line after each object is displayed. Example of expected output: Displaying all students -------------------- Student details Name: Smittie Student number: 12345 Loan amount: 10000.0 ------------------------- Student details Name: Jannie Student number: 67543
1
Expert's answer
2021-10-09T06:16:04-0400
public class StudentLoans {
    private Student[] students;

    public void displayAllStudents() {
        System.out.println("Displaying all students ");
        for (Student student : students) {
            System.out.println("--------------------");
            student.show();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS