Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Shop
- {
- class Product
- {
- //полета
- private string name;
- private string code;
- private double price;
- private double quantity;
- //методи
- public Product (string name1, string code1, double price1, double quantity1)
- {
- Name = name1;
- Code = code1;
- Price = price1;
- Quantity = quantity1;
- }
- public string Name
- {
- get
- {
- return name;
- }
- set
- {
- name = value;
- }
- }
- public string Code
- {
- get
- {
- return code;
- }
- set
- {
- code = value;
- }
- }
- public double Price
- {
- get
- {
- return price;
- }
- set
- {
- price = value;
- }
- }
- public double Quantity
- {
- get
- {
- return quantity;
- }
- set
- {
- quantity = value;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment