Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
k2022
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
tie
ohj2
esimerkit
k2022
Commits
6039271f
Commit
6039271f
authored
3 years ago
by
Vesa Lappalainen
Browse files
Options
Downloads
Patches
Plain Diff
Kirjeita joulupukille jasenet-luokasta
parent
69a60e3b
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
luennot/live13/src/kerho/Jasenet.java
+36
-0
36 additions, 0 deletions
luennot/live13/src/kerho/Jasenet.java
with
36 additions
and
0 deletions
luennot/live13/src/kerho/Jasenet.java
0 → 100644
+
36
−
0
View file @
6039271f
package
kerho
;
/**
* Kopioi CRC-kortin tietoja tähän
* @author vesal
* @version 22.2.2021
*/
public
class
Jasenet
{
/**
* @param args ei käytössä
*/
public
static
void
main
(
String
[]
args
)
{
Jasenet
jasenet
=
new
Jasenet
();
Jasen
aku
=
new
Jasen
();
Jasen
aku2
=
new
Jasen
();
aku
.
rekisteroi
();
aku
.
vastaaAkuAnkka
();
aku2
.
rekisteroi
();
aku2
.
vastaaAkuAnkka
();
jasenet
.
lisaa
(
aku
);
jasenet
.
lisaa
(
aku2
);
System
.
out
.
println
(
"============= Jäsenet testi ================="
);
for
(
int
i
=
0
;
i
<
jasenet
.
getLkm
();
i
++)
{
Jasen
jasen
=
jasenet
.
anna
(
i
);
System
.
out
.
println
(
"Jäsen indeksi: "
+
i
);
jasen
.
tulosta
(
System
.
out
);
}
}
}
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