我正在寻找一个测试应用程序,它可以检查来自航空公司提供商的各种航班信息,我正在努力解决类和方法的概念以及要创建的那些.我目前的思考过程如下:数据是从网站下载的,由于数据的大小,我只想下载一次数据.我目前的想法是:
类
BritishAirwaysFlightData()
Run Code Online (Sandbox Code Playgroud)
构造函数
BritishAirwaysFlightData // Used to download the BA Flight database and store in the object (Assumging his is only small i.e. 500kb)
Run Code Online (Sandbox Code Playgroud)
方法
getStartDate(String source_airport, String dest_airport) // Takes source and destination airport and return date when flights start
getEndDate(String source_airport, String dest_airport) // Takes source and destination airport and return date when flights finish
getDestAirports(String source_airport) // Takes source airport name and returns a list of destinations
getSourceAirports(String dest_airport) // Takes source airport name and returns …Run Code Online (Sandbox Code Playgroud)