如何使用if和else给出书籍限制? [英] how to give book limit using if and else?

查看:84
本文介绍了如何使用if和else给出书籍限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是图书馆管理系统..我想根据他们的会员卡(例如银牌,金牌和铜牌)给予记账限制......我将如何使用if和else编码实现这一目标... 。

my project is of Library management system.. i want to give book limit to the memeber according to their memebership cards (e.g silver, golden and bronze)... how will i achieve this using if and else coding....

推荐答案

如果你在应用程序中无法解决如何做这样的事情,请先手动尝试。

使用一张纸和一支铅笔,并经历借书的过程,在你正在做的事情和你正在检查的每个阶段做笔记。当你经历了很多次,你应该知道你需要什么信息。然后,您可以开始将信息要求和算法转换为计算机特定格式:例如,您是否需要计算他们拥有的书籍数量?可能不是:你可以通过对书籍表的查询来检索它,看看谁借了这个栏目。



这一切都很简单,但是确切的机制将根据您组织数据的方式而有所不同:我会以一种方式组织它,您可能已经组织了另一种方式。
If you can't work out how to do something like this in your application, try it manually first.
Use a sheet of paper and a pencil, and go through the process of borrowing a book, making notes at every stage in what you are doing and what you are checking. When you have run through a number of times, you should have a good idea what information you will need. Then you can start of convert the info requirement and the algorithm to computer specific format: do you need a count of the number of books they have out, for example? Probably not: you can retrieve that with a query against the "books table", looking at the "who has borrowed this" column.

It's all pretty simple, but the exact mechanism will vary depending on how you have organised your data: I would organise it one way, you may already have organised it another.


这篇关于如何使用if和else给出书籍限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆