parent
58e3fbfc6a
commit
112973482d
@ -1,8 +0,0 @@
|
||||
package com.ashishtrivedi16.transactionscript;
|
||||
|
||||
public class App {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, world!");
|
||||
}
|
||||
}
|
@ -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
|
||||
*/
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ashishtrivedi16.transactionscript;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class TransactionScriptApp {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TransactionScriptApp.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
LOGGER.info("Hello, World!");
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user