Question: Need the codes in C# for 9,16,17 and 18. Need file codes. Thank you Assume that you have created a class named MyClass. The header
Assume that you have created a class named MyClass. The header of the Myclass constructor can be a. public MyClass O b. public MyClass (double d) c. Either of these can be the constructor header. d. Neither of these can be the constructor header. 8. 9Assume that you have created a class named DemoCar. Within the MainO method Creu of this class, you instantiate a Car object named myCar and the following statement executes correctly: WriteLineC"The Car gets (oj miles per gallon", myCar.ComputeMpgO) Within the Car class the ComputeMpgO method can be Giabsl any neasin a. public and static b public and nonstatic c. private and static d. private and nonstatic Assume that you have created a class named TermPaper that contains a character field named letterGrade. You also have created a property for the field. Which of the following cannot be true? a. The property name is letterGrade. b. The property is read-only. c. The property contains a set accessor that does not allow a grade lower than 'C' d. The property does not contain a get accessor. A this reference is 10. 11. a. implicitly passed to nonstatic methods b. implicitly passed to static methods c. explicitly passed to nonstatic methods d. explicitly passed to static methods 12. When you use an instance variable within a class's nonstatic methods, you explicitly refer to the method's this reference. a. must b. can C. cannot d. should (even though it is not required)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
