mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 10:58:51 +00:00
@@ -0,0 +1,24 @@
|
||||
package com.ashishtrivedi16.transactionscript;
|
||||
|
||||
public class Hotel {
|
||||
|
||||
public void bookRoom(int roomNumber) {
|
||||
/*
|
||||
TODO
|
||||
-> Check if room is available
|
||||
-> Calculate price
|
||||
-> Book the room
|
||||
-> Commit transaction
|
||||
*/
|
||||
}
|
||||
|
||||
public void cancelRoomBooking(int roomNumber) {
|
||||
/*
|
||||
TODO
|
||||
-> Check if room is booked
|
||||
-> Calculate refund price
|
||||
-> Cancel the room booking
|
||||
-> Commit transaction
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user