- This operator+is changing the value in one of the operands, rather than creating a
new VeryShortobject with the sum. The correct way to do this is as follows:
VeryShort VeryShort::operator+ (const VeryShort& rhs)
{
return VeryShort(itsVal + rhs.GetItsVal());
}
Day 11
Quiz
- Procedural programming focuses on functions separate from data. Object-oriented
programming ties data and functionality together into objects, and focuses on the
interaction among the objects. - The phases of object-oriented analysis and design include conceptualization, which
is the single sentence that describes the great idea; analysis, which is the process of
understanding the requirements; and design, which is the process of creating the
model of your classes, from which you will generate your code.
These are followed by implementation, testing, and rollout. - Encapsulation refers to the (desirable) trait of bringing together in one class all the
data and functionality of one discrete entity. - A domain is an area of the business for which you are creating a product.
- An actor is any person or system that is external to the system you are developing
and interacts with the system you are developing. - A use case is a description of how the software will be used. It is a description of
an interaction between an actor and the system itself. - A is true and B is not.
Exercises
- The following diagram provides one possible answer:
842 Appendix D
Computer
System
Keyboard Mouse Monitor CPU
1 1 1..2 1..8
32 0672327112_app_d.qxd 11/19/04 12:30 PM Page 842