Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ublic int artikelNr, lagerzeit;
- public double preis, handelsspanne, mwst;
- public String bezeichnung;
- public Artikel(int artikelNr, int lagerzeit, double preis, String bezeichnung) {
- this.artikelNr = artikelNr;
- this.bezeichnung = bezeichnung;
- this.lagerzeit = lagerzeit;
- this.preis = preis;
- handelsspanne = 0.6;
- mwst = 0.19;
- }
- public void anzeigen() {
- System.out.println(""+bezeichnung+", EK-Preis: "+preis+"€, VK-Preis: "+berechneVerkaufspreis()+" , Lagerzeit: "+lagerzeit+" Monate, Art-Nr.: "+artikelNr+"");
- }
- public int berechneVerkaufspreis() {
- return (int) ((preis * (1 + handelsspanne)) * (1 + mwst));
- }
Add Comment
Please, Sign In to add comment