-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.java
More file actions
55 lines (45 loc) · 1.06 KB
/
Menu.java
File metadata and controls
55 lines (45 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
public abstract class Menu {
protected String name;
protected String description;
protected double price;
public Menu() {
name = "";
description = "";
price = 0.0;
}
public Menu(String name, String description, double price) {
this.name = name;
this.description = description;
this.price = price;
}
// Getter for 'name'
public String getName() {
return name;
}
// Setter for 'name'
public void setName(String name) {
this.name = name;
}
// Getter for 'description'
public String getDescription() {
return description;
}
// Setter for 'description'
public void setDescription(String description) {
this.description = description;
}
// Getter for 'price'
public double getPrice() {
return price;
}
// Setter for 'price'
public void setPrice(double price) {
this.price = price;
}
public String toString() {
return "Menu => " + name + " <= . It is made up of " +
description + " " +
". And the Price is (" + price + "$)";
}
public abstract double Netcost();
}