开发一个TV影视仓库接口
要求提供以下功能
1. 添加TV影视:可以添加用户想要看的TV影视到仓库里;
2. 删除TV影视:可以删除不想看的TV影视从仓库中移除;
3. 修改TV影视:可以修改已存在的TV影视内容;
4. 查询 TV 影视: 可以根据用户名等条件查询 TV 影视。
/**
* TVMovieWarehouse interface to manage tv and movie collections
*/
public interface TVMovieWarehouse {
/** * Add a new tv or movie to the warehouse * @param title The title of the new tv/movie */ public void add(String title);
/** * Remove an existing tv or movie from the warehouse * @param title The title of the tv/movie to be removed */ public void remove(String title);
/** * Modify an existing tv or movie in the warehouse with updated details such as genre, director etc. * @param oldTitle The old title of the existing tv/movie * @param newTitle The new updated title of the existing tv/movie */ public void modify(String oldTitle, String newTitle);
/** * Search for a specific Tv or Movie in the warehouse based on criteria such as genre, director etc. * @param searchTerm A string representing some search criteria that matches one or more entries in our Warehouse */ public void search(String searchTerm); }
免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。