Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
week3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quinn.haigh
week3
Commits
6eabb116
Commit
6eabb116
authored
Feb 10, 2020
by
quinn.haigh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit
parents
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
133 additions
and
0 deletions
+133
-0
.classpath
Character/.classpath
+6
-0
.gitignore
Character/.gitignore
+1
-0
.project
Character/.project
+17
-0
org.eclipse.jdt.core.prefs
Character/.settings/org.eclipse.jdt.core.prefs
+11
-0
Character1.java
Character/src/Character1.java
+6
-0
Character2.java
Character/src/Character2.java
+23
-0
CharacterMain1.java
Character/src/CharacterMain1.java
+37
-0
CharacterMain2.java
Character/src/CharacterMain2.java
+32
-0
No files found.
Character/.classpath
0 → 100644
View file @
6eabb116
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
/>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
Character/.gitignore
0 → 100644
View file @
6eabb116
/bin/
Character/.project
0 → 100644
View file @
6eabb116
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
Character
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
Character/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
6eabb116
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Character/src/Character1.java
0 → 100644
View file @
6eabb116
public
class
Character1
{
public
String
firstName
;
public
String
surname
;
};
Character/src/Character2.java
0 → 100644
View file @
6eabb116
public
class
Character2
{
private
String
firstName
;
private
String
surname
;
public
void
setName
(
String
n
)
{
String
[]
names
=
n
.
split
(
" "
);
firstName
=
names
[
0
];
surname
=
names
[
names
.
length
-
1
];
}
public
String
getName
()
{
return
firstName
+
" "
+
surname
;
}
};
Character/src/CharacterMain1.java
0 → 100644
View file @
6eabb116
import
java.util.ArrayList
;
public
class
CharacterMain1
{
public
static
void
main
(
String
[]
args
)
{
ArrayList
<
Character1
>
characters
=
new
ArrayList
<
Character1
>();
Character1
c
=
new
Character1
();
c
.
firstName
=
"Zaphod "
;
c
.
surname
=
"Beeblebrox"
;
characters
.
add
(
c
);
c
=
new
Character1
();
c
.
firstName
=
"Ford "
;
c
.
surname
=
"Prefect"
;
characters
.
add
(
c
);
c
=
new
Character1
();
c
.
firstName
=
"Arthur "
;
c
.
surname
=
"Dent"
;
characters
.
add
(
c
);
c
=
new
Character1
();
c
.
firstName
=
"Deep "
;
c
.
surname
=
"Thought"
;
characters
.
add
(
c
);
c
=
new
Character1
();
c
.
firstName
=
"Tricia "
;
c
.
surname
=
"McMillan"
;
characters
.
add
(
c
);
for
(
Character1
x:
characters
)
{
System
.
out
.
println
(
x
.
firstName
+
x
.
surname
);
}
}
}
Character/src/CharacterMain2.java
0 → 100644
View file @
6eabb116
import
java.util.ArrayList
;
public
class
CharacterMain2
{
public
static
void
main
(
String
[]
args
)
{
ArrayList
<
Character2
>
characters
=
new
ArrayList
<
Character2
>();
Character2
c
=
new
Character2
();
c
.
setName
(
"Zaphod Beeblebrox"
);
characters
.
add
(
c
);
c
=
new
Character2
();
c
.
setName
(
"Ford Prefect"
);
characters
.
add
(
c
);
c
=
new
Character2
();
c
.
setName
(
"Arthur Phillip Dent"
);
characters
.
add
(
c
);
c
=
new
Character2
();
c
.
setName
(
"Deep Thought"
);
characters
.
add
(
c
);
c
=
new
Character2
();
c
.
setName
(
"Tricia McMillan"
);
characters
.
add
(
c
);
for
(
Character2
x:
characters
)
{
System
.
out
.
println
(
x
.
getName
());
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment