Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Text;
- using Unit4;
- using Unit4.CollectionsLib;
- namespace Lab4
- {
- //Q6
- public class Flower
- {
- private string name;
- private string type;
- private double price;
- public Flower(string name, string type, double price)
- {
- this.name = name;
- this.type = type;
- this.price = price;
- }
- public string Name
- {
- get { return this.name; }
- set { this.name = value; }
- }
- public string Type
- {
- get { return this.type; }
- set { this.type = value; }
- }
- public double Price
- {
- get { return this.price; }
- set { this.price = value; }
- }
- public override string ToString()
- {
- return string.Format("Name: {0} \nType: {1} \nPrice: {2}", this.name, this.type, this.price);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement