zadaciZaSamostalanRad.Predavanje.7.1.15-源码

上传者: 42160278 | 上传时间: 2021-07-02 11:03:00 | 文件大小: 18KB | 文件类型: ZIP
给出了Person和PhonebookApp类(见附加链接)。 通过使用插入排序按名字和姓氏对人数进行排序,实现PhonebookApp类的sortByFirstName和sortByLastName方法 注意姓氏“Hodžić”下的结果。 sortByFirstName行并再次查看具有相同姓氏的结果。 你注意到了什么? 您如何描述这种排序功能? 如果我们使用选择或冒泡排序,是否会发生同样的效果? 还提供了一个Comparator接口。 在PhonebookApp类中,添加sortWithComparator方法,该方法接收两个参数:人员数组和实现Comparator接口的类的对象。 通过将sortWithComparator与两个不同的比较器一起使用,使用sortByFirstName和sortByLastName进行sortWithComparator :一个比较名字,另一个比较姓

文件下载

资源详情

[{"title":"( 20 个子文件 18KB ) zadaciZaSamostalanRad.Predavanje.7.1.15-源码","children":[{"title":"zadaciZaSamostalanRad.Predavanje.7.1.15-master","children":[{"title":"src","children":[{"title":"zadatak3","children":[{"title":"Comparator.java <span style='color:#111;'> 478B </span>","children":null,"spread":false},{"title":"LastNameComparatorClass.java <span style='color:#111;'> 777B </span>","children":null,"spread":false},{"title":"FirstNameComparatorClass.java <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"Person.java <span style='color:#111;'> 574B </span>","children":null,"spread":false},{"title":"PhoneBookApp.java <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false}],"spread":true},{"title":"zadatak1","children":[{"title":"Comparator.java <span style='color:#111;'> 420B </span>","children":null,"spread":false},{"title":"Person.java <span style='color:#111;'> 540B </span>","children":null,"spread":false},{"title":"PhoneBookApp.java <span style='color:#111;'> 3.19KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"zadatak3","children":[{"title":"PhoneBookApp.class <span style='color:#111;'> 3.74KB </span>","children":null,"spread":false},{"title":"FirstNameComparatorClass.class <span style='color:#111;'> 716B </span>","children":null,"spread":false},{"title":"Comparator.class <span style='color:#111;'> 168B </span>","children":null,"spread":false},{"title":"LastNameComparatorClass.class <span style='color:#111;'> 712B </span>","children":null,"spread":false},{"title":"Person.class <span style='color:#111;'> 1008B </span>","children":null,"spread":false}],"spread":true},{"title":"zadatak1","children":[{"title":"PhoneBookApp.class <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"Comparator.class <span style='color:#111;'> 168B </span>","children":null,"spread":false},{"title":"Person.class <span style='color:#111;'> 1008B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 301B </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 587B </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":".project <span style='color:#111;'> 398B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明