Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
Zoo Application
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
jake.beetham
Zoo Application
Commits
7b8d39ce
Commit
7b8d39ce
authored
May 04, 2021
by
Jake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First Commit
parents
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
0 deletions
+65
-0
Animals.java
Zoo Application 2/src/Animals.java
+26
-0
Bird.java
Zoo Application 2/src/Bird.java
+10
-0
Fish.java
Zoo Application 2/src/Fish.java
+10
-0
Mammal.java
Zoo Application 2/src/Mammal.java
+9
-0
Reptile.java
Zoo Application 2/src/Reptile.java
+10
-0
Zoo.java
Zoo Application 2/src/Zoo.java
+0
-0
No files found.
Zoo Application 2/src/Animals.java
0 → 100644
View file @
7b8d39ce
public
class
Animals
{
//declaring variables for animal objects
String
animalName
;
String
animalFood
;
String
animalType
;
String
animalEnvironment
;
String
animalDescription
;
//creating a constructor - allows us to write much tidier and easier to follow code
Animals
(
String
animalName
,
String
animalType
,
String
animalFood
,
String
animalEnvironment
,
String
animalDescription
)
{
this
.
animalName
=
animalName
;
this
.
animalType
=
animalType
;
this
.
animalFood
=
animalFood
;
this
.
animalEnvironment
=
animalEnvironment
;
this
.
animalDescription
=
animalDescription
;
}
@Override
public
String
toString
()
{
return
"Animal Name: "
+
animalName
+
", Diet: "
+
animalFood
+
", Animal Type: "
+
animalType
+
", Habitat: "
+
animalEnvironment
+
", Description: "
+
animalDescription
+
"\n"
;
}
}
Zoo Application 2/src/Bird.java
0 → 100644
View file @
7b8d39ce
public
class
Bird
extends
Animals
{
//creating a constructor - allows us to write much tidier and easier to follow code
Bird
(
String
animalName
,
String
animalType
,
String
animalFood
,
String
animalEnvironment
,
String
animalDescription
){
super
(
animalName
,
animalType
,
animalFood
,
animalEnvironment
,
animalDescription
);
}
}
Zoo Application 2/src/Fish.java
0 → 100644
View file @
7b8d39ce
public
class
Fish
extends
Animals
{
//creating a constructor - allows us to write much tidier and easier to follow code
Fish
(
String
animalName
,
String
animalType
,
String
animalFood
,
String
animalEnvironment
,
String
animalDescription
){
super
(
animalName
,
animalType
,
animalFood
,
animalEnvironment
,
animalDescription
);
}
}
Zoo Application 2/src/Mammal.java
0 → 100644
View file @
7b8d39ce
public
class
Mammal
extends
Animals
{
//creating a constructor - allows us to write much tidier and easier to follow code
Mammal
(
String
animalName
,
String
animalType
,
String
animalFood
,
String
animalEnvironment
,
String
animalDescription
){
super
(
animalName
,
animalType
,
animalFood
,
animalEnvironment
,
animalDescription
);
}
}
Zoo Application 2/src/Reptile.java
0 → 100644
View file @
7b8d39ce
public
class
Reptile
extends
Animals
{
//creating a constructor - allows us to write much tidier and easier to follow code
Reptile
(
String
animalName
,
String
animalType
,
String
animalFood
,
String
animalEnvironment
,
String
animalDescription
){
super
(
animalName
,
animalType
,
animalFood
,
animalEnvironment
,
animalDescription
);
}
}
Zoo Application 2/src/Zoo.java
0 → 100644
View file @
7b8d39ce
This diff is collapsed.
Click to expand it.
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