Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Food {
- private double price = 0.0;
- private double fat = 0.0;
- private double carbs = 0.0;
- private double fiber = 0.0;
- public Food(double price, double fat, double carbs, double fiber) {
- this.price = price;
- this.fat = fat;
- this.carbs = carbs;
- this.fiber = fiber;
- }
- public double getPrice() {
- return price;
- }
- public double getFat() {
- return fat;
- }
- public double getCarbs() {
- return carbs;
- }
- public double getFiber() {
- return fiber;
- }
- }
Add Comment
Please, Sign In to add comment