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. but I keep getting errors witch are  Unit Test

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.

but I keep getting errors witch are 

Unit Test
Incomplete
Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings
NtTest930946e3.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest930946e3.cs(23,7): error CS0246: The type or namespace name `Page' could not be found. Are you missing `TurningDemo' using directive?
NtTest930946e3.cs(24,7): error CS0841: A local variable `page' cannot be used before it is declared
Unit Test
Incomplete

Leaf class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings
NtTest5641c024.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest5641c024.cs(23,7): error CS0246: The type or namespace name `Leaf' could not be found. Are you missing `TurningDemo' using directive?
NtTest5641c024.cs(24,7): error CS0841: A local variable `leaf' cannot be used before it is declared
 
Unit Test
Incomplete

Pancake class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings
NtTest7a68f19c.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest7a68f19c.cs(23,7): error CS0246: The type or namespace name `Pancake' could not be found. Are you missing `TurningDemo' using directive?
NtTest7a68f19c.cs(24,7): error CS0841: A local variable `pancake' cannot be used before it is declared
 
Unit Test
Incomplete

Corner class defined

Build Status
Build Failed
Build Output
Compilation failed: 3 error(s), 0 warnings
NtTest54ce730f.cs(12,26): error CS0246: The type or namespace name `ITurnable' could not be found. Are you missing `TurningDemo' using directive?
NtTest54ce730f.cs(23,7): error CS0246: The type or namespace name `Corner' could not be found. Are you missing `TurningDemo' using directive?
NtTest54ce730f.cs(24,7): error CS0841: A local variable `corner' cannot be used before it is declared
 
my code is
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TurningDemo
{
    public interface ITurnable
    {
        string Turn();
    }

    class Page : ITurnable
    {
        public string Turn()
        {
            return "You turn a page in the book.";
        }
    }

    class Corner : ITurnable
    {
        public string Turn()
        {
            return "You turn at the corner.";
        }
    }

    class Pancake : ITurnable
    {
        public string Turn()
        {
            return "You turn a pancake.";
        }
    }

    class Leaf : ITurnable
    {
        public string Turn()
        {
            return "A leaf turns colors in the fall.";
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Page page1 = new Page();
            Corner corner1 = new Corner();
            Pancake pancake1 = new Pancake();
            Leaf leaf1 = new Leaf();

            Console.WriteLine("Page: " + page1.Turn());
            Console.WriteLine("Corner: " + corner1.Turn());
            Console.WriteLine("Pancake: " + pancake1.Turn());
            Console.WriteLine("Leaf: " + leaf1.Turn());

            Console.ReadLine();
        }
    }
}
 
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education