Library program Java
1.Develop a Library interface which has drawbook(),returnbook()(with fine),checkstatus(),and reservebook() methods. All the methods are tagged with public in the following ways: (i) Using draw book()-get the required book based on title (ii)Using checkstatus-user book returned date details (iii)Using with fine()-Whether failed to return the book within a time period charge-Rs.5/day (iv)Using reserve book()-block or reserve particular book for their account. Program: package librarybook; public interface library { public void drawbook(); public void returnbook(); public void checkstatus(); public void reservebook(); } package librarybook; import java.util.Scanner; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.lang.Exception; class book implement...
Comments
Post a Comment