Introducing the basic HTML for this lesson's project
Let's take a look at the implementation. The following is an illustration of our basic HTML file:

Figure 6.7.1: The basic starting HTML for this project
Adding the ThreeDShapes class
First, let's add a class. Go to Solution Explorer
, right-click on the name of the website, select Add
, and click on Class
. Name the class ThreeDShapes
and click on OK
. When the Visual Studio message comes up, click on Yes
. There you go! We have public class ThreeDShapes
. The relevant portion of the initial ThreeDShapes
class code is shown in the following screenshot:

Figure 6.7.2: The initial ThreeDShapes class code
Introducing abstract classes
Now we're going to make ThreeDShapes
an abstract
class because we're going to be dealing with the concept of a three-dimensional shape, such as a cube, cylinder, or sphere. However, each of these shapes is very different. So, specifically, the way that you calculate the volume of these shapes differs drastically. We have...