For the class you wrote for exercise 7.40 in § 7.5.1 (p. 291), decide whether any of the constructors might use delegation. If so, write the delegating constructor(s) for your class. If not, look at the list of abstractions and choose one that you think would use a delegating constructor. Write the class definition for that abstraction.
§ 7.5.1 (p. 291)
Exercise 7.36
The following initializer is in error. Identify and fix the problem.
struct X { X (int i, int j): base(i), rem(base % j) { } int rem, base;};Exercise 7.37
Using the version of Sales_data from this section, determine which constructor is used to initialize each of the following variables and list the values of the data members in each object:
Sales_data first_item(cin);int main() { Sales_data next; Sales_data last("9-999-99999-9");}Exercise 7.40
Choose one of the following abstractions (or an abstraction of your own choosing). Determine what data are needed in the class. Provide an appropriate set of constructors. Explain your decisions.
(a) Book
(b) Date
(c) Employee
(d) Vehicle
(e) Object
(f) Tree
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.