package shoppingSystem;
public class Shop {
private Customer name;
private int taxrate;
private int money;
boolean monday = false;
boolean tuesday = false;
boolean wednesday = false;
boolean thursday = false;
boolean friday = false;
boolean saturday = false;
boolean sunday = false;
private double price;
private double revenue;
private boolean walletmoney;
private boolean creditcard;
Customer customer;
Visit visit;
Shop
(String n,
String op,
int tx,
boolean walletmoney,
boolean creditcard
) { setShopName(n);
setOpenDays(op);
setTaxrate(tx);
writeOpenDaysInBoolean(op);
setRevenue(0);
opendays = opendays.replaceAll("Mo", "Monday");
opendays = opendays.replaceAll("Tu", "Tuesday");
opendays = opendays.replaceAll("We", "Wednesday");
opendays = opendays.replaceAll("Th", "Thursday");
opendays = opendays.replaceAll("Fr", "Friday");
opendays = opendays.replaceAll("Sa", "Saturday");
opendays = opendays.replaceAll("Su", "Sunday");
}
return shopname;
}
public void setShopName
(String shopName
) { this.shopname = shopName;
}
return opendays;
}
public void setOpenDays
(String opendays
) { this.opendays = opendays;
}
public int getTaxrate() {
return taxrate;
}
public void setTaxrate(int taxrate) {
this.taxrate = taxrate;
}
public double showWalletmoney() {
return showWalletmoney();
}
public Customer getName() {
return name;
}
public void setRevenue(double revenue) {
this.revenue = revenue;
}
public double getRevenue() {
return revenue;
}
public int getMoney() {
return money;
}
public void setMoney(int money) {
this.money = money;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public boolean isWalletmoney() {
return walletmoney;
}
public void setWalletmoney(boolean walletmoney) {
this.walletmoney = walletmoney;
}
public boolean isCreditcard() {
return creditcard;
}
public void setCreditcard(boolean creditcard) {
this.creditcard = creditcard;
}
return shopname;
}
public void setShopname
(String shopname
) { this.shopname = shopname;
}
public void writeOpenDaysInBoolean
(String opendays
) {
String[] openDaysArray
= opendays.
split(",");
for (String openDay
: openDaysArray
) {
switch (openDay) {
case "Mo":
monday = true;
break;
case "Tu":
tuesday = true;
break;
case "We":
wednesday = true;
break;
case "Th":
thursday = true;
break;
case "Fr":
friday = true;
break;
case "Sa":
saturday = true;
break;
case "Su":
sunday = true;
break;
}
}
}
public void showInformations() {
"Shopname : " + getShopName() + " OpenDays :" + getOpendays() + " TaxRate " + getTaxrate() + "%");
}
public String publishSalesnumbers
() {
return "Shop " + getShopName
() + " revenue is = " + Math.
round(getRevenue
() * 100.0) / 100.0; }
}