欢迎来到天天文库
浏览记录
ID:30777498
大小:109.50 KB
页数:16页
时间:2019-01-03
《javadvd迷你管理系统》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、javaDVD迷你管理系统PublicclassDVDset{String[]name=newString[50];Int[]state=newint[50];String[]date=newString[50];So,int[]count=newint[50ImporttheJava・Uti1.Scanner;ImporttheJava・Util.Date;ImporttheJava・Text・SimpleDateFormat:PublicclassDVDmgr{DVDsetDVD=newDVDset();//initializetheDVD's
2、information,includingtheDVD'sname,state(whetheritislent),theloandate,thenumberofborrowed,theDVD.State=1meansthatitisnotlent,and0islentoutPublicvoidinitial(){DVD.Name[0]="Romanholiday";DVD.State[0]=1;DVD.Date[0]二〃;DVD.Count[0]=0;DVD.Name[1]二"jittery";DVD.State[1]=1;DVD.Date[1]二
3、〃;DVD.Count[1]=0;DVD.Name[2]二z,romanticfullhouse";DVD.State[2]二1;DVD.Date[2]二〃;DVD.Count[2]=0;}themethod//themainmenu,andcalleachpieceofPublicvoidmenu(){(“welcometominiDVDmanager“);Itsnotagoodidea.A.out.println1.A.out・printin(〃2.〃)A.out・printin(〃3.delete“);A.out.println4.A.out
4、・printin(〃5.A.out・printin(〃6〃);A.out・printin(〃7.It'snotagoodidea.Scannerinput二newScanner(System・In);(“pleasechoose:“)Intchoose二input.nextint();Theswitch(choose){Case1:add();Break;Case2:chakan();Break;Case3:thedelete();Break;Case4:jie();Break:Case5:huan();Break;Case6:paihang();
5、Break;()1.Break;}}//checkouttheDVDmethodPublicvoidchakan(){Scannerinput二newScanner(System・In);TheSystem・out・printin(“serialnumbertstatetnametloandate“);For(int1=0;I6、ofprint・}TheSystemisoutofprint(“t〃+DVD.If(DVD.State[叮二=0){TheSystemisoutofprint・}else{A.printb・print(“t〃);}A.out.printin()Thecontinue;A.out.print(“enter0〃);Intanswer二input,nextint();If(answer二二0)Themenu();//thenewDVDmethodPublicvoidtheadd(){〃(〃>〃);Scannerinput二newScanner(Sys7、tem・In);A.out・print(“pleaseenterthename“);For(int1=0;I8、tbedeletedifitislentPublicvoidthedelete(){Seannerinput二newSca
6、ofprint・}TheSystemisoutofprint(“t〃+DVD.If(DVD.State[叮二=0){TheSystemisoutofprint・}else{A.printb・print(“t〃);}A.out.printin()Thecontinue;A.out.print(“enter0〃);Intanswer二input,nextint();If(answer二二0)Themenu();//thenewDVDmethodPublicvoidtheadd(){〃(〃>〃);Scannerinput二newScanner(Sys
7、tem・In);A.out・print(“pleaseenterthename“);For(int1=0;I8、tbedeletedifitislentPublicvoidthedelete(){Seannerinput二newSca
8、tbedeletedifitislentPublicvoidthedelete(){Seannerinput二newSca
此文档下载收益归作者所有