Question: C# Code: implement the method public String ClassListing() in the Class class. It should return a string with the list of the students in the

C# Code:

implement the method

public String ClassListing()

in the Class class. It should return a string with the list of the students in the class.

________________________________________________________

Code:

using System; using System.Collections.Generic; using System.Text;

namespace FirstOODApp { public class Class { private Faculty _teacher; public Faculty Teacher { set { _teacher = value; } get { return _teacher; } } private List _students; private String _courseNumber; public String CourseNumber { get { return _courseNumber; } }

public Class(String courseNumber) : this(courseNumber, null) { } // Designated Constructor public Class(String courseNumber, Faculty teacher) { _courseNumber = courseNumber; Teacher = teacher; _students = new List(); }

public void addStudent(IPeople student) { _students.Add(student); }

public String ClassListing() { return ""; } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!