汽车票价计算

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 车票价格计算
{
    public class Ticket
    {
        private double _juli;
        public double Juli { get { return _juli; } set { if (value > 0) { _juli = value; } else { _juli = 0; } } }
        private double _money;
        public double Money { get { return _money; } set { if (value > 0) { _money = value; } else { _money = 0; } } }
        public void Piaojia()
        {
           
            if(0<=this.Juli& this.Juli <= 100)
            {
                this.Money = this.Juli * 1;
            }
            else if(101<= this.Juli & this.Juli <= 200)
            {
                this.Money= this.Juli * 0.95;
            }
            else if(201<= this.Juli & this.Juli <= 300)
            {
                this.Money = this.Juli * 0.9;
            }
            else
            {
                this.Money = this.Juli * 0.8;
            }
            Console.WriteLine("票价为:{0}",this.Money);
        }
        public Ticket(double juli)
        {
            this.Juli = juli;
        }
    }
    internal class Program
    {
        static void Main(string[] args)
        {
            Ticket ticket = new Ticket(200);
            ticket.Piaojia();
            Console.ReadLine();
            //
        }
    }
}