实现会员注册升级
2016-09-20 17:25
225 查看
public class demo17 { public boolean verify(String pwd,String pwd1,String phone){ Boolean con=false; String[] splitphone=new String[3]; splitphone=phone.split("-",2); if(pwd.length()!=16&&pwd.length()!=18){ System.out.println("身份证号必须是16位或18位"); }else if(pwd1.length()!=11){ System.out.println("手机号必须是11位"); }else if(splitphone[0].length()!=4 && splitphone[0].length()!=7){ System.out.println("座机号码区号必须是4位,电话号码必须是7位"); }else{ System.out.println("注册成功"); con=true; } return con; } }
import java.util.Scanner; public class text17 { public static void main(String[] args) { Scanner input =new Scanner(System.in); demo17 a=new demo17(); String pwd,pwd1,phone; Boolean con=false; do{ System.out.println("******欢迎进入注册系统*******"); System.out.println("请输入身份证号:"); pwd=input.next(); System.out.println("请输入手机号:"); pwd1=input.next(); System.out.println("请输入座机号:"); phone=input.next(); con=a.verify(pwd,pwd1,phone); System.out.println(con); }while(!con); } }
相关文章推荐
- Java 实现会员注册升级 关键代码
- 实现会员注册升级
- java练习--实现会员注册升级
- 15章实现会员注册升级
- 关于javascript实现注册会员时等待时间的功能
- 自然框架开源社区的第一次活动——实现会员注册
- jQuery实现注册会员时密码强度提示信息功能示例
- 【MVC】会员注册/登录,普通验证,会员名是否注册Ajax验证以及会员邮件验证实现原理
- [VB.NET]求如何用VB.NET语言+ACCECC数据库实现一个对会员等级自动升级功能!
- 实现会员注册
- 17.升级我行我素购物管理系统,实现按会员优惠计划进行购物结算
- java-第四章-升级我行我素购物管理系统,实现计算会员折扣
- java-第四章-升级我行我素购物管理系统,实现按照会员优惠计划购物结算
- 【MVC】会员注册/登录,普通验证,会员名是否注册Ajax验证以及会员邮件验证实现原理
- 自然框架开源社区的第一次活动——实现会员注册
- java-第三章-升级我行我素购物管理系统,实现会员信息录入的功能
- 实现会员管理的会员升级规则窗体功能代码(二十一)
- 【MVC】会员注册/登录,普通验证,会员名是否注册Ajax验证以及会员邮件验证实现原理
- ucenter整合uc.php接口,discuz上初次注册会员后,即可实现自动登录的方法
- 微信会员注册开发【带源码】:网页授权,得到code后在当前页面获取openid,js+php实现跨域请求