Example #1
0
        //************************************************
        //	Overridden ToString()
        //************************************************
        public override string ToString()
        {   //  Begin public override string ToString()
            string outputStr = "";

            outputStr += "Employee Name: " + FirstName + " " +
                         MiddleInit + " " +
                         LastName + "\n";
            outputStr += "Union Status:  " + IsUnion.ToString() + "\n";
            outputStr += "Employee Number: " + EmpNum.ToString() + "\n";
            outputStr += "Salary Staus: " + WeekSalary.ToString("c");
            return(outputStr);
        }   //  End   public override string ToString()
Example #2
0
        }                                             //  End   public override double CalculateEarnings()

        //************************************************
        //	Overridden ToString()
        //************************************************
        public override string ToString()
        {   //  Begin public override string ToString()
            string outputStr = "";

            outputStr += "Employee Name: " + FirstName + " " +
                         MiddleInit + " " +
                         LastName + "\n";
            outputStr += "Union Status:  " + IsUnion.ToString() + "\n";
            outputStr += "Employee Number: " + EmpNum.ToString() + "\n";
            outputStr += "Hours Worked: " + HoursWorked.ToString("f2") + "\n";
            outputStr += "Hourly Rate: " + HourlyRate.ToString("c") + "\n";
            outputStr += "Gross Pay: " + grossPay.ToString("c") + "\n";

            return(outputStr);
        }   //  End   public override string ToString()
Example #3
0
        }   //  End   public override double CalculateEarnings()

        //************************************************
        //	Overridden ToString()
        //************************************************
        public override string ToString()
        {   //  Begin public override string ToString()
            string outputStr = "";

            outputStr += "Employee Name: " + FirstName + " " +
                         MiddleInit + " " +
                         LastName + "\n";
            outputStr += "Union Status:  " + IsUnion.ToString() + "\n";
            outputStr += "Employee Number: " + EmpNum.ToString() + "\n";
            outputStr += "Pieces Per Hour: " + PiecesPerHour.ToString() + "\n";
            outputStr += "Price Per Piece: " + PricePerPiece.ToString("c") + "\n";
            outputStr += "Gross Pay: " + grossPay.ToString("c") + "\n";

            return(outputStr);
        }   //  End   public override string ToString()
Example #4
0
        }   //  End   public override double CalculateEarnings()

        //************************************************
        //	Overridden ToString()
        //************************************************
        public override string ToString()
        {   //  Begin public override string ToString()
            string outputStr = "";

            outputStr += "Employee Name: " + FirstName + " " +
                         MiddleInit + " " +
                         LastName + "\n";
            outputStr += "Union Status:  " + IsUnion.ToString() + "\n";
            outputStr += "Employee Number: " + EmpNum.ToString() + "\n";
            outputStr += "Commission Rate: " + CommissionRate.ToString("f2") + "\n";
            outputStr += "Weekly Sales: " + WeeklySales.ToString("c") + "\n";
            outputStr += "Gross Pay: " + grossPay.ToString("c") + "\n";

            return(outputStr);
        }   //  End   public override string ToString()