Skip to content

Instantly share code, notes, and snippets.

@pradprat
Created May 16, 2018 06:58
Show Gist options
  • Save pradprat/ea2a60595748f9321f3698f610f8ee88 to your computer and use it in GitHub Desktop.
Save pradprat/ea2a60595748f9321f3698f610f8ee88 to your computer and use it in GitHub Desktop.
public class ShopKeeper {
private MobileShop iphone;
private MobileShop samsung;
private MobileShop blackberry;
public ShopKeeper(){
iphone= new Iphone();
samsung=new Samsung();
blackberry=new Blackberry();
}
public void iphoneSale(){
iphone.modelNo();
iphone.price();
}
public void samsungSale(){
samsung.modelNo();
samsung.price();
}
public void blackberrySale(){
blackberry.modelNo();
blackberry.price();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment