Students:
This content is controlled by your instructor, and is not zyBooks content. Direct questions or concerns about this content to your instructor. If you have any technical issues with the zyLab submission system, use the Trouble with lab button at the bottom of the lab.
1.14 HW11
This homework assignment gives you the opportunity to practice inheritance, pure virtual member functions, abstract base classes, and exceptions.
HW11 (100 points)
Design an abstract base class named BasicShape that has a private member variable:
double area
a public exception class:
NegativeValue
and the following public member functions:
getArea() accessor to area
setArea(area_) mutator for area
calcArea() pure virtual member function that returns a double
Design a class named Circle derived from BasicShape that has the following private member variables:
double centerX;
double centerY;
double radius;
and the following public member functions:
Constructor Circle(centerX_, centerY_, radius_) that takes the arguments and sets the member The area
should be set by calling calcArea then setArea. The constructor must throw the NegativeValue exception if any of the argument values is negative
Overridden calcArea(), which returns the area calculated as 14159* radius * radius
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |