Chapter 14 IM Answers

Chapter 14 IM Answers - An Introduction to Programming with...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: An Introduction to Programming with C++: Fifth Edition 978-1-4188-3618-4 Chapter 14 Answers CONCEPT LESSON REVIEW QUESTIONS 1. a a class 2. d A class is considered an object. 3. c private 4. c public 5. b only through the public members of the class 6. c member methods, data members 7. b implementation 8. a :: (2 colons) 9. a Animal() 10. b Because the constructor does not return a value, you place the keyword void before the constructors name. 11. a Animal dog; 12. d dog.displayBreed() EXERCISES PENCIL AND PAPER 1. //declaration section class Employee { public: Employee(); Employee(string, double); private: string name; double salary; }; //implementation section Employee::Employee() { name = ; salary = 0.0; } //end of default constructor Employee::Employee(string n, double s) { name = n; salary = s; } //end of constructor 2. //declaration section class Employee { public: Employee(); Employee(string, double); void setEmployee(string, double); private: string name; double salary; };...
View Full Document

This note was uploaded on 03/11/2010 for the course CS 343 taught by Professor Katzman during the Spring '09 term at ITT Tech Tucson.

Page1 / 5

Chapter 14 IM Answers - An Introduction to Programming with...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online