Skip to content
Snippets Groups Projects
Commit d6a029e5 authored by Jesse Laine's avatar Jesse Laine
Browse files

Lisätty tyhjä konstruktori. Tulostusta paranneltu.

parent f03b4041
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment