- 1、本文档共23页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
北大青鸟 S1 JAVA miniDVD(国外英语资料)
北大青鸟 S1 JAVA miniDVD(国外英语资料)
Import the Java. Util. *;
Import the Java. Text. *;
Public class DVDMgr {
Scanner input = new Scanner (System. In);
DVDSet DVD = new DVDSet ();
Public void initial () {
DVD. Name [0] = Roman holiday;
DVD. State [0] = 0; / / 0 is the loan
DVD. Date [0] = 2007-7-1;
DVD. Name [1] = jittery;
DVD. State [1] = 1; / / 1 does not lend
DVD. Name [2] = romantic full house;
DVD. State [2] = 1; / / 1 does not lend
}
Public void startMenu () {
( welcome to mini DVD manager );
Its a good time to be a real person.
The DVD \ n3. The DVD \ n4. The DVD \ n6.
Its a good time to be a real person.
Scanner input = new Scanner (System. In);
( please choose: )
Int choice = input.nextint ();
The switch (choice) {
Case 1:
( the new DVD here );
The add ();
The System, and it is the first to be used in the country.
ReturnMain ();
Break;
Case 2:
A. out.println ( see DVD here );
Search ().
The System, and it is the first to be used in the country.
ReturnMain ();
Break;
Case 3:
The System is out of the box.
The delete ();
The System, and it is the first to be used in the country.
ReturnMain ();
Break;
Case 4:
( this is the place for lending DVDS );
Lend ();
The System, and it is the first to be used in the country.
ReturnMain ();
Break;
Case 5:
( the DVD is returned here );
The System, and it is the first to be used in the country.
ReturnMain ();
Break;
Case 6:
( thank you for using! )
Break;
}
}
Public void the search () {
The System.out.println ( serial number \ t state \ t \ t \ t loan date );
Int I = 0;
While (DVD. Name [I]! = null) {
String stat = ;
If (DVD. State [I] = = 0) {
Stat = checked out;
} else {
Stat = can borrow;
The DVD.
}
(I + 1) + \ t + stat + \ t
I++;
}
}
Public void the add () {
( please enter the DVD name: )
String newName = input.next ();
For (int I = 0; I DVD.
If (DVD. Name [I] = = null) {
DVD.
DVD. State [I] = 1;
The new + DVD + name [I] + is a success!
Break;
}
}
}
Public void the delete
您可能关注的文档
- 中外广告史简答(国外英语资料).doc
- 中国高速铁路建设规划1(国外英语资料).doc
- 中外美术史(国外英语资料).doc
- 中国顶级企业的短板(国外英语资料).doc
- 中央广播电视大学金融市场第一次作业及答案(国外英语资料).doc
- 中学物理教材教法(国外英语资料).doc
- 中小企业信贷业务的拓展思路及风险识别(国外英语资料).doc
- 中式8球竞赛办法与比赛规则(国外英语资料).doc
- 中枢性高热的处理(国外英语资料).doc
- 中断interrupt using3的解析(国外英语资料).doc
- 2023年盘锦市公务员考试行测真题及答案详解(各地真题).docx
- 2023年武隆县公务员考试行测真题及1套完整答案详解.docx
- 2023年苏州市公务员考试行测真题及答案详解(夺冠).docx
- 2023年甘肃省公务员考试行测真题及答案详解(易错题).docx
- 2023年贵州省公务员考试行测真题(含答案详解).docx
- 2023年汕尾市公务员考试行测真题(含答案详解).docx
- 2023年毕节地区公务员考试行测真题及答案详解(易错题).docx
- 2023年淮南市公务员考试行测真题及答案详解参考.docx
- 2023年赤峰市公务员考试行测真题及答案详解(必刷).docx
- 2023年遂宁市公务员考试行测真题及答案详解(最新).docx
文档评论(0)