当前位置:网站首页>Small exercise of library management system
Small exercise of library management system
2022-07-06 13:08:00 【犇犇犇犇犇犇犇】
Do a small exercise of library management to summarize the grammar knowledge learned before .
This exercise , We only pay attention to how the framework is formed , Do not pay attention to the implementation of business logic .
The first step is to abstract the object of book
What are the attributes of books :
Title , The author's name , The price of books , The type of book , Whether to be lent
How to store these books ?
Create a bookshelf class ,
The number of books , What books are there
Simultaneous use idea Generate set、get Method , Construction method ( There is no need to add the attribute of whether to be lent , Books are not lent by default ), And rewrite toString Method .
The second step is to operate the books on the bookshelf
When we look for a book , You need to return the attributes of the book by subscript
When we want to add / When deleting a book , You need to set the properties of a book and add the location
So we need to deal with books Array and useSize Conduct set and get operation .


We can write all operations on bookshelves in this class , But for the convenience of later operation, I will create an additional package to set up the operation of the bookshelfThe third step is to manage the bookshelf
- Look for books
- New books
- Delete books
- Show books
- Exit the system
Because these operations are all for bookshelves , So use an interface to standardize them

Step 4: the administrator operates the menu to realize

Step 5: integrate them all

Step 6 implementation of business logic ( I only implement a display book )

The results of the implementation page are as follows :
I made some display changes , hold User On the menu hello Change to login , Then a separation line is added to the operation .
This is to build a library management system ( Simple version of ) All the steps of , I upload the code to git The above , Self access required , About the implementation of other business logic, the file I uploaded the day before yesterday is . Code link
modify : I added BF Algorithm and KMP Algorithm, just click in as usual
边栏推荐
- [算法] 剑指offer2 golang 面试题13:二维子矩阵的数字之和
- How do architects draw system architecture blueprints?
- 记录:Navicat Premium初次无法连接数据库MySQL之解决
- [rtklib 2.4.3 B34] version update introduction I
- [算法] 剑指offer2 golang 面试题10:和为k的子数组
- Compile GDAL source code with nmake (win10, vs2022)
- 十分鐘徹底掌握緩存擊穿、緩存穿透、緩存雪崩
- [GNSS data processing] Helmert variance component estimation analysis and code implementation
- 国企秋招经验总结
- 图书管理系统小练习
猜你喜欢

服务未正常关闭导致端口被占用
![[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积](/img/e0/cea31070d6365eb57013cdead4a175.png)
[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积
![Heap sort [handwritten small root heap]](/img/f0/6efda3c6f499a32671a935dd2f21db.png)
Heap sort [handwritten small root heap]

MySQL 三万字精华总结 + 面试100 问,吊打面试官绰绰有余(收藏系列

Record: the solution of MySQL denial of access when CMD starts for the first time

121 distributed interview questions and answers

RTKLIB: demo5 b34f. 1 vs b33

2022国赛Re1 baby_tree

面渣逆袭:Redis连环五十二问,三万字+八十图详解。
![[算法] 剑指offer2 golang 面试题8:和大于或等于k的最短子数组](/img/8c/1b6ba3b1830ad28176190170c98628.png)
[算法] 剑指offer2 golang 面试题8:和大于或等于k的最短子数组
随机推荐
Tyut Taiyuan University of technology 2022 introduction to software engineering examination question outline
[rtklib] preliminary practice of using robust adaptive Kalman filter under RTK
图书管理系统小练习
Itext 7 生成PDF总结
4.30 dynamic memory allocation notes
Record: solution of 404 error of servlet accessing database in dynamic web project
阿里云微服务(四) Service Mesh综述以及实例Istio
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K
All in one 1405: sum and product of prime numbers
十分钟彻底掌握缓存击穿、缓存穿透、缓存雪崩
分支语句和循环语句
Rt-ppp test using rtknavi
Exception: ioexception:stream closed
The earth revolves around the sun
阿里云微服务(二) 分布式服务配置中心以及Nacos的使用场景及实现介绍
[算法] 剑指offer2 golang 面试题6:排序数组中的两个数字之和
编辑距离(多源BFS)
异常:IOException:Stream Closed
MySQL 30000 word essence summary + 100 interview questions, hanging the interviewer is more than enough (Collection Series
Fgui project packaging and Publishing & importing unity & the way to display the UI