FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/flag.java at main · sksalahuddin2828/Java · GitHub
sksalahuddin2828
/
Java
Public
Notifications
You must be signed in to change notification settings
Fork
59
Star
178
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
flag.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (50 loc) · 1.46 KB
Breadcrumbs
Java
/
flag.java
Copy path
File metadata and controls
57 lines (50 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/**
* Flag is a record flagging a potential cheating incident
*
* Version 2.0.1 - 5/31/20 cleanup - added Flag class, catch null pointers
* Version 2.0.2 - 6/5/20 print cleanup - added equals for red flag searches
*
*/
public
class
Flag
{
// No username as it will be held by a particular user
private
Problem
problem
;
// problem where cheating occurred (e.g. Ex 12:18)
private
String
reason
;
// description of type of cheating (e.g. "Tries")
/**
* Construct cheating Flag from the problem and reason
*
* @param problem
* @param reason
*/
public
Flag
(
Problem
problem
,
String
reason
) {
super
();
this
.
problem
=
problem
;
this
.
reason
=
reason
;
}
public
Problem
getProblem
() {
return
this
.
problem
;
}
public
void
setProblem
(
Problem
problem
) {
this
.
problem
=
problem
;
}
public
String
getReason
() {
return
this
.
reason
;
}
public
void
setReason
(
String
reason
) {
this
.
reason
=
reason
;
}
@
Override
public
String
toString
() {
return
this
.
problem
+
this
.
reason
;
}
@
Override
/**
* Flag.equals compares the reason only
* This is used to check if a "red flag" has already been filed so problem is not desired
*/
public
boolean
equals
(
Object
o
) {
if
(
o
==
this
)
return
true
;
Flag
f
= (
Flag
)
o
;
return
(
f
.
getReason
() ==
this
.
getReason
());
}
}
Back
|
FazBrowse Home
|
New Git URL