Project1 - Thomas Nanke CIS 200-001 CIS 200L-001...

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

View Full Document Right Arrow Icon
Thomas Nanke CIS 200-001 CIS 200L-001 Programming Project #1 Data Abstraction and UML 2/18/08
Background image of page 1

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

View Full DocumentRight Arrow Icon
The Machine type that I used for this program is the PC with Microsoft Windows XP Professional as the operating system. The compiler type is whatever compilers the computers here on campus in the SB-Computing Wing use, which I believe is the Microsoft Visual 6.0 Compiler. Questions 1. Q: In class Vehicle, data member Age is private, while data member Price is protected. Is there any difference between these two data members in terms of information hiding? Why? A: In terms of information hiding, there is indeed a difference between these two data members. Private isn’t quite the same as protected. Because Price is protected, it can still be accessed by members of the derived classes Car and Truck. However, because Age isn’t protected – it’s private – it cannot be accessed by members of Car and Truck. If you were to try and create a setAge() member function in class Car or Truck, it wouldn’t be able to alter Age. But if you wanted to create a setPrice() member function in Car or Truck, the alteration of Price would be allowed. 2.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Project1 - Thomas Nanke CIS 200-001 CIS 200L-001...

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

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