0% found this document useful (0 votes)
29 views5 pages

Design Pattrens: Assignment # 01 Banaras Ali FA15-BSE-154 Sec - 7A

The document contains code for an employee management system with classes for different types of employees like HOD, HR employee, and manager employee. There are also classes for Department and Media/Job. The employee classes inherit from an abstract employees class and override methods like Display. Departments can contain HOD objects and subclasses of Department are created for different department types.

Uploaded by

Saima Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views5 pages

Design Pattrens: Assignment # 01 Banaras Ali FA15-BSE-154 Sec - 7A

The document contains code for an employee management system with classes for different types of employees like HOD, HR employee, and manager employee. There are also classes for Department and Media/Job. The employee classes inherit from an abstract employees class and override methods like Display. Departments can contain HOD objects and subclasses of Department are created for different department types.

Uploaded by

Saima Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

DESIGN PATTRENS

ASSIGNMENT # 01
BANARAS ALI
FA15-BSE-154
SEC – 7A

DESIGN PATTERNS
Code
public abstract class employees
{
private String name;
private String Age;
private String Experience;

public employees(string name, string Age, string Experience)


{
this.name = name;
this. Age = Age;
this. Experience = Experience;
}

public string Name { get => name; set => name = value; }
public string Age { get => Age; set => Age = value; }
public string Experience { get => Experience; set => Experience = value; }

public virtual void Display()


{
Console.WriteLine("{0} , {1}, {2}", name, Age, Experience);
}

public class HOD : employees


{
private int Emp_ID;
public HOD(String name, String Age, String Experience, int oID) : base(name, Age,
Experience)
{
Emp_ID = oID;
}

public int Emp_ID { get => Emp_ID; set => Emp_ID = value; }

public override void Display()


{
base.Display();
Console.WriteLine(Emp_ID.ToString());
}
public void MakeRequest()
{
//Server Sends request from database.
}

public class HR-Employee : employees


{

public HR-Employee( String name, String Age, String Experience) : base(name, Age,
Experience)
{

public job MakeRequest


{
get => default;
set
{
}
}

public void Display(Job media)


{
}
}

public class Manag-Emp : employees


{
private String permission;
private String Email-ID;

public Manag-Emp( String name, String Age, String Experience, String permissin,
String Email_ID) : base(name, Age , Experience)
{

Permission = permissin;
Email-ID = Email_ID;

public string Permission { get => permission; set => permission = value; }
public string Email-ID { get => Email-ID; set => Email-ID = value; }

public void GetRequest() {


{

// Display data

}
}

public class Department


{
private int department-id;
HOD hod;

public Department(int department-id, HOD hod)


{
this.department-id = id;
this.Hod = hod;
}
public int department-id { get => department-id; set => department-id = value; }
public HOD Hod { get => hod; set => hod = value; }

public virtual void Display()


{
Console.WriteLine("{0}, {1}", department-id);
}

}
public class HRDepartment: Department
{

public HRDepartment(int id,HOD hod):base(department-id, hod)


{

public override void Display()


{

}
public class Management : Department
{

public Management(int idHOD hod): base(department-id, hod)


{
}

public override void Display()


{
base.Display();
}

public class Media


{
private String title;
private String Vacancy;

public Media(string title, string Vacancy)


{
this.title = title;
this.Requirement = Vacancy;
}

public string title { get => title; set => title = value; }
public string Vacancy { get => Vacancy; set => Vacancy = value; }

public void Display()


{
Console.WriteLine("{0}, {1}", title, Vacancy);
}

public void sendJob()


{

}
public void Display(String request)
{
//Display data.

Class Diagram

You might also like