![]() You need to use JDBC API to perform CRUD operations on MySQL. Make a menu driven CLI program that shall allow user to perform different operations (listed in the interface). ![]() In same way, you would use different SQL queries to define each method, depending on what method requires you to do. For example in User getUser(int userID) method, you would use SELECT statement to fetch the record based on userID, then you would make User object using returned data from the database and return that user object to calling code, if database do not contain the user, you would return null. In this assignment, you shall perform these operations in MySQL database using JDBC API. So, you shall redefine the methods of the interface as you did in Task 10, in Task 10, you saved, read, updated the records in/from an ArrayList. Part 3: Define a new class named DbUserService that shall implement UserService interface.
0 Comments
Leave a Reply. |