Define a console application with a class ‘Employee’ with variables as emp_id (int), name (String) and Grade (double).Define five different constructors for this class to initialize the variable values. Define Finalize method to display the Grade value. Define a for loop in Main for 4 iterations and inside for loop create Employee object. After the for loop call Garbage Collector.
1
Expert's answer
2011-05-23T10:09:41-0400
using System;
namespace Employee { class Employee { & // Member variables of the class & private int emp_id; & private string name; & private double grade;
& // The constructors
& // The default constructor & public Employee() & { // Some default values emp_id = 1; grade = 1; name = "Some name"; & }
& // Three different constructors depending on the amount of parameters
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment