first commit
This commit is contained in:
commit
7815f3620b
10
.classpath
Normal file
10
.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
17
.project
Normal file
17
.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Cmentarz</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
2
.settings/org.eclipse.core.resources.prefs
Normal file
2
.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
12
.settings/org.eclipse.jdt.core.prefs
Normal file
12
.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,12 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
BIN
bin/whychuck/Alejka.class
Normal file
BIN
bin/whychuck/Alejka.class
Normal file
Binary file not shown.
BIN
bin/whychuck/Grob.class
Normal file
BIN
bin/whychuck/Grob.class
Normal file
Binary file not shown.
BIN
bin/whychuck/Lokalizacja.class
Normal file
BIN
bin/whychuck/Lokalizacja.class
Normal file
Binary file not shown.
BIN
bin/whychuck/Main.class
Normal file
BIN
bin/whychuck/Main.class
Normal file
Binary file not shown.
BIN
bin/whychuck/Osoba.class
Normal file
BIN
bin/whychuck/Osoba.class
Normal file
Binary file not shown.
BIN
bin/whychuck/Pracownik.class
Normal file
BIN
bin/whychuck/Pracownik.class
Normal file
Binary file not shown.
BIN
bin/whychuck/Zmarly.class
Normal file
BIN
bin/whychuck/Zmarly.class
Normal file
Binary file not shown.
7
src/whychuck/Alejka.java
Normal file
7
src/whychuck/Alejka.java
Normal file
@ -0,0 +1,7 @@
|
||||
package whychuck;
|
||||
|
||||
class Alejka extends Lokalizacja {
|
||||
Alejka(String nazwa){
|
||||
super.setNazwa(this.nazwa);
|
||||
}
|
||||
}
|
8
src/whychuck/Grob.java
Normal file
8
src/whychuck/Grob.java
Normal file
@ -0,0 +1,8 @@
|
||||
package whychuck;
|
||||
|
||||
class Grob extends Lokalizacja {
|
||||
private int id;
|
||||
private int glebokosc;
|
||||
private Alejka alejka;
|
||||
private String napis;
|
||||
}
|
13
src/whychuck/Lokalizacja.java
Normal file
13
src/whychuck/Lokalizacja.java
Normal file
@ -0,0 +1,13 @@
|
||||
package whychuck;
|
||||
|
||||
abstract class Lokalizacja {
|
||||
protected String nazwa;
|
||||
|
||||
protected String getNazwa() {
|
||||
return nazwa;
|
||||
}
|
||||
|
||||
protected void setNazwa(String nazwa) {
|
||||
this.nazwa = nazwa;
|
||||
}
|
||||
}
|
10
src/whychuck/Main.java
Normal file
10
src/whychuck/Main.java
Normal file
@ -0,0 +1,10 @@
|
||||
package whychuck;
|
||||
|
||||
class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Zmarly zmarly1 = new Zmarly("Adam", "Mickiewicz", 1855);
|
||||
System.out.print(zmarly1);
|
||||
}
|
||||
|
||||
}
|
27
src/whychuck/Osoba.java
Normal file
27
src/whychuck/Osoba.java
Normal file
@ -0,0 +1,27 @@
|
||||
package whychuck;
|
||||
|
||||
abstract class Osoba {
|
||||
protected String imie;
|
||||
protected String nazwisko;
|
||||
private boolean czyZyje;
|
||||
|
||||
protected String getImie() {
|
||||
return imie;
|
||||
}
|
||||
protected void setImie(String imie) {
|
||||
this.imie = imie;
|
||||
}
|
||||
protected String getNazwisko() {
|
||||
return nazwisko;
|
||||
}
|
||||
protected void setNazwisko(String nazwisko) {
|
||||
this.nazwisko = nazwisko;
|
||||
}
|
||||
protected boolean getCzyZyje() {
|
||||
return czyZyje;
|
||||
}
|
||||
protected void setCzyZyje(boolean czyZyje) {
|
||||
this.czyZyje = czyZyje;
|
||||
}
|
||||
|
||||
}
|
20
src/whychuck/Pracownik.java
Normal file
20
src/whychuck/Pracownik.java
Normal file
@ -0,0 +1,20 @@
|
||||
package whychuck;
|
||||
|
||||
class Pracownik extends Osoba {
|
||||
private String stanowisko;
|
||||
|
||||
public Pracownik(String imie, String nazwisko, String stanowisko) {
|
||||
super.setImie(imie);
|
||||
super.setNazwisko(nazwisko);
|
||||
setStanowisko(stanowisko);
|
||||
super.setCzyZyje(true);
|
||||
}
|
||||
|
||||
String getStanowisko() {
|
||||
return stanowisko;
|
||||
}
|
||||
|
||||
void setStanowisko(String stanowisko) {
|
||||
this.stanowisko = stanowisko;
|
||||
}
|
||||
}
|
32
src/whychuck/Zmarly.java
Normal file
32
src/whychuck/Zmarly.java
Normal file
@ -0,0 +1,32 @@
|
||||
package whychuck;
|
||||
|
||||
class Zmarly extends Osoba {
|
||||
private int rokSmierci;
|
||||
private int rokNarodzin;
|
||||
private Lokalizacja lokalizacja;
|
||||
|
||||
private int getRokSmierci() {
|
||||
return rokSmierci;
|
||||
}
|
||||
private void setRokSmierci(int rokSmierci) {
|
||||
this.rokSmierci = rokSmierci;
|
||||
}
|
||||
private int getRokNarodzin() {
|
||||
return rokNarodzin;
|
||||
}
|
||||
private void setRokNarodzin(int rokNarodzin) {
|
||||
this.rokNarodzin = rokNarodzin;
|
||||
}
|
||||
|
||||
public Zmarly(String imie, String nazwisko, int rokSmierci) {
|
||||
super.setImie(imie);
|
||||
super.setNazwisko(nazwisko);
|
||||
setRokSmierci(rokSmierci);
|
||||
super.setCzyZyje(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return(super.getImie() + ' ' + super.getNazwisko() + "\ndata śmierci: " + getRokSmierci());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user