Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C# Help 1) This question refers to the FinalExam project. What properties are re

ID: 3732896 • Letter: C

Question

C# Help

1) This question refers to the FinalExam project. What properties are required for a course? Describe how you reached your conclusion.

2) This question refers to the FinalExam project. A department has a prefix (such as CIS) and a name (Computer Information Systems). How does the department name get displayed on the form?

3) This question refers to the FinalExam project. What data type is stored in the departments combobox on the Courses form? Explain how you reached your conclusion.

4) This question refers to the FinalExam project. Describe the purpose of the FOR loop in the courses listbox selected index changed event procedure.

5) This question refers to the FinalExam project. Why doesn't the Course Department property in a Course need validation?

6) This question refers to the FinalExam project. Explain what the CourseID property in the Course class is, and how it works. Be specific.

7) This question refers to the FinalExam project. Identify two examples of overloading in the project.

8) In the Final Exam project, what is the purpose of the IF statement in the Courses Add method?

Below is the Final Exam Project

Course.cs x FinalExam FinalExam Course number 1 ausing System; using System.collections.Generic; using System.Linq; using System.Text; namespace FinalExam 13 references class Course private string number, title, description; private int credits; 1e 12 13 14 15 16 17 18 19 20 public Course(Department CourseDepartment, string CourseNumber string Title) this.courseDepartment-CourseDepartment; this.CourseNumber Courselunber; this . Title Title 1 reference public Course (Department CourseDepartment, string CourseNumber, 21 string Title, string Description, int Credits) 23 24 25 26 27 28 29 31 this.CourseDepartment-CourseDepartment; this.courseNumber-CourseNunber; this.Title-Title; this.Description Description; this.creditsCredits; 32 public Department CourseDepartnent got; set) 34 s references public string CourseNunber 35 36 37 get return number;) set 39 40 41 42 43 if (valuethrow new ApplicationException "Course number cannot be enpty") else numbervalue; 5 references 45 46 47 48 49 50 51 52 53 public string Title get return title; ) set if (value)throw new ApplicationException("Title cannot be enpty) else titlevalue;

Explanation / Answer

1) Properties required for a course are : number (used to identify a course by a unique number), title (name of the course), description (brief details of the course) and credits (number of credit points the completion of course will provide).

2) Deplartment class has a overridden toString() method, which is internally returning the name of the department. Because of this, the department name is being displayed.

3) Data type stored in department combobox of the Courses Form will be a department prefix string. This is because in both the ways of adding a department, we need to always provide department prefix and the same is being used intoString method, which will be called to store the value of a department.

4) Use of FOR loop here is to iterate over all the courses and get the total credit that will be offered on coletion of these courses.

5) Course Department property in a course does not need validation bacause the department of all the courses are fixed and final, and will not need any validation.

6) CourseID is a combination of course name and course number. Here this combination is used so that is always unique for each course.

7) Consider Department.cs file, it has 2 overloaded contructors. Both of these overloaded contructors differ by number of arguments.

8) Use of if condition here is to check if the course that we are trying to add already exists ot not. If it already exists and we try to add the same course again, then this if condition will detect that and throw a Invalid Course exception.