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

Question #246180
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 venues -------------------- Building name: Engineering Venue number: 2.38 Number of seats: 80 ------------------------- Building name: Engineering Venue number: 1.1 Number of seats: 40 Number of working computers: 40 ------------------------- Building name: Engineering Venue number: 2.60 Number of seats: 60
1
Expert's answer
2021-10-05T15:45:26-0400
public class Main {
 public static void main(String[] args) {
  show();
 }
 private void show(Vanue vanue) {
  System.out.println(vanue);
 }
}

class Vanue {
 private int number;
 private int numberOfSeats;
 private int numberOfComps;
 private String buildingName;
 public Vanue() {
 }
 // getters and setters
 @Override
 public String toString() {
  // here impl...
 }
}

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