You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
499 B
Java
23 lines
499 B
Java
3 years ago
|
package com.company.OnlineShop;
|
||
|
|
||
|
public class Book extends Article{
|
||
|
|
||
|
public static double VAT = 0.07;
|
||
|
private String author = "";
|
||
|
private String title = "";
|
||
|
private int year = 0;
|
||
|
|
||
|
public Book(int articleNumber, double price, String author, String title, int year){
|
||
|
super(articleNumber, price);
|
||
|
this.author = author;
|
||
|
this.title = title;
|
||
|
this.year = year;
|
||
|
}
|
||
|
|
||
|
|
||
|
public double getPrice(){
|
||
|
return super.getPrice() + ( VAT + 1);
|
||
|
}
|
||
|
|
||
|
}
|