mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Refactor mark related classes.
- Mark is an abstract class which containing its name and type - Single Mark is a sub class of Mark which containing only one GPS location - Gate Mark is a sub class of Mark which containing two Single Marks #refactor #fix #story[10] #story[11] #story[12]
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package seng302.models.mark;
|
||||
|
||||
/**
|
||||
* An abstract class to represent general marks
|
||||
* Created by Haoming Yin (hyi25) on 17/3/17.
|
||||
*/
|
||||
public abstract class Mark {
|
||||
|
||||
private String name;
|
||||
private MarkType markType;
|
||||
|
||||
/**
|
||||
* Create a mark instance by passing its name and type
|
||||
* @param name the name of the mark
|
||||
* @param markType the type of mark. either GATE_MARK or SINGLE_MARK.
|
||||
*/
|
||||
public Mark (String name, MarkType markType) {
|
||||
this.name = name;
|
||||
this.markType = markType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public MarkType getMarkType() {
|
||||
return markType;
|
||||
}
|
||||
|
||||
public void setMarkType(MarkType markType) {
|
||||
this.markType = markType;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user