-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProduct.java
60 lines (47 loc) · 1.61 KB
/
Product.java
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
56
57
58
59
60
public class Product {
private String name;
private double price;
private int level;
// to initialze products;
public void initialize(String n, double p, int l){
setName(n);
setPrice(p);
setLevel(l);
}
// to set the name of a product;
public void setName(String n){
name = n;
}
// to set price of a product;
public void setPrice(double p){
price = p;
}
// to setLevel of a product;
public void setLevel(int l){
level = l;
}
//public void setManaCost(int m){ manaCost = m;}
// to return the name of a product;
public String getName() { return name;}
// to return the price of a product;
public double getPrice() { return price;}
// to return the level of a product;
public int getLevel() { return level;}
// to return the type of a product;
public String get_type(){
return null;
}
//public int getManaCost(){ return manaCost;}
//to print the information that a hero cannot buy a product because its level isn't high enough;
public void levelCannotBuy(){
System.out.println("Sorry, your level isn't high enough, you couldn't buy this product.");
}
//to print the information that a hero cannot use a product because its level isn't high enough;
public void levelCannotUse(){
System.out.println("Sorry, your level isn't high enough, you couldn't use this product.");
}
// to print the title of the information of a product;
public void print_title(){}
// to print information of a product;
public void print_info(){}
}