How to solve this question?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

How to solve this question?

Post by answerhappygod »

How to solve this question?
How To Solve This Question 1
How To Solve This Question 1 (127.83 KiB) Viewed 44 times
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();
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply