C# Programming Challenge 11.7: Quadrilateral Inheritance Hierarchy (C# OOP Principles, C# Struct)


Visual C# 2012 How To Program
C# Programming Challenge 11.7: Quadrilateral Inheritance Hierarchy (C# OOP Principles)

Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the base class of the hierarchy.
Make the hierarchy as deep (i.e., as many levels) as possible. Specify the instance variables, properties and methods for each class. The private instance variables of Quadrilateral should
be the x–y coordinate pairs for the four endpoints of the Quadrilateral. Write an app that instantiates objects of your classes and outputs each object’s area (except Quadrilateral).

Learning to code? Follow my C# tutorials for beginners. I do a lot of C# programming challenges and C# projects as part of my homework – every day!
If you are learning to program, nothing beats solving real programming exercises and coding challenges.
So don’t forget to subscribe, as I release new programming videos every day!

Nguồn: https://wijstaanvooronzegrondrechten.org

Xem thêm bài viết khác: https://wijstaanvooronzegrondrechten.org/cong-nghe


  1. I really appreciate your videos. They are helping me a lot. I love the jokes on the shape names by the way. 😂😂😂

  2. I'm only 6mins in so not sure if you correct this mistake but structs and abstract classes aren't covered in the textbook for about another 150 pages or so, which makes it hard for students to use this tutorial. I do still really appreciate your tutorials! Keep it up man!


Please enter your comment!
Please enter your name here