Gitlab@Informatics
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
6
65160386-Git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
65160386
65160386-Git
Commits
61cad58e
Commit
61cad58e
authored
2 years ago
by
65160386
Browse files
Options
Downloads
Patches
Plain Diff
add class Dog and test class
parent
5ed5ea4d
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Dog.java
+20
-0
20 additions, 0 deletions
src/Dog.java
src/Main.java
+2
-2
2 additions, 2 deletions
src/Main.java
with
22 additions
and
2 deletions
src/Dog.java
0 → 100644
+
20
−
0
View file @
61cad58e
public
class
Dog
extends
Pet
{
public
Dog
()
{
super
();
// TODO Auto-generated constructor stub
}
public
Dog
(
String
name
,
String
color
)
{
super
(
name
,
color
);
// TODO Auto-generated constructor stub
}
@Override
public
String
voice
()
{
// TODO Auto-generated method stub
return
"bruk bruk"
;
}
}
This diff is collapsed.
Click to expand it.
src/Main.java
+
2
−
2
View file @
61cad58e
...
...
@@ -2,8 +2,8 @@
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
Pet
p
=
new
Pet
(
"jeemz"
,
"white"
);
System
.
out
.
print
(
"
Pet
name is "
+
p
.
getName
()
+
" color is "
+
p
.
getColor
()
+
" sound is "
+
p
.
voice
());
Pet
p
=
new
Dog
(
"jeemz"
,
"white"
);
System
.
out
.
print
(
"
Dog
name is "
+
p
.
getName
()
+
" color is "
+
p
.
getColor
()
+
" sound is "
+
p
.
voice
());
}
...
...
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