个人通讯录管理系统,java源代码.docxVIP

  • 24
  • 0
  • 约1.88千字
  • 约 4页
  • 2020-08-31 发布于天津
  • 举报
* 业务类 */ public class PABmanager { /** * 系统启动 */ public static void main(String[] args) { Scanner input = new Scanner(System.in); UserDao userDao = new UserDaoImpl(); TypeDao typeDao = new TypeDaoImpl(); PersonDao personDao = new PersonDaoImpl(); String in = input.next(); if (1.equals(in)) { boolean islogin = userDao.login(); if(islogin){ }else{ System.exit(-1); } }else if (2.equals(in)) { boolean modiFlag = userDao.modify(); if(modiFlag){ }else{ } System.exit(-1); }else{ System.exit(-1); } while(true){ String in2 = input.next(); if (1.equals(in2)) { while(true){ String num = input.next(); if (1.equals(num)) { String lbmc = input.next(); String lbsm = input.next(); String lbbz = input.next(); Type type = new Type(lbmc,lbsm,lbbz); typeDao.createType(type); }else if (2.equals(num)) { ListType types = typeDao.queryType(); for (int i = 0; i types.size(); i++) { Type type =types.get(i); } } }else if (3.equals(num)) { String lbmc = input.next(); Type type = new Type(lbmc,null,null); typeDao.deleteType(type); }else if (4.equals(num)) { break; }else{ } } }else if (2.equals(in2)) { while(true){ String num = input.next(); if (1.equals(num)) { String lb = input.next(); String xm = input.next(); String dh = input.next(); String sjh = input.next(); String gzdw = input.next(); String zz = input.next(); String yzbm = input.next(); } } Person person = new Person(lb,xm,dh,sjh,gzdw,zz,yzbm); personDao.createPerson(person); }else if (2.equals(num)) { String name = input.next(); Person p = personDao.queryPerson(name); }else if (3.equals(num)) { int id = input.nextInt(); String item = input.next(); String val = input.next(); personDao.updatePerson(id,item, val); }else if (4.equals(num)) { String name = input.next(); personDao.deletePerson(name); }else if (5.equals(num)) { break; }else{ } } }else if (3.equals(in2)) { System.exit(-1); }else{

文档评论(0)

1亿VIP精品文档

相关文档