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

Question #246177
VenueControlClass This class has a menu control method that allows users to add a Venue or ComputerLab object to an array. The array allows for 20 elements, but the array may contain less elements. The number of elements if the arrays is available in the variable numberOfVenues. Code the attributeas and methods as specified. 1 Code an array that can hold 20 Venue objects. 2 Code the numberOfVenues attribute. 3 Code a no-argument constructor. In this constructor, a) Add 3 Venue objects to the venues array. b) Add 3 ComputerLab objects to the venues array. c) Set numberOfVenues to 6.
1
Expert's answer
2021-10-03T16:19:51-0400
public class Vanue {
    private String buildingName;
    private String roomNumber;
    private int numberSeats;
    public Vanue() {
    }
    public Vanue(String buildingName, String roomNumber, int numberSeats) {
        this.buildingName = buildingName;
        this.roomNumber = roomNumber;
        this.numberSeats = numberSeats;
    }
    public String getBuildingName() {
        return buildingName;
    }
    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }
    public String getRoomNumber() {
        return roomNumber;
    }
    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }
    public int getNumberSeats() {
        return numberSeats;
    }
    public void setNumberSeats(int numberSeats) {
        this.numberSeats = numberSeats;
    }
    @Override
    public String toString() {
        return "Vanue{" +
                "buildingName='" + buildingName + '\'' +
                ", roomNumber='" + roomNumber + '\'' +
                ", numberSeats=" + numberSeats +
                '}';
    }
    public void show() {
        System.out.println(this);
    }
    private boolean problemVanue() {
        return false;
    }
}

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