Water Strider Body Segment Dimensions x 8 Radius Length Contact Perimeter Body (mm) (mm) (mm) Head Hemisphere 4.4 ----Body Cylinder 4.4 51.2 --Tail Cone 4.4 20.8 --          Leg 1 Segment 1 0.64 12 --Segment 2 0.32 12 --Segment 3 0.16 8           Leg 2 Segment 1 0.64 36 --Segment 2 0.32 36 --Segment 3 0.16 24           Leg 3 Segment 1 0.32 24 --Segment 2 0.16 24 --Segment 3 0.16 16 Total Contact   Perimeter*   Total Volume**     Body Mass (g)   Volume (mm3)     46.325 11.581 1.930   7.721 1.930 1.287   *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Water Strider Body Segment Dimensions x 8 Radius Length Contact Perimeter Body (mm) (mm) (mm) Head Hemisphere 4.4 ----Body Cylinder 4.4 51.2 --Tail Cone 4.4 20.8 --          Leg 1 Segment 1 0.64 12 --Segment 2 0.32 12 --Segment 3 0.16 8 16           Leg 2 Segment 1 0.64 36 --Segment 2 0.32 36 --Segment 3 0.16 24 48           Leg 3 Segment 1 0.32 24 --Segment 2 0.16 24 --Segment 3 0.16 16 32 Total Contact   192 Perimeter*   Total Volume**     Body Mass (g)   Volume (mm3) 178.409 3114.047 421.694   15.442 3.860 0.643   46.325 11.581 1.930   7.721 1.930 1.287   3895.588 4.6747056 *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Water Strider Body Segment Dimensions x 4 Radius Length Contact Perimeter Body (mm) (mm) (mm) Head Hemisphere 2.2 ----Body Cylinder 2.2 25.6 --Tail Cone 2.2 10.4 --          Leg 1 Segment 1 0.32 6 --Segment 2 0.16 6 --Segment 3 0.08 4 8           Leg 2 Segment 1 0.32 18 --Segment 2 0.16 18 --Segment 3 0.08 12 24           Leg 3 Segment 1 0.16 12 --Segment 2 0.08 12 --Segment 3 0.08 8 16 Total Contact   96 Perimeter*   Total Volume**     Body Mass (g)   Volume (mm3) 22.301 389.256 52.712   1.930 0.483 0.080   5.791 1.448 0.241   0.965 0.241 0.161   486.949 0.5843388 *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Body Head Hemisphere Body Cylinder Tail Cone     Leg 1 Segment 1 Segment 2 Segment 3     Leg 2 Segment 1 Segment 2 Segment 3     Leg 3 Segment 1 Segment 2 Segment 3       Perimeter* Water Strider Body Segment Dimensions Radius Length Contact Perimeter (mm) (mm) (mm) 0.55 ----0.55 6.4 --0.55 2.6 --      Volume (mm3)   0.08 0.04 0.02   1.5 1.5 1.0   ----    0.08 0.04 0.02   4.5 4.5 3.0   ----- 0.090 0.023 0.004   3.0 3.0 2.0 ----- 0.04 0.02 0.02 Total Contact Total Volume** Body Mass (g)   0.015 0.004 0.003       *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Water Strider Body Segment Dimensions x 2 Radius Length Contact Perimeter Body (mm) (mm) (mm) Head Hemisphere 1.1 ----Body Cylinder 1.1 12.8 --Tail Cone 1.1 5.2 --          Leg 1 Segment 1 0.16 3.0 --Segment 2 0.08 3.0 --Segment 3 0.04 2.0           Leg 2 Segment 1 0.16 9.0 --Segment 2 0.08 9.0 --Segment 3 0.04 6.0           Leg 3 Segment 1 0.08 6.0 --Segment 2 0.04 6.0 --Segment 3 0.04 4.0 Total Contact   Perimeter*   Total Volume**     Body Mass (g)   Volume (mm3)     0.724 0.181 0.030   0.121 0.030 0.020   *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Water Strider Body Segment Dimensions x 4 Radius Length Contact Perimeter Body (mm) (mm) (mm) Head Hemisphere 2.2 ----Body Cylinder 2.2 25.6 --Tail Cone 2.2 10.4 --          Leg 1 Segment 1 0.32 6 --Segment 2 0.16 6 --Segment 3 0.08 4           Leg 2 Segment 1 0.32 18 --Segment 2 0.16 18 --Segment 3 0.08 12           Leg 3 Segment 1 0.16 12 --Segment 2 0.08 12 --Segment 3 0.08 8 Total Contact   Perimeter*   Total Volume**     Body Mass (g)   Volume (mm3)     5.791 1.448 0.241   0.965 0.241 0.161   *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Body Head Hemisphere Body Cylinder Tail Cone     Leg 1 Segment 1 Segment 2 Segment 3     Leg 2 Segment 1 Segment 2 Segment 3     Leg 3 Segment 1 Segment 2 Segment 3       Perimeter* Water Strider Body Segment Dimensions Radius Length Contact Perimeter (mm) (mm) (mm) 0.55 ----0.55 6.4 --0.55 2.6 --      Volume (mm3) 0.348 6.082 0.824   0.08 0.04 0.02   1.5 1.5 1.0   ----2   0.030 0.008 0.001   0.08 0.04 0.02   4.5 4.5 3.0   ----6   0.090 0.023 0.004   3.0 3.0 2.0 ----4 0.015 0.004 0.003 24       7.61 0.009132 0.04 0.02 0.02 Total Contact Total Volume** Body Mass (g) *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Water Strider Body Segment Dimensions x 2 Radius Length Contact Perimeter Body (mm) (mm) (mm) Head Hemisphere 1.1 ----Body Cylinder 1.1 12.8 --Tail Cone 1.1 5.2 --          Leg 1 Segment 1 0.16 3.0 --Segment 2 0.08 3.0 --Segment 3 0.04 2.0 4           Leg 2 Segment 1 0.16 9.0 --Segment 2 0.08 9.0 --Segment 3 0.04 6.0 12           Leg 3 Segment 1 0.08 6.0 --Segment 2 0.04 6.0 --Segment 3 0.04 4.0 8 Total Contact   48 Perimeter*   Total Volume**     Body Mass (g)   Volume (mm3) 2.788 48.657 6.589   0.241 0.060 0.010   0.724 0.181 0.030   0.121 0.030 0.020   60.868 0.0730416 *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Body Head Hemisphere Body Cylinder Tail Cone     Leg 1 Segment 1 Segment 2 Segment 3     Leg 2 Segment 1 Segment 2 Segment 3     Leg 3 Segment 1 Segment 2 Segment 3       Perimeter* Water Strider Body Segment Dimensions Radius Length Contact Perimeter (mm) (mm) (mm) 0.55 ----0.55 6.4 --0.55 2.6 --      0.08 0.04 0.02   1.5 1.5 1.0   ----- 0.08 0.04 0.02   4.5 4.5 3.0   ----- 3.0 3.0 2.0 ----- 0.04 0.02 0.02 Total Contact Total Volume** Body Mass (g)     Volume (mm3)             *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Body Head Hemisphere Body Cylinder Tail Cone     Leg 1 Segment 1 Segment 2 Segment 3     Leg 2 Segment 1 Segment 2 Segment 3     Leg 3 Segment 1 Segment 2 Segment 3       Perimeter* Water Strider Body Segment Dimensions Radius Length Contact Perimeter (mm) (mm) (mm) 0.55 ----0.55 6.4 --0.55 2.6 --      Volume (mm3)   0.08 0.04 0.02   1.5 1.5 1.0   ----2     0.08 0.04 0.02   4.5 4.5 3.0   ----6     3.0 3.0 2.0 ----4 0.04 0.02 0.02 Total Contact Total Volume** Body Mass (g) 24       *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Body Head Hemisphere Body Cylinder Tail Cone     Leg 1 Segment 1 Segment 2 Segment 3     Leg 2 Segment 1 Segment 2 Segment 3     Leg 3 Segment 1 Segment 2 Segment 3       Perimeter* Water Strider Body Segment Dimensions Radius Length Contact Perimeter (mm) (mm) (mm) 0.55 ----0.55 6.4 --0.55 2.6 --      Volume (mm3)   0.08 0.04 0.02   1.5 1.5 1.0   ----2     0.08 0.04 0.02   4.5 4.5 3.0   ----6   0.090 0.023 0.004   3.0 3.0 2.0 ----4 0.015 0.004 0.003 24   0.04 0.02 0.02 Total Contact Total Volume** Body Mass (g)     *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Body Head Hemisphere Body Cylinder Tail Cone     Leg 1 Segment 1 Segment 2 Segment 3     Leg 2 Segment 1 Segment 2 Segment 3     Leg 3 Segment 1 Segment 2 Segment 3       Perimeter* Water Strider Body Segment Dimensions Radius Length Contact Perimeter (mm) (mm) (mm) 0.55 ----0.55 6.4 --0.55 2.6 --      Volume (mm3) 0.348 6.082 0.824   0.08 0.04 0.02   1.5 1.5 1.0   ----2   0.030 0.008 0.001   0.08 0.04 0.02   4.5 4.5 3.0   ----6   0.090 0.023 0.004   3.0 3.0 2.0 ----4 0.015 0.004 0.003 24       7.61 0.009132 0.04 0.02 0.02 Total Contact Total Volume** Body Mass (g) *Contact perimeter for Legs 1, 2, & 3 must be multiplied by 2 to account for the legs on either side of the body. **Total volume must include the volume of the body and the volume of the legs multiplied by 2 to
View full slide show




Some Random Results Sample means from 15 trials: A B C 1 Random # Outcome Profit 2 0.4619 Tail -$1.00 3 0.4118 Tail -$1.00 4 0.5815 Tail -$1.00 5 0.9792 Tail -$1.00 6 0.2852 Head $3.00 7 0.9064 Tail -$1.00 8 0.9855 Tail -$1.00 9 0.9988 Tail -$1.00 10 0.2206 Head $3.00 11 0.0986 Head $3.00 12 0.9696 Tail -$1.00 13 0.8026 Tail -$1.00 14 0.8189 Tail -$1.00 15 0.7137 Tail -$1.00 16 0.9258 Tail -$1.00 17 -$0.20 D E =AVERAGE(C2:C16) Operations -- Prof. Juran F A B C 1 Random # Outcome Profit 2 0.1979 Head $3.00 3 0.9185 Tail -$1.00 4 0.4688 Tail -$1.00 5 0.6670 Tail -$1.00 6 0.0902 Head $3.00 7 0.3757 Tail -$1.00 8 0.1492 Head $3.00 9 0.4518 Tail -$1.00 10 0.8503 Tail -$1.00 11 0.1392 Head $3.00 12 0.1924 Head $3.00 13 0.0179 Head $3.00 14 0.4799 Tail -$1.00 15 0.5064 Tail -$1.00 16 0.3051 Head $3.00 17 $0.87 D E F =AVERAGE(C2:C16) 17 © The McGraw-Hill Companies, Inc.,
View full slide show




Goliath Grouper Suction Feeding Cone A Length (mm) Area (mm2) a 34.9  N/A b  153.6 Cone B Length (mm) Area (mm2) a  34.9 Time 0 c  54.3 N/A d  6.4 e   Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a   N/A b   Cone B Length (mm) Area (mm2) a   Time 1 c     d   e   Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3)   Volume (mm3)     Volume (mm3)   Volume (mm3)       0.132     
View full slide show




Goliath Grouper Suction Feeding Cone A Length (mm) Area (mm2) a 34.9  N/A b  153.6 Cone B Length (mm) Area (mm2) a  34.9 Time 0 c  54.3 N/A d  6.4 e  12.2 Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a   N/A b   Cone B Length (mm) Area (mm2) a   Time 1 c     d   e   Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3)  195916.8 Volume (mm3)  84289.7  180206.5 Volume (mm3)   Volume (mm3)       0.132     
View full slide show




Goliath Grouper Suction Feeding Cone A Length (mm) Area (mm2) a 34.9  N/A b  153.6 Cone B Length (mm) Area (mm2) a  34.9 Time 0 c  54.3 N/A d  6.4 e 12.2 Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a  39.5 N/A b  161.3 Cone B Length (mm) Area (mm2) a  39.5 Time 1 c  56.4   d  32.6 e   Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3) 195916.8  Volume (mm3) 84289.7   280206.5 Volume (mm3)   Volume (mm3)        0.132    
View full slide show




Goliath Grouper Suction Feeding Cone A Length (mm) Area (mm2) a 34.9  N/A b  153.6 Cone B Length (mm) Area (mm2) a  34.9 Time 0 c  54.3 N/A d  6.4 e 12.2 Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a  39.5 N/A b  161.3 Cone B Length (mm) Area (mm2) a  39.5 Time 1 c  56.4   d  32.6 e  266.5 Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3) 195916.8  Volume (mm3) 84289.7   280206.5 Volume (mm3)  263547.1 Volume (mm3)  230974.7  494521.7  214315.3  0.132    
View full slide show




Goliath Grouper Suction Feeding Cone A Length (mm) Area (mm2) a 34.9  N/A b  153.6 Cone B Length (mm) Area (mm2) a  34.9 Time 0 c  54.3 N/A d  6.4 e 12.2 Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a  39.5 N/A b  161.3 Cone B Length (mm) Area (mm2) a  39.5 Time 1 c  56.4  3338.8 d  32.6 e  266.5 Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3) 195916.8  Volume (mm3) 84289.7   280206.5 Volume (mm3)  263547.1 Volume (mm3)  230974.7  494521.7  214315.3  0.132 3338.8   
View full slide show




Goliath Grouper Suction Feeding Cone A Length (mm) Area (mm2) a 34.9  N/A b  153.6 Cone B Length (mm) Area (mm2) a  34.9 Time 0 c  54.3 N/A d  6.4 e 12.2 Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a  39.5 N/A b  161.3 Cone B Length (mm) Area (mm2) a  39.5 Time 1 c  56.4  3338.8 d  32.6 e  266.5 Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3) 195916.8  Volume (mm3) 84289.7   280206.5 Volume (mm3)  263547.1 Volume (mm3)  230974.7  494521.7  214315.3  0.132 3338.8   486
View full slide show




Snook Suction Feeding Cone A Length (mm) Area (mm2) a 2.1  N/A b  27.6 Cone B Length (mm) Area (mm2) a  2.1 Time 0 c  12.3 N/A d  1.8 e   Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a  7.0 N/A b  28.9 Cone B Length (mm) Area (mm2) a  7.0 Time 1 c  12.3   d  5.9 e   Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3)   Volume (mm3)     Volume (mm3)   Volume (mm3)        0.036    
View full slide show




Snook Suction Feeding Cone A Length (mm) Area (mm2) a 2.1  N/A b  27.6 Cone B Length (mm) Area (mm2) a  2.1 Time 0 c  12.3 N/A d  1.8 e 73.8  Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a  7.0 N/A b  28.9 Cone B Length (mm) Area (mm2) a  7.0 Time 1 c  12.3  109.4 d  5.9 e  66.0 Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3) 127.5  Volume (mm3)  147.2  274.7 Volume (mm3) 1482.9  Volume (mm3)  1611.5 3094.4   2819.7  0.036  109.4  716
View full slide show




Longjaw Butterfly Fish Suction Feeding Cone A Length (mm) Area (mm2) a 5.0 N/A b 14.9 Cone B Length (mm) Area (mm2) a 5.0 Time 0 c 31.2 N/A d 1.1 e   Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a 5.0 N/A b 14.9 Cone B Length (mm) Area (mm2) a 5.0 Time 1 c 31.6   d 1.1 e   Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3)   Volume (mm3)     Volume (mm3)   Volume (mm3)        0.022    
View full slide show




Longjaw Butterfly Fish Suction Feeding Cone A Length (mm) Area (mm2) a 5.0 N/A b 14.9 Cone B Length (mm) Area (mm2) a 5.0 Time 0 c 31.2 N/A d 1.1 e  8.8 Volume of feeding mechanism before expansion (t0) Cone A Length (mm) Area (mm2) a 5.0 N/A b 14.9 Cone B Length (mm) Area (mm2) a 5.0 Time 1 c 31.6  3.8 d 1.1 e  8.9 Volume of feeding mechanism at maximum expansion (t1) Volume change during feeding event (mm3) Duration of feeding event (sec) Area of mouth at maximum expansion (t1) (mm2) Velocity of water flow into mouth (mm/sec) Volume (mm3) 390.1  Volume (mm3)  1036.0  1426.1 Volume (mm3)  390.1 Volume (mm3)  1049.3  1439.4  13.3  0.022  3.8  159
View full slide show




160 140 120 Uaser spectrum Passive system spectrum 100 80 60 40 20 0 721.0 721.1 721.2 721.3 721.4 721.5 721.6 721.7 721.8 frequency (kHz) A rare occurrence (triple line at 721.25 kHz) . . . 721.9 722.0
View full slide show




// Copy constructor: Makes a deep // // copy of the *this queue. // queue:: queue(const queue &q) { nodePtr copyPreviousPtr, copyPtr, origPtr; if (q.head == NULL) tail = head = NULL; else { head = getNode(q.head->item); copyPreviousPtr = head; origPtr = q.head->next; while (origPtr != NULL) { copyPtr = getNode(origPtr->item); copyPreviousPtr->next = copyPtr; copyPreviousPtr = copyPtr; origPtr = origPtr->next; } tail = copyPreviousPtr; } } // Enqueue function; Inserts item // // into the back of the *this queue. // void queue:: enqueue(const elementType &elt) { nodePtr newPtr = getNode(elt); assert (newPtr != NULL); if (head == NULL) head = tail = newPtr; else { tail->next = newPtr; tail = newPtr; } } // Dequeue function; Removes item // from the front of the *this queue // (assuming such an item exists). elementType queue:: dequeue() { elementType elt; nodePtr oldHead; // isEmpty function; Determines // // if the *this queue is empty. // bool queue:: isEmpty() { return (head == NULL); } } CS 240 // // // assert(head != NULL); oldHead = head; elt = head->item; head = head->next; if (head == NULL) tail = NULL; delete oldHead; return elt; 7
View full slide show




// Copy constructor: Makes a deep // // copy of the *this queue. // queue:: queue(const queue &q) { nodePtr copyPreviousPtr, copyPtr, origPtr; if (q.head == NULL) tail = head = NULL; else { head = getNode(q.head->item); copyPreviousPtr = head; origPtr = q.head->next; while (origPtr != NULL) { copyPtr = getNode(origPtr->item); copyPreviousPtr->next = copyPtr; copyPreviousPtr = copyPtr; origPtr = origPtr->next; } tail = copyPreviousPtr; } } // Enqueue function; Inserts item // // into the back of the *this queue. // void queue:: enqueue(const elementType &elt) { nodePtr newPtr = getNode(elt); assert (newPtr != NULL); if (head == NULL) head = tail = newPtr; else { tail->next = newPtr; tail = newPtr; } } // Dequeue function; Removes item // // from the front of the *this queue // // (assuming such an item exists). // elementType queue:: dequeue() { elementType elt; nodePtr oldHead; // isEmpty function; Determines // // if the *this queue is empty. // bool queue:: isEmpty() { return (head == NULL); } assert(head != NULL); oldHead = head; elt = head->item; head = head->next; if (head == NULL) tail = NULL; delete oldHead; return elt; } CS 240 Chapter 7 - Queues Page 6
View full slide show




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 // Fig. 9.24: cylindertest.cpp // Testing class Cylinder. #include using std::cout; using std::endl; using std::fixed; Outline 63 cylindertest.cpp (1 of 3) #include using std::setprecision; #include "cylinder.h" // Cylinder class definition int main() { // instantiate Cylinder object Cylinder cylinder( 12, 23, 2.5, 5.7 ); // display point coordinates cout << "X coordinate is " << cylinder.getX() << "\nY coordinate is " << cylinder.getY() << "\nRadius is " << cylinder.getRadius() << "\nHeight is " << cylinder.getHeight(); Invoke indirectly inherited Point3 member functions. Invoke directly inherited Circle4 member function. Invoke Cylinder member function.  2003 Prentice Hall, Inc. All rights reserved.
View full slide show




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 // Fig. 9.24: cylindertest.cpp // Testing class Cylinder. #include Outline cylindertest.cpp (1 of 3) using std::cout; using std::endl; using std::fixed; #include using std::setprecision; #include "cylinder.h" // Cylinder class definition int main() { // instantiate Cylinder object Cylinder cylinder( 12, 23, 2.5, 5.7 ); // display point coordinates cout << "X coordinate is " << cylinder.getX() << "\nY coordinate is " << cylinder.getY() << "\nRadius is " << cylinder.getRadius() << "\nHeight is " << cylinder.getHeight(); Invoke indirectly inherited Point3 member functions. Invoke directly inherited Invoke Cylinder member Circle4 member function. function.  2003 Prentice Hall, Inc. All rights reserved. 64
View full slide show