Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
congtodien
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace tinhtiendien { class Congtodien : Nguoi { private string maCongTo; public string MaCongTo { get { return maCongTo; } set { maCongTo = value; } } private int chiSoTieuThu; public int ChiSoTieuThu { get { return chiSoTieuThu; } set { chiSoTieuThu = value; } } private DateTime ngayLapDat; public DateTime NgayLapDat { get { return ngayLapDat; } set { ngayLapDat = value; } } private int soTienTra; public int SoTienTra { get { int cstt = this.ChiSoTieuThu; for (int i = 1; i <= this.ChiSoTieuThu; i += 50) { if (i <= 50) { soTienTra = (cstt - (cstt - 50)) * 1500; } else if (i <= 100 && i > 50) { soTienTra += (cstt <= 50) ? cstt * 1700 : 50 * 1700; } else { soTienTra += cstt * 2000; break; } cstt -= 50; } return soTienTra; } set { soTienTra = value; } } public Congtodien() : base() { this.MaCongTo = ""; this.ChiSoTieuThu = 0; this.NgayLapDat = new DateTime(0,0,0); this.SoTienTra = 0; } public Congtodien(string hoten, DateTime ngaysinh, int sdt, string diachi, string macongto, int chisotieuthu, DateTime ngaylapdat) : base(hoten, ngaysinh, sdt, diachi) { this.MaCongTo = macongto; this.ChiSoTieuThu = chisotieuthu; this.NgayLapDat = ngaylapdat; } ~Congtodien() { Console.ReadLine(); } public new string ToString() { return base.ToString() + " " + this.MaCongTo + " " + this.ChiSoTieuThu + " " + this.NgayLapDat + " " + this.SoTienTra; } } }
run
|
edit
|
history
|
help
0
Polymorphism example
ggggg
fuck this
Classes, properties, methods, ling begining
ffsfsfsfsfsferwfehtyjrvgjb
a1
123.0
C:\Documents and Settings\Админ\Рабочий стол\ШЭ информатика
Calculator Test
Max occured character in a string