Skip to content

Instantly share code, notes, and snippets.

@pablovillacanas
Created June 15, 2018 14:04
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 pablovillacanas/546f05d695a609b2703b69c4556f64dd to your computer and use it in GitHub Desktop.
Save pablovillacanas/546f05d695a609b2703b69c4556f64dd to your computer and use it in GitHub Desktop.
public class Comida{
int cantidadPasta;
int cantidadSalsaTomate;
int cantidadAtun;
int cantidadCarne;
int cantidadMerluza;
int cantidadGuidantes;
//Constructores + Getters_Setters
double calcularPrecio(){
return 0.89 cantidadPasta +
0.40 cantidadSalsaTomate +
0.60 cantidadAtun +
1.23 cantidadCarne +
0.54 cantidadMerluza +
0.10 cantidadGuidantes +
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment