注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
/**
* Navan is a business travel agency. One of the most core functions of our product is to sell flight bookings to our customers. This interview question dives into this core workflow.
* Today we are going to implement the booking flow for a single passenger, one way booking. You are given the following interfaces/classes, however some are intentionally left blank.
*
* Implement FlightBookingService. As a part of this, we need to collect a payment, contact the remote airline and send the booking, and also record the booking in our system.
* Be careful and consider the failure / f {
UUID uuid;
String cardNumber;
String ccv;
String cardHolderFirstName;
String cardHolderLastName;
LocalDate expirationMonthYear;
}
interface DatabaseService {
private HashMap<String, Flight> bookedFlights;
}
interface FlightProvider {
public void bookFlight(Flight flight);
}
interface PaymentService {
} |