Chapter 12: Problem 13
include
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 12: Problem 13
include
All the tools & learning materials you need for study success - in one app.
Get started for free
Suppose you want to change the implementation of the class DigitalTime given in Displays 12.1 and \(12.2 .\) Specifically, you want to change the way the time is recorded. Instead of using the two private variables hour and minute, you want to use a single (private) int variable, which will be called minutes. In this new implementation the private variable minutes will record the time as the number of minutes since the time \(0: 00(\text { that is, since midnight }) .\) So 1: 30 is recorded as 90 minutes, since it is 90 minutes past midnight. Describe how you need to change the interface and implementation files shown in Displays 12.1 and 12.2 You need not write out the files in their entirety; just indicate what items you need to change and how, in a very general way, you would change them.
Would the program in Display 12.8 behave any differently if you replaced the using directive using namespace dtimesavitch; with the following using declaration? using dtimesavitch::DigitalTime;
Can a namespace have more than one namespace grouping?
Consider the program shown in Display \(12.5 .\) Could we use the name greeting in place of big_greeting?
Suppose you define a class in separate files and use the class in a program. Now suppose you change the class implementation file. Which of the following files, if any, need to be recompiled: the interface file, the implementation file, or the application file?
What do you think about this solution?
We value your feedback to improve our textbook solutions.