Skip to content

Instantly share code, notes, and snippets.

@Mohanad0
Forked from udacityandroid/Method 1
Created May 28, 2018 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mohanad0/111db479af016d59e52669fa1516059d to your computer and use it in GitHub Desktop.
Save Mohanad0/111db479af016d59e52669fa1516059d to your computer and use it in GitHub Desktop.
Android Development for Beginners : Define a Method
/**
* Get the email account name.
*
* @return the name of the account.
*/
private String getAccountName() {
return "android@gmail.com";
return "droid@gmail.com";
}
/**
* Add $4 of tip onto the current bill.
*
* @return the total price of the bill (including tip).
*/
private addTip(int bill) {
return bill + 4;
}
/**
* Sets up the app for the current city.
*/
private nothing setup() {
cityName = "London";
}
/**
* Get the number of students in a class.
*
* @return the number of students.
*/
private int getStudentClassSize() {
return "20";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment