In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to achieve a simple book lending system in Java". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to achieve a simple book lending system in Java" can help you solve the problem.
Develop a book lending system for the book reading room, which can save up to 50 books to realize the management of books. The book lending system has the following main functions.
U function
Lend out the ranking list
New books
View Books
Delete a book
Lend books
Return the book
Quit
Package com.daiinfo.seninorjava.ken8.implentment.utils;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Scanner;public class Bookborrowing {public static void main (String [] args) {int [] states=new int [50]; / Book Lending status 0: lent out, 1: available int [] counts=new int [50]; / / number of Book Lending String [] name=new String [50] / / Book name String [] dates=new String [50]; / / Book date / / initialize Book states [0] = 0; counts [0] = 15; name [0] = "data structure"; dates [0] = "2018-7-15"; states [1] = 1; counts [1] = 12; name [1] = "Database" Dates [1] = null; states [2] = 2; counts [2] = 30; name [2] = "discrete mathematics"; dates [2] = null; / / appearance interface Scanner input=new Scanner (System.in); int num=-1;// user enters 0 to return to the main menu boolean flage=false / / record whether the user exits the system, true: quit, false: do not quit do {System.out.println ("* *"); System.out.println ("1, add books"); System.out.println ("2, view books") System.out.println (3, delete books); System.out.println (4, lend books); System.out.println (5, return books); System.out.println (6, quit); int choose=input.nextInt (); switch (choose) {case 0: int number=0 For (; name [number]! = null;number++) {} / / find the total number of current titles int [] sortBook=new int [number]; printBook (name,counts,number,sortBook); break Case 1: System.out.println ("- > add Books"); int astat0; for (; a
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.