Question: 5. Lab Exercise -- C++ Inheritance Question 1 - Access Levels Fill in the blanks in the following table which describes the access levels in


5. Lab Exercise -- C++ Inheritance Question 1 - Access Levels Fill in the blanks in the following table which describes the access levels in a derived class's members. i.e. State whether the member's access level is public, private, or protected - or, if it is not accessible! : Question 2 - Programming Exercise Start with the repl code provided to you. Finish the program so that it compiles and runs. The instructions are contained in the C++ file. Your completed program should generate output similar to the following: Two default constructor This program asks for the coordinates of two point in 3D space and calculates their distance. 111 Please enter the xyz coordinates for the first point! Please enter the xyz coordinates for the second point: 2 3 4 TVD constructor with two arguments Distance is 2.24166 The following refreshes your memory on how to calculate the distance between two points in 3D place. Suppose we have the following two points in a 3D space: E The distance between point and point2 is: dis=x-x,)* + : - ;)+(5-3) More details: In main: 1. Create one ThreeD object using the default constructor. Use the setters to set x, y, and z. 2. Create the second ThreeD object using the constructor with three arguments o in the Two class: 1. Add a cout statement to the TwoD default constructor with a message "TwoD default constructor 2. Add a cout statement to other Two constructor with a message "TwoD constructor with two arguments // Filename: Exercise.cpp // Purpose: Exercise for inheritance lab #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
