Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6970337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:41:50+00:00 2026-05-27T16:41:50+00:00

My class Ellipse should inherit from my class Shape but I get this error

  • 0

My class Ellipse should inherit from my class Shape but I get this error message:

Error 1 ‘ConsoleApplication3.Ellipse’ does not implement inherited abstract member ‘ConsoleApplication3.Shape.Perimeter.get’

I also get the error message that I’m hiding Area, a property in Ellipse.

Can anyone help me please?

My shape class looks like this:

public abstract class Shape
{
    //Protected constructor
    protected Shape(double length, double width)
    {
        _length = length;
        _width = width;
    }


    private double _length;
    private double _width;

    public abstract double Area
    {
        get;
    }

And my ellipse class is:

class Ellipse : Shape
{
    //Constructor
    public Ellipse(double length, double width)
        :base(length, width)
    {

    }

    //Egenskaper
    public override double Area
    {
        get
        {
            return Math.PI * Length * Width;
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:41:51+00:00Added an answer on May 27, 2026 at 4:41 pm

    You need to use the override modifier on the Area and Perimeter properties in your Ellipse class, e.g.

    public override double Area { get; }
    
    public override double Perimeter { get; }
    

    A tip for you in Visual Studio, put the cursor inside the text ‘Shape’ (in your ellipse class) and press Ctrl + .. This should add stubs for members you haven’t implemented

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Eclipse issues warnings when a serialVersionUID is missing. The serializable class Foo does not
This seems like it should be fairly straight-forward, but I can't see anything obvious.
This should be simple. Question How do you get a pointcut in one project
I don't know if this is the correct website, but you guys have been
I get a ClassCastException when eclipse suggested that my code should be like that..
I have a code like this: protected <T> T doSomething(String someParam, Class<T> clazz) {
I've always thought the following should work. I get an object which I know
I want to compile one class from MXML to as3 as a learning experience.
I load dynamically an external class from my eclipse rcp application with urlClassLoader. The
I have class implementing Comparator<String> which should sort strings in such manner that strings

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.