Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 03:10, nxusasmangaliso8780
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
image
Computers and Technology, 23.06.2019 22:00, elijah1090
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
image
Computers and Technology, 24.06.2019 10:00, zlittleton2008
Which feature of a blog to restore and retrieve older post
Answers: 3
image
Computers and Technology, 24.06.2019 18:30, HavenShort3075
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 1
Do you know the correct answer?
Problem: employee class write a class named employee that has the following properties: name--the...

Questions in other subjects:

Konu
Mathematics, 04.05.2020 23:06
Konu
English, 04.05.2020 23:06