subject

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 forms
my 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();
}
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 24.06.2019 10:00
Each time you save a document, you will need to type in the file type in which it should be saved you can select the save button to save it with the same file name if it has been previously saved you will need to select the location to save the file you will need to use the save as dialog box
Answers: 1
You know the right answer?
Employee Class Write a class named Employee that has the following properties: Name--The Name proper...
Questions
question
History, 21.04.2020 02:31
Questions on the website: 13722363