0% found this document useful (0 votes)
16 views3 pages

CS411 Assignment No 1 Solution by Shahab

Uploaded by

Umer Jan
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)
16 views3 pages

CS411 Assignment No 1 Solution by Shahab

Uploaded by

Umer Jan
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/ 3

Shahab Shah (Whatsapp: 03329452266)

CS411 Assignment No 1 Spring 2024


27-April-2024

Question No 1:
Solution:
Employee Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmployeeManager
{
public class Employee
{
public string Name { get; set; }
public double Salary { get; set; }
}

Manager Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmployeeManager
{
public class Manager : Employee
{
public string Id { get; set; }
public string Designation { get; set; }
}
}

Main Program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmployeeManager
{
class Program
{
static void Main(string[] args)
{
Manager manager = new Manager();
manager.Name = "Shahab Shah";
manager.Salary = 50000;
manager.Id = "BC8220206789";
manager.Designation = "Senior Manager";

Console.WriteLine("Manager Details:");
Console.WriteLine("Name: " + manager.Name);
Console.WriteLine("Salary: " + manager.Salary);
Console.WriteLine("ID: " + manager.Id);
Console.WriteLine("Designation: " + manager.Designation);

Console.WriteLine("\nPress any key to exit...");


Console.ReadKey();
}
}
}

Simple Output:

You might also like