subject

Problem: employee class write a class named employee that has the following properties: name--the name property holds the employee's name. idnumber--the idnumber property holds the employee's id number. department--the department property holds the name of the department in which the employee works. position--the position property holds the employee's job title. the class should have the following overloaded constructors: a constructor that accepts the following values as arguments and assigns them to the appropriate properties: employee's name, employee's id number, department, and position. a constructor that accepts the following values as arguments and assigns them to the appropriate properties: employee's name, employee's id number, department, and position properties should be assigned an empty string ("") a parameter-less constructor that assigns empty strings ("") to the name, department, and position properties, and 0 to the idnumber property. computer programming language- c# visual basic formsmy code: using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. linq; using system. text; using system. threading. tasks; using system. windows. forms; namespace employee_class{public partial class form1 : form{const int number = 3; employee[] employeeinfo = new employee[number]; public form1(){initializecomponent(); }class employee{const int number = 3; employee[] employeeinfo = new employee[number]; public string _name; public string _idnumber; public string _department; public string _position; public employee(string name, string idnumber, string department, string position){_name = name; _idnumber = idnumber; _department = department; _position = position; }public string name { get { return _name; } set { _name = value; } }public string idnumber {get { return _idnumber; } set { _idnumber = value; }}public string department{get { return _department; }set { _department = value; }}public string position{get { return _position; }set { _position = value; }}}private void form1_load(object sender, eventargs e){employeeinfo[0] = new employee("susan meyers", "47899", "accounting", "vice president"); employeeinfo[1] = new employee("mark jones", "39119", "it", "programmer"); employeeinfo[2] = new employee("joy rogers", "81774", "manufacturing", "enginner"); }private void showbutton_click(object sender, eventargs e){employeeinfoshowlabel. text = employeeinfo[0]._name; }private void exitbutton_click(object sender, eventargs e){this. close(); }}}my issue: everything seems correct, but nothing seems to be printing out. i am not sure what i did incorrectly. is the code correct? it needs to print like thisname id number departmentmeyers 47899 accounting vice presidentmark jones 39119 it programmerjoy rogers 81774 manufacturing engineer

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
You know the right answer?
Problem: employee class write a class named employee that has the following properties: name--the...
Questions
question
Mathematics, 26.02.2021 20:50
question
English, 26.02.2021 20:50
question
Mathematics, 26.02.2021 20:50
Questions on the website: 13722363