Question
Need help with event trace diagram for my hotel reservation class. public class Reservation { private MasterRoomList masterRoomList; private List roomList; private int roomPrice; private
Need help with event trace diagram for my hotel reservation class.
public class Reservation {
private MasterRoomList masterRoomList; private List
String pattern = "mm/dd/yyyy"; SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
public void addRoom(Room room) {
boolean isDirty = masterRoomList.checkDirty(room); boolean isAvailable = masterRoomList.checkCapacity(room);
//check ifDirty or notDirty if (!isDirty && isAvailable) { roomList.add(room); }
}
public MasterRoomList getMasterRoomList() { return masterRoomList; }
public void setMasterRoomList(MasterRoomList masterRoomList) { this.masterRoomList = masterRoomList; }
public List
public void setRoomList(List
public int getRoomPrice() { return roomPrice; }
public void setRoomPrice(int roomPrice) { this.roomPrice = roomPrice; }
public int getNumOfGuests() { return numOfGuests; }
public void setNumOfGuests(int numOfGuests) { this.numOfGuests = numOfGuests; }
public Date getStayStart() { return stayStart; }
public void setStayStart(Date stayStart) { this.stayStart = stayStart; this.startDate = simpleDateFormat.format(stayStart); }
public Date getStayEnd() { return stayEnd; }
public void setStayEnd(Date stayEnd) { this.stayEnd = stayEnd; this.endDate = simpleDateFormat.format(stayEnd); } }
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