Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace RegularExam_UASD
- {
- internal class Coffee
- {
- private string type;
- private double price;
- public Coffee()
- {
- }
- public Coffee(string type, double price)
- {
- Type = type;
- Price = price;
- }
- public string Type
- {
- get
- {
- return type;
- }
- set
- {
- type = value;
- }
- }
- public double Price
- {
- get
- {
- return price;
- }
- set
- {
- price = value;
- }
- }
- public override string ToString()
- {
- return $"Coffee {Type} costs {Price:F2} lv.";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement