Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Product {
- private int catId;
- private int channelPrice;
- public Product(int catId) {
- this.catId = catId;
- this.channelPrice = -1;
- }
- public Product(int catId, int channelPrice) {
- this.catId = catId;
- this.channelPrice = channelPrice;
- }
- }
- class Category {
- private int id;
- private Category parent;
- private int price;
- public Category(int id, Category parent) {
- this.id = id;
- this.parent = parent;
- this.price = -1;
- }
- public Category(int id, Category parent, int price) {
- this.id = id;
- this.parent = parent;
- this.price = price;
- }
- public int getPrice() {
- return this.price;
- }
- public void setPrice(int price) {
- this.price = price;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement