Question: C# For this programming question: Create a class called Porcine inside the namespace OOPTest (0.25 marks) This class will implement the attached interface, writing to
C#

For this programming question: Create a class called Porcine inside the namespace OOPTest (0.25 marks) This class will implement the attached interface, writing to the console window "oiiink" (0.5 marks) will have private fields: name (a string) and length (float) (0.5 marks) have a constructor that will take in as parameters the length of the pig and the pig's name and set the fields appropriately (0.5 marks) will have an implicit conversion operator that will return a string. The value returned will be the pig's name (0.75 marks) The main will instantiate a variable of type cow with the name of Albert Einswine and a length of 1.17 (0.5 marks) cast the pig to a string variable (0.25 marks) print out to the console the name of the pig (0.25 marks) .have the pig speak (0.25 marks) Submit the solution files as a compressed file. (0.25 marks) interface ICommunicate void speak For this programming question: Create a class called Porcine inside the namespace OOPTest (0.25 marks) This class will implement the attached interface, writing to the console window "oiiink" (0.5 marks) will have private fields: name (a string) and length (float) (0.5 marks) have a constructor that will take in as parameters the length of the pig and the pig's name and set the fields appropriately (0.5 marks) will have an implicit conversion operator that will return a string. The value returned will be the pig's name (0.75 marks) The main will instantiate a variable of type cow with the name of Albert Einswine and a length of 1.17 (0.5 marks) cast the pig to a string variable (0.25 marks) print out to the console the name of the pig (0.25 marks) .have the pig speak (0.25 marks) Submit the solution files as a compressed file. (0.25 marks) interface ICommunicate void speak
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
