oparkin

关于我

开发者信息
名称 oparkin
注册时间 Nov. 29, 2010
开发的附加组件数量 0 个附加组件
开发的附加组件平均得分 尚无评分

我所发表的评价

Torrent Freedom Rus - поиск торрентов

评分5星,满分5星

public class Boot{
protected String modellname;
protected String kategorie;
protected double preis;

public Boot(){}

public Boot(String modellname, String kategorie, double preis) {
super();
this.modellname = modellname;
this.kategorie = kategorie;
this.preis = preis;
}

public void setmodellname(String modellname) { this.modellname = modellname; }
public void setkategorie(String kategorie) { this.kategorie = kategorie; }
public void setpreis(double preis) { this.preis = preis; }


public String getmodellname() { return modellname; }
public String getkategorie() { return kategorie; }
public double getpreis() { return preis; }

public String checkZustand(){
if(zustand.equals("neu")){
return "Jo!";
}
return "Ne!";
}
public String checkPreis(){
if(preis <= 110.0){
return "Jo!";
} else {
return "Ne! :(";
}

public String toString() {
System.out.println("\n");
return " Baujahr: " + baujahr + ", Breite: " + breite;
}
}
-----------
import javax.swing.JOptionPane;
public class BootAusgabe extends Boot{
public static void main (String[] args) {
String eingabe;
double eingabe2;

eingabe=JOptionPane.showInputDialog( null, "body", "head", JOptionPane.QUESTION_MESSAGE);
eingabe2=Double.parseDouble(eingabe);
stuhl_eins.preisErhoehen(eingabe2);

Segelboot boot1 = new Segelboot();
boot1.setmodellname("Name");
Sparkonto Konto1 = new Sparkonto ("Alice",11111,1000,2000);
System.out.println(stuhl_eins.toString());
//alternative
JOptionPane.showMessageDialog( null, stuhl_eins.toString(), "Daten", JOptionPane.QUESTION_MESSAGE);
}
}
----
public class Datum {
private int tag;
private int monat;
private int jahr;
public Datum(int tag, int monat, int jahr) {
super();
this.tag = tag;
this.monat = monat;
this.jahr = jahr;
}

public Datum(int ganze){
this.tag = ganze/1000000;
ganze %= 1000000;
this.monat = ganze/10000;
ganze %= 10000;
this.jahr = ganze;
}

public boolean pruefeDatum(){

int[] tagmonat = {0,31,28,31,30,31,30,31,31,30,31,30,31};

return((this.monat <= 12 && this.monat >= 1 && this.tag >= 1
&& (this.tag <= tagmonat[this.monat]) // fьr alle Monate ausser im Schaltjahr
|| (this.monat == 2 &&(this.jahr %4 ==0 && this.jahr %100 != 0 || this.jahr %400 == 0)
&& this.tag<=29)));
}

public Datum(){

}

public int getTag() {
return tag;
}

public int getMonat() {
return monat;
}

public int getJahr() {
return jahr;
}

public void setTag(int tag) {
this.tag = tag;
}

public void setMonat(int monat) {
this.monat = monat;
}


public void setJahr(int jahr) {
this.jahr = jahr;
}

public String toString() {
System.out.println("\n");
return " Baujahr: " + baujahr + ", Breite: " + breite;
}}
-----
public class Motorboot extends Boot{
protected String antrieb;
protected int motorenZahl;

public Motorboot(){}

public Motorboot(String antrieb, int motorenZahl,

String modellname, String kategorie, double preis){

super(modellname, kategorie, preis);
this.antrieb = antrieb;
this.motorenZahl = motorenZahl;
}

public void setantrieb(String antrieb) { this.antrieb = antrieb; }
public void setmotorenZahl(int motorenZahl) { this.motorenZahl = motorenZahl; }


public String getantrieb() { return antrieb; }
public int getmotorenZahl() { return motorenZahl; }
}