Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zoo_thomas_barraclough
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
thomas.barraclough
zoo_thomas_barraclough
Commits
580246cd
Commit
580246cd
authored
May 10, 2020
by
Tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parents
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
0 deletions
+154
-0
.classpath
Zoo_Thomas_Barraclough/.classpath
+10
-0
.gitignore
Zoo_Thomas_Barraclough/.gitignore
+1
-0
.project
Zoo_Thomas_Barraclough/.project
+17
-0
org.eclipse.jdt.core.prefs
Zoo_Thomas_Barraclough/.settings/org.eclipse.jdt.core.prefs
+14
-0
animals.java
Zoo_Thomas_Barraclough/src/animals.java
+41
-0
methods.java
Zoo_Thomas_Barraclough/src/methods.java
+12
-0
zoo.java
Zoo_Thomas_Barraclough/src/zoo.java
+59
-0
No files found.
Zoo_Thomas_Barraclough/.classpath
0 → 100644
View file @
580246cd
<?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/jdk-13.0.2"
>
<attributes>
<attribute
name=
"module"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
Zoo_Thomas_Barraclough/.gitignore
0 → 100644
View file @
580246cd
/bin/
Zoo_Thomas_Barraclough/.project
0 → 100644
View file @
580246cd
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
Zoo_Thomas_Barraclough
</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>
Zoo_Thomas_Barraclough/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
580246cd
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=12
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=12
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.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=12
Zoo_Thomas_Barraclough/src/animals.java
0 → 100644
View file @
580246cd
import
java.util.ArrayList
;
public
class
animals
{
String
species
;
String
food
;
String
enviroment
;
String
type
;
ArrayList
<
animals
>
animalsArray
=
new
ArrayList
<
animals
>();
public
animals
(
String
species
,
String
food
,
String
enviroment
,
String
type
)
{
this
.
species
=
species
;
this
.
food
=
food
;
this
.
enviroment
=
enviroment
;
this
.
type
=
type
;
}
public
void
addAnimal
(
animals
ann
)
{
animalsArray
.
add
(
ann
);
}
public
void
allAnimals
()
{
animals
lion
=
new
animals
(
"Lion"
,
"Meat"
,
"Grasslands"
,
"Mammal"
);
addAnimal
(
lion
);
System
.
out
.
print
(
species
);
}
}
Zoo_Thomas_Barraclough/src/methods.java
0 → 100644
View file @
580246cd
import
java.util.ArrayList
;
public
class
methods
{
public
void
allAnimals
()
{
}
}
Zoo_Thomas_Barraclough/src/zoo.java
0 → 100644
View file @
580246cd
import
java.util.Arrays
;
import
java.util.Scanner
;
public
class
zoo
{
static
Scanner
input
=
new
Scanner
(
System
.
in
);
public
static
void
main
(
String
[]
args
)
{
int
w
=
1
;
while
(
w
==
1
)
{
int
menuChoice
;
methods
zoo
=
new
methods
();
//Creating the menu screen
System
.
out
.
print
(
"York St John Zoo: Menu\n\nPlease select the number of the section you would like to view!\n\n1: View Individual Animal.\n2. Display"
+
" the details of each animal.\n3. View animal of particular type.\n4. Display the food required for all animals.\n5. Exit program\n"
);
menuChoice
=
input
.
nextInt
();
switch
(
menuChoice
)
{
case
1
:
case
2
:
zoo
.
allAnimals
();
break
;
case
3
:
case
4
:
break
;
case
5
:
System
.
out
.
println
(
"\nExiting Program!"
);
System
.
exit
(
0
);
}
}}
}
\ No newline at end of file
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