Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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