How to solve this question?
3. Consider the program below. Which statements should be added in the Main function so as to produce the following output? [4 Marks] using System; { Department Name: Information Technology HOD: Dr.Nabel Section Name: Multimedia public class Department public string DeptName; private string HoD; } public void GetDepartmentInfo(string D) { }} HOD= D; Console.WriteLine("Department Console.WriteLine("HoD: {0}", HOD); } public class Section Department { public string SecName; public void GetSecName() { Console.WriteLine("Section Name: {0}", SecName); } } public class Program { public static void Main() { M109 TMA Summer 2022 Name: {0}", DeptName); Section Multimedia = new Section(); // Write the codes here // Write the codes here // Write the codes here // Write the codes here Console.ReadLine();
How to solve this question?
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am