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
a8b07c86
Commit
a8b07c86
authored
6 years ago
by
kd1u18
Browse files
Options
Downloads
Patches
Plain Diff
Added functionality to User and Group classes. Edited Complaint class.
parent
2a3891cc
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
Complaint.java
+2
-2
2 additions, 2 deletions
Complaint.java
Group.java
+24
-3
24 additions, 3 deletions
Group.java
User.java
+21
-4
21 additions, 4 deletions
User.java
with
47 additions
and
9 deletions
Complaint.java
+
2
−
2
View file @
a8b07c86
...
...
@@ -7,7 +7,7 @@ public class Complaint extends Activity {
this
.
anonymous
=
anonymous
;
}
boolean
get
Anonymous
(){
boolean
is
Anonymous
(){
return
anonymous
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Group.java
+
24
−
3
View file @
a8b07c86
import
java.util.ArrayList
;
/*
Represents a Group of Users.
*/
public
class
Group
{
int
groupID
;
ArrayList
<
User
>
users
;
private
String
groupID
;
private
ArrayList
<
User
>
users
;
public
void
addUser
(
User
user
)
{
users
.
add
(
user
);
}
public
void
removeUser
(
User
u
)
{
users
.
remove
(
u
);
}
//Getters
public
String
getID
()
{
return
groupID
;
}
public
ArrayList
<
User
>
getUsers
()
{
return
users
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
User.java
+
21
−
4
View file @
a8b07c86
...
...
@@ -6,8 +6,25 @@ import java.util.ArrayList;
public
class
User
{
String
userName
;
String
password
;
String
screenName
;
ArrayList
<
Group
>
groups
;
private
String
userName
;
private
String
password
;
private
String
screenName
;
private
ArrayList
<
Group
>
groups
;
//Class constructor
public
User
(
String
userName
,
String
password
,
String
screenName
)
{
this
.
userName
=
userName
;
this
.
password
=
password
;
this
.
screenName
=
screenName
;
}
//Getters
public
String
getScreenName
()
{
return
screenName
;
}
public
ArrayList
<
Group
>
getGroups
()
{
return
groups
;
}
}
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