mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 06:58:41 +00:00
52e6ea2b68
Implemented DAO
26 lines
578 B
Java
26 lines
578 B
Java
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
|
|
*/
|
|
}
|
|
}
|