Page 311 - IT-802_class_12
P. 311

System.out.println(“---------------------------------------------”);

                                            System.out.println(“press 1 for continue”);
                                            System.out.println(“press 0 for exit”);
                                            choice = sc.nextint();
                                            break;
                                       case 0:
                                            System.exit(0);

                                  }
                          }
                  }
              }
            Library Fine Calculator


              3.  Write a project in Java to Calculate the fine of the library of a school and display the data in the following format:

















                 Use the following criteria to calculate the total fine on the book:
                 Days                    Fine
                 Days < = 10             0
                 Days <= 20              2 * number of late days
                 Days <= 30              3.5 * number of late days
                 Days >= 31              5.5 * number of late days
                 import java.util.Scanner;

                class Library_management_System
               {
                  public static void main(String[] args)
                  {

                  String std_name,std_regd_no,std class,section,book,author,issue,Return,s1,s2;
                  double fine;
                        long day_late;
                        Scanner sc = new Scanner(System.in);
                        System.out.println("**********************************************");
                        System.out.println("*          Library management System         *");
                        System.out.println("**********************************************");
                        System.out.print("Enter Student Name : ");



                                                                                                     Projects   309
   306   307   308   309   310   311   312   313   314   315   316