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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:30, Angellbatton6763
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
image
Computers and Technology, 22.06.2019 14:50, williamsgregg5214
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer. b. don’t write your password down and leave it where others can find it. c. share your password with your friends. d.each time you visit a website, retain the cookies on your computer. e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, lexirandall19
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, bre563
Research data that is presented using descriptive language is said to be
Answers: 2
You know the right answer?
Employee Class Write a class named Employee that has the following properties: Name--The Name proper...

Questions in other subjects:

Konu
English, 13.10.2020 23:01
Konu
Mathematics, 13.10.2020 23:01
Konu
Law, 13.10.2020 23:01
Konu
Mathematics, 13.10.2020 23:01