Default Constructor 可以显示结果,手动输入的constructor却不可以
我不是很懂为什么会出现这个情况。
我的代码写的都差不多,至少我看了几遍,hour和ID都基本一样。但我真心不知道,为什么ID不会显示出数值来,还有工资也是。
接来下的代码有点长,我是完全基本完全复制了。 还请见谅。
//full Time Employee Class
namespace EmPloyeeChen
{
public class FullTimeEmployee //object
{
private string FEmployeeFName, FEmployeeLName;
private double FEmployeeID;
private double FEmployeeWorkHour;
private const double FEmployeePayRate = 20.00;
private double GrossPay, RegPay, OTPay;
//No Args Constructor, Default, Silly
public FullTimeEmployee()
{
FEmployeeFName = "Arthur";
FEmployeeLName = "Chen";
FEmployeeID = 1000;
FEmployeeWorkHour = 60;
RegPay = calcRegPay();
OTPay = CalOTPay();
}
//Constructor
public FullTimeEmployee(string FFName, string FLName, double FID, double FHours)
{
FEmployeeFName = FFName;
FEmployeeLName = FLName;
FID = FEmployeeID;
FEmployeeWorkHour = FHours;
//FEmployeePayRate = FPRate;
}
//Accessor Methods
//get name