C# Programming Challenge 12.10: Shape Inheritance Hierarchy

preview_player
Показать описание
Visual C# 2012 How to Program
C# Programming Challenge 12.10: Shape Hierarchy (C# OOP, C# abstract classes, C# inheritance, C# polymorphism)

Implement the Shape hierarchy. Each TwoDimensionalShape should contain read-only abstract property Area to calculate the area of the two-dimensional shape.

Each ThreeDimensionalShape should have read-only abstract properties Area and Volume to calculate the surface area and volume, respectively, of the three-dimensional shape.

Create an app that uses an array of Shape references to objects of each concrete class in the hierarchy. Display a text description of the object to which each array element refers. Also, in the loop that processes all the shapes in the array, determine whether each shape is a TwoDimensionalShape or a ThreeDimensionalShape. If a shape is a TwoDimensionalShape, display its area. If a shape is a ThreeDimensionalShape, display its area and volume.

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!

Рекомендации по теме
Комментарии
Автор

Thanks for all of these videos man. You are really helping me make it through my Computer Science 2 class. Keep up the good work!

djmaymay
Автор

Thanks for the video. I am trying to convert to vb app and have run into trouble. Any chance you can do an other video in vb windows form app.

ccdanieldb
Автор

Do you have an email address i can use to contact you???

olorundarakomolafe
Автор

After greeting I hope you send Mctor solution on paper .. because I'm needy necessary on Monday ... Expire wonderful .. God protect

مهنداحمدالحديثي
welcome to shbcf.ru