-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.java
More file actions
115 lines (81 loc) · 2.56 KB
/
Game.java
File metadata and controls
115 lines (81 loc) · 2.56 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package src.anearcan;
import java.util.ArrayList;
import java.util.Date;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author anearcan
*/
class Game extends Item{
private String rating;
private String category;
private String developer;
private String publisher;
private ArrayList<String> system; // "PS3"/"Xbox360"/"Wii"
public Game(){
this.setProductID(0);
this.setTitle("");
}
public Game(int id, String title, String genre, Date releaseDate) {
this.setProductID(id);
this.setTitle(title);
this.setGenre(genre);
this.releaseDate = releaseDate;
}
public Game(int id, String title, int rentPrice, int purchasePrice) {
super.setProductID(id);
super.setTitle(title);
super.setRentalPrice(rentPrice);
super.setPurchasePrice(purchasePrice);
}
public Game(String title,int rentPrice, int purchasePrice, String description, String rating, ArrayList<String> console, String genre,
String developer, String publisher) {
super(title, rentPrice, purchasePrice);
}
public Game(int id, String title,int rentPrice, int purchasePrice, String description, String rating,
ArrayList<String> console, String genre,
String developer, String publisher) {
super(id, title, rentPrice, purchasePrice);
}
public Game(int id,String title, String genre, String averageRating, int numTimesChecked, Date releaseDate, ArrayList<String> console) {
super(id, title, genre, releaseDate);
setConsole(console);
}
String getRating(){
return rating;
}
String getDeveloper() {
return developer;
}
String getPublisher() {
return publisher;
}
public ArrayList<String> getConsole() {
return system;
}
public void setConsole(ArrayList<String> system) {
this.system = system;
}
// toString
public String toString() {
return super.toString() + ",Platform: " + this.system;
}
public void setRating(String rating) {
this.rating = rating;
}
public void setCategory(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
public void setDeveloper(String developer) {
this.developer = developer;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
}