Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Product
- {
- private Stringname;
- private int quantity;
- private double price;
- public Product(Stringname, int quantity, double price){
- this.name = name;
- this.quantity = quantity;
- this.price = price;
- public void setName(Stringname)
- {
- this.name = name;
- }
- public String getName()
- {
- return name;
- }
- public void setQuantity(int quantity)
- {
- this.quantity = quantity;
- }
- public String getQuantity()
- {
- return quantity;
- }
- public void setPrice(double price)
- {
- this.price = price;
- }
- public String getPrice()
- {
- return price;
- }
- }
- }
Add Comment
Please, Sign In to add comment