-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp,java
40 lines (31 loc) · 859 Bytes
/
App,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
//app.java
//created by :Daniel Myers
import java.io.Serializable;
public class App extends Product implements Serializable{
private static final long serialVersionUID = 5716688969325492984L;
public enum Type{GAME, PRODUCTIVITY, EDUCATION};
private Type gameType;
private String developer;
public App(String t, double p, Date pD, Type gT, String d) {
super(t, p, pD);
setGameType(gT);
setDeveloper(d);
}
public void setGameType(Type gT){
gameType = gT;
}
// public Type getGameType(){
return gameType;
}
public void setDeveloper(String d){
developer = d;
}
public String getDeveloper(){
return developer;
}
public void setNumberOfSongsPurchased(int nOSP){};
public int getNumberOfSongsPurchased(){return 1;}
public String toString(){
return (super.toString() + " " + getGameType() + " " + getDeveloper());
}
}