Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Campus Hack 19
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kd1u18
Campus Hack 19
Commits
2a3891cc
Commit
2a3891cc
authored
6 years ago
by
mq1g18
Browse files
Options
Downloads
Patches
Plain Diff
Added java files for Activity, Event and Complaint
parent
2c004e31
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Activity.java
+33
-0
33 additions, 0 deletions
Activity.java
Complaint.java
+13
-0
13 additions, 0 deletions
Complaint.java
Event.java
+47
-0
47 additions, 0 deletions
Event.java
with
93 additions
and
0 deletions
Activity.java
0 → 100644
+
33
−
0
View file @
2a3891cc
import
java.util.ArrayList
;
public
abstract
class
Activity
{
// private String type;
private
String
title
;
protected
ArrayList
<
Group
>
groups
;
private
String
description
;
private
User
host
;
public
Activity
(
/*String type,*/
String
title
,
String
description
,
User
host
){
/*this.type = type;*/
this
.
title
=
title
;
this
.
description
=
description
;
this
.
host
=
host
;
groups
=
new
ArrayList
<
Group
>();
}
ArrayList
<
Group
>
getGroups
(){
return
groups
;
}
String
getTitle
(){
return
title
;
}
User
getHost
(){
return
host
;
}
String
getDescription
(){
return
description
;
}
}
This diff is collapsed.
Click to expand it.
Complaint.java
0 → 100644
+
13
−
0
View file @
2a3891cc
import
java.util.Date
;
public
class
Complaint
extends
Activity
{
private
boolean
anonymous
;
public
Complaint
(
/*String type,*/
String
title
,
String
description
,
User
host
,
boolean
anonymous
){
super
(
/*type,*/
title
,
description
,
host
);
this
.
anonymous
=
anonymous
;
}
boolean
getAnonymous
(){
return
anonymous
;
}
}
This diff is collapsed.
Click to expand it.
Event.java
0 → 100644
+
47
−
0
View file @
2a3891cc
import
java.util.ArrayList
;
import
java.util.Date
;
public
class
Event
extends
Activity
{
Date
date
;
String
location
;
public
Event
(
/*String type,*/
String
title
,
String
description
,
User
host
,
Date
date
,
String
location
){
super
(
/*type,*/
title
,
description
,
host
);
this
.
date
=
date
;
this
.
location
=
location
;
}
void
addGroup
(
Group
group
){
groups
.
add
(
group
);
}
void
addGroups
(
ArrayList
<
Group
>
groupsToAdd
){
groupsToAdd
.
forEach
((
g
)
->
groups
.
add
(
g
));
/*for (Group g : groupsToAdd){
groups.add(g);
}*/
}
void
removeGroup
(
Group
group
){
groups
.
remove
(
group
);
}
void
removerGroups
(
ArrayList
<
Group
>
groupsToRemove
){
groupsToRemove
.
forEach
((
g
)
->
groups
.
remove
(
g
));
}
void
setDate
(
Date
date
){
this
.
date
=
date
;
}
Date
getDate
(){
return
date
;
}
void
setLocation
(
String
location
){
this
.
location
=
location
;
}
String
getLocation
(){
return
location
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment