Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ohj2
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lainejee
ohj2
Commits
d6a029e5
Commit
d6a029e5
authored
1 month ago
by
Jesse Laine
Browse files
Options
Downloads
Patches
Plain Diff
Lisätty tyhjä konstruktori. Tulostusta paranneltu.
parent
f03b4041
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
taidegalleria/Taiteilija.java
+20
-1
20 additions, 1 deletion
taidegalleria/Taiteilija.java
with
20 additions
and
1 deletion
taidegalleria/Taiteilija.java
+
20
−
1
View file @
d6a029e5
...
...
@@ -27,12 +27,31 @@ import java.io.PrintStream;
*/
public
class
Taiteilija
{
private
int
id
=
0
;
private
String
nimi
=
""
;
private
int
syntynyt
=
0
;
private
int
kuollut
=
0
;
private
int
ika
=
0
;
private
String
kansalaisuus
=
""
;
private
String
tyylisuunta
=
""
;
/**
* Muodostaa tyhjnä taiteilijan.
*/
public
Taiteilija
()
{
}
/**
* Tulostetaan taiteilijan tiedot.
* @param out tietovirta johon tulostetaan
*/
public
void
tulosta
(
PrintStream
out
)
{
out
.
println
(
"Hiroshige"
);
out
.
println
(
String
.
format
(
"%03d"
,
id
)
+
" "
+
nimi
);
out
.
println
(
"Syntynyt: "
+
syntynyt
+
" Kuollut: "
+
kuollut
+
" Ikä: "
+
ika
);
out
.
println
(
"Kansalaisuus: "
+
kansalaisuus
+
" Tyylisuunnat: "
+
tyylisuunta
);
}
...
...
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