Guest User

Untitled

a guest
Apr 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. ublic int artikelNr, lagerzeit;
  2. public double preis, handelsspanne, mwst;
  3. public String bezeichnung;
  4.  
  5.  
  6. public Artikel(int artikelNr, int lagerzeit, double preis, String bezeichnung) {
  7. this.artikelNr = artikelNr;
  8. this.bezeichnung = bezeichnung;
  9. this.lagerzeit = lagerzeit;
  10. this.preis = preis;
  11. handelsspanne = 0.6;
  12. mwst = 0.19;
  13. }
  14. public void anzeigen() {
  15. System.out.println(""+bezeichnung+", EK-Preis: "+preis+"€, VK-Preis: "+berechneVerkaufspreis()+" , Lagerzeit: "+lagerzeit+" Monate, Art-Nr.: "+artikelNr+"");
  16. }
  17. public int berechneVerkaufspreis() {
  18. return (int) ((preis * (1 + handelsspanne)) * (1 + mwst));
  19. }
Add Comment
Please, Sign In to add comment