Professional Documents
Culture Documents
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Employee
{
public class CompositionTest
{
public void Main()
{
Employee e =
new Employee("Bob", "Jones", 2, 2, 1989, 3, 12, 2016);
}
}
}
//Employee
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Employee
{
public class Employee
{
public string firstName;
public string lastName;
public Date birthDate;
public Date hireDate;
public Employee(string first, string last, int birthDay, int birthMonth, int
birthYear, int hireDay, int hireMonth, int hireYear)
{
firstName = first;
lastName = last;
birthDate = new Date(birthMonth, birthDay, birthYear);
hireDate = new Date(hireMonth, hireDay, hireYear);
//Date
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Employee
{
public class Date
{
private int day;
private int month;
private int year;
namespace Employee
{
public partial class Form1 : Form
{
public Form1()
{
Employee e =
new Employee("Bob", "Jones", 2, 2, 1989, 3, 12, 2016);