public class Advertising extends Object
Constructor and Description |
---|
Advertising(Customer customer,
Date date,
String adNumber)
Creates a new advertising for the given customer, which is valid for the given date and has the specified identity
number.
|
Modifier and Type | Method and Description |
---|---|
void |
addArticle(Article article,
double reduced)
Adds an article with an reduced price to the advertising.
|
String |
getAdNumber()
Returns the ad number.
|
Article |
getArticle(int index)
Returns the article at the given index.
|
int |
getArticleCount()
Returns the number of articles in this ad.
|
double |
getArticleReducedPrice(int index)
Returns the reduced price for the article at the given index.
|
Customer |
getCustomer()
Returns the customer assigned to the ad.
|
Date |
getDate()
Returns the date, when this ad was issued.
|
void |
removeArticle(Article article)
Removes the article from this advertising.
|
public Advertising(Customer customer, Date date, String adNumber)
customer
- a reference to an customerdate
- the dateadNumber
- the advertising id-number.public void addArticle(Article article, double reduced)
article
- the reference to the article.reduced
- the reduced price.public void removeArticle(Article article)
article
- the article.public Article getArticle(int index)
index
- the index.public double getArticleReducedPrice(int index)
index
- the index of the articlepublic int getArticleCount()
public Customer getCustomer()
public Date getDate()
public String getAdNumber()