Question: I need some assistance on my C# homework. Code will be provided. Refer to attached code and add the following features: Add to the instructor

I need some assistance on my C# homework. Code will be provided.

Refer to attached code and add the following features: Add to the instructor class the fields: the number of credit hours, Department code, Course Number about each course Create two more objects: Input from the keyboard all needed data for at least one of the newly created objects

instructor.cs

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

namespace CourseInfo { class instructor { public String courseName { get; set; }// set is a mutator and Get accesses public String instructorName { get; set; }

public instructor(String courseName, String instructorName) //constructor { this.courseName = courseName;

this.instructorName = instructorName; Console.WriteLine("The construcor is called");

} //constructor public void printCourseInfo() { Console.WriteLine($"course name : {courseName} and instructor: {instructorName} "); }

} }

program.cs

// Homework 1:

using System;

namespace CourseInfo { class Program { static void printCourseInfo(String courseName, String instructor ) { Console.WriteLine($"course name : {courseName} and instructor: {instructor} "); }

static void Main(string[] args) { String courseName = "Programming in C#"; String teacher = "Alrifai"; instructor rad = new instructor(courseName, teacher); instructor mark = new instructor("Intro. to Math", "Buckle"); rad.printCourseInfo(); mark.printCourseInfo();

} }

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!