Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active March 15, 2025 14:14
Show Gist options
  • Select an option

  • Save udacityandroid/ad088cd4e920f2a2d778 to your computer and use it in GitHub Desktop.

Select an option

Save udacityandroid/ad088cd4e920f2a2d778 to your computer and use it in GitHub Desktop.
Android Development for Beginners : Calculate the Price Method
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private int calculate price(int quantity {
int price = quantity * 5;
return price;
}
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private calculatePrice(int quantity)
int price = quantity * 5;
return price;
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private int calculatePrice(int quantity) {
int price = quantity * 5;
return price;
}
@LimanNet

Copy link
Copy Markdown

C

@sagar98cyber

Copy link
Copy Markdown

Yea, as someone who likes to figure out the answer for myself, I prefer not seeing it in the very first comment. you're a dick @royalbrawler

I would like to give you 10$ to shoot him ?!

@Asadbek-IP

Copy link
Copy Markdown

C

@niranjanneeru

Copy link
Copy Markdown

C

@argupta1109

Copy link
Copy Markdown

C

@saibighnesh

Copy link
Copy Markdown

the answer is c but quantity is a global variable so we don't need to send the parameters while falling the method

@Ali-FF

Ali-FF commented May 24, 2020

Copy link
Copy Markdown

hello who is still doing this today is 24/05/2020 i'm learning the basics,
send me an email to izaneqwan@gmail.com if you want to continue with me

@amalm9479

Copy link
Copy Markdown

It's c

@Anas-jaf

Anas-jaf commented Jun 1, 2020

Copy link
Copy Markdown

c option

@javokhir0415

Copy link
Copy Markdown

cccccccc

@dalila07

Copy link
Copy Markdown

the answer is C

@Javohir27

Copy link
Copy Markdown

C correct

@SultonN

SultonN commented Jul 14, 2020

Copy link
Copy Markdown

c

@prateek-code-22

Copy link
Copy Markdown

Answer C

@princyy18

Copy link
Copy Markdown

C

@Akshat2634

Copy link
Copy Markdown

C

@pro-coder-fast

Copy link
Copy Markdown

option c is correct answer

@Alaaaldeen96

Copy link
Copy Markdown

C

@JamalAlsanabani

Copy link
Copy Markdown

It's C

@Sreekaran1704

Copy link
Copy Markdown

I think the option is C

@Naman7877

Naman7877 commented Jul 22, 2021

Copy link
Copy Markdown

c
because fulfill all requirements of a method in java

@jitendrakohar

Copy link
Copy Markdown

Dear sir , the option A and B are wrong answer and the option 3 are right answer

@Emranoo89

Copy link
Copy Markdown

C

Because Fulfill all requirements of a method in java

@vivektarun

Copy link
Copy Markdown

c

@king-martinien

Copy link
Copy Markdown

C

@Harriskobia

Copy link
Copy Markdown

Option C is correct

@JuniiiSays

Copy link
Copy Markdown

Why you guys are answering here. Because of you the new students will not be able to practice there newly acquired code reading skills.

@sherifs121

Copy link
Copy Markdown

option cuiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii is correct

@sachinbhujbal

Copy link
Copy Markdown

Option C:

@Kipronopeter

Copy link
Copy Markdown

option C

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