in c# i need to  Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf. Create an interface named ITurnable that contains a single method named Turn(). The classes named Page, Corner, Pancake, and Leaf implement ITurnable. Create each class’s Turn() method to display an appropriate message. For example: The Page’s Turn() method should display You turn a page in a book. The Corner’s Turn() method should display You turn corners to go around the block. The Pancake's Turn() method should display You turn a pancake when it's done on one side. The Leaf's Turn() method should display A leaf turns colors in the fall. i keep getting the errors Unit TestIncomplete Page class defined Build Status Build Failed Build Output Compilation failed: 3 error(s), 0 warnings NtTest4ac148a9.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive? NtTest4ac148a9.cs(23,7): error CS0246: The type or namespace name `Page' could not be found. Are you missing `TurningDemo' using directive? NtTest4ac148a9.cs(24,7): error CS0841: A local variable `page' cannot be used before it is declared Test Contents [TestFixture] public class PageClassTest {   [Test]   public void PageTest()   {     Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Page)),     "`Page` class should implement `IRecoverable` class");   }   [Test]   public void PageTest2()   {     using (StringWriter sw = new StringWriter())     {       Console.SetOut(sw);       Page page = new Page();       page.Turn();       string expected = "You turn a page in a book";       Assert.AreEqual(expected, sw.ToString().Trim());     }   } } Unit TestIncomplete Leaf class defined Build Status Build Failed Build Output Compilation failed: 3 error(s), 0 warnings NtTest458dbc42.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive? NtTest458dbc42.cs(23,7): error CS0246: The type or namespace name `Leaf' could not be found. Are you missing `TurningDemo' using directive? NtTest458dbc42.cs(24,7): error CS0841: A local variable `leaf' cannot be used before it is declared Test Contents [TestFixture] public class LeafClassTest {   [Test]   public void LeafTest()   {     Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Leaf)),     "`Leaf` class should implement `IRecoverable` class");   }   [Test]   public void LeafTest2()   {     using (StringWriter sw = new StringWriter())     {       Console.SetOut(sw);       Leaf leaf = new Leaf();       leaf.Turn();       string expected = "A leaf turns colors in the fall";       Assert.AreEqual(expected, sw.ToString().Trim());     }   } } Unit TestIncomplete Pancake class defined Build Status Build Failed Build Output Compilation failed: 3 error(s), 0 warnings NtTestff531a42.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive? NtTestff531a42.cs(23,7): error CS0246: The type or namespace name `Pancake' could not be found. Are you missing `TurningDemo' using directive? NtTestff531a42.cs(24,7): error CS0841: A local variable `pancake' cannot be used before it is declared Test Contents [TestFixture] public class PancakeClassTest {   [Test]   public void PancakeTest()   {     Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Pancake)),     "`Pancake` class should implement `IRecoverable` class");   }   [Test]   public void PancakeTest2()   {     using (StringWriter sw = new StringWriter())     {       Console.SetOut(sw);       Pancake pancake = new Pancake();       pancake.Turn();       string expected = "You turn a pancake when it's done on one side";       Assert.AreEqual(expected, sw.ToString().Trim());     }   } } Unit TestIncomplete Corner class defined Build Status Build Failed Build Output Compilation failed: 3 error(s), 0 warnings NtTest1009fd8b.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive? NtTest1009fd8b.cs(23,7): error CS0246: The type or namespace name `Corner' could not be found. Are you missing `TurningDemo' using directive? NtTest1009fd8b.cs(24,7): error CS0841: A local variable `corner' cannot be used before it is declared Test Contents [TestFixture] public class CornerClassTest {   [Test]   public void CornerTest()   {     Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Corner)),     "`Corner` class should implement `IRecoverable` class");   }   [Test]   public void CornerTest2()   {     using (StringWriter sw = new StringWriter())     {       Console.SetOut(sw);       Corner corner = new Corner();       corner.Turn();       string expected = "You turn corners to go around the block";       Assert.AreEqual(expected, sw.ToString().Trim());     }   } } my code is

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 8E: Create an application named TurningDemo that creates instances of four classes: Page, Corner,...
icon
Related questions
Question

in c# i need to 

Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf.

Create an interface named ITurnable that contains a single method named Turn(). The classes named Page, Corner, Pancake, and Leaf implement ITurnable.

Create each class’s Turn() method to display an appropriate message. For example:

The Page’s Turn() method should display You turn a page in a book.
The Corner’s Turn() method should display You turn corners to go around the block.
The Pancake's Turn() method should display You turn a pancake when it's done on one side.
The Leaf's Turn() method should display A leaf turns colors in the fall.
i keep getting the errors

Unit TestIncomplete
Page class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings

NtTest4ac148a9.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest4ac148a9.cs(23,7): error CS0246: The type or namespace name `Page' could not be found. Are you missing `TurningDemo' using directive?
NtTest4ac148a9.cs(24,7): error CS0841: A local variable `page' cannot be used before it is declared
Test Contents
[TestFixture]
public class PageClassTest
{
  [Test]
  public void PageTest()
  {
    Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Page)),
    "`Page` class should implement `IRecoverable` class");
  }

  [Test]
  public void PageTest2()
  {
    using (StringWriter sw = new StringWriter())
    {
      Console.SetOut(sw);

      Page page = new Page();
      page.Turn();

      string expected = "You turn a page in a book";
      Assert.AreEqual(expected, sw.ToString().Trim());
    }
  }
}

Unit TestIncomplete
Leaf class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings

NtTest458dbc42.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest458dbc42.cs(23,7): error CS0246: The type or namespace name `Leaf' could not be found. Are you missing `TurningDemo' using directive?
NtTest458dbc42.cs(24,7): error CS0841: A local variable `leaf' cannot be used before it is declared
Test Contents
[TestFixture]
public class LeafClassTest
{
  [Test]
  public void LeafTest()
  {
    Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Leaf)),
    "`Leaf` class should implement `IRecoverable` class");
  }

  [Test]
  public void LeafTest2()
  {
    using (StringWriter sw = new StringWriter())
    {
      Console.SetOut(sw);

      Leaf leaf = new Leaf();
      leaf.Turn();

      string expected = "A leaf turns colors in the fall";
      Assert.AreEqual(expected, sw.ToString().Trim());
    }
  }
}

Unit TestIncomplete
Pancake class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings

NtTestff531a42.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTestff531a42.cs(23,7): error CS0246: The type or namespace name `Pancake' could not be found. Are you missing `TurningDemo' using directive?
NtTestff531a42.cs(24,7): error CS0841: A local variable `pancake' cannot be used before it is declared
Test Contents
[TestFixture]
public class PancakeClassTest
{
  [Test]
  public void PancakeTest()
  {
    Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Pancake)),
    "`Pancake` class should implement `IRecoverable` class");
  }

  [Test]
  public void PancakeTest2()
  {
    using (StringWriter sw = new StringWriter())
    {
      Console.SetOut(sw);

      Pancake pancake = new Pancake();
      pancake.Turn();

      string expected = "You turn a pancake when it's done on one side";
      Assert.AreEqual(expected, sw.ToString().Trim());
    }
  }
}

Unit TestIncomplete
Corner class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings

NtTest1009fd8b.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest1009fd8b.cs(23,7): error CS0246: The type or namespace name `Corner' could not be found. Are you missing `TurningDemo' using directive?
NtTest1009fd8b.cs(24,7): error CS0841: A local variable `corner' cannot be used before it is declared
Test Contents
[TestFixture]
public class CornerClassTest
{
  [Test]
  public void CornerTest()
  {
    Assert.IsTrue(typeof(ITurnable).IsAssignableFrom(typeof(Corner)),
    "`Corner` class should implement `IRecoverable` class");
  }

  [Test]
  public void CornerTest2()
  {
    using (StringWriter sw = new StringWriter())
    {
      Console.SetOut(sw);

      Corner corner = new Corner();
      corner.Turn();

      string expected = "You turn corners to go around the block";
      Assert.AreEqual(expected, sw.ToString().Trim());
    }
  }
}

my code is 

 

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT