Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[W5.11r][T16-B1] Qiu Haoze #769

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

qiuhaohao
Copy link

Add sort command to addressbook-level3, with test and documentation updated

/**
* Sorts all persons in the list according to their full name
*/
public void sort(){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coding style violation. read this

* Sorts all persons in the list according to their full name
*/
public void sort(){
internalList.sort((person1, person2) -> (person1.getName().fullName.toLowerCase().compareTo(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the difference between using getName() and fullName?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getName() gets a Name object, and fullName, a string, is an attribute of class Name.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and how is a Name object compared?

@madsonic
Copy link

Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants