Example: air traffic controller
Lecture 7 Notes: Object-Oriented ... - MIT OpenCourseWare

Lecture 7 Notes: Object-Oriented ... - MIT OpenCourseWare

Back to document page

us to specify the common code in a Vehicle class, and then specify that the Car and Truck ... Usually we’d want the program to select the correct function at runtime based on which kind of object is pointed to. We can get this behavior by adding the keyword virtual before the method definition: 1 class Vehicle

  Select, Mit opencourseware, Opencourseware, Specify

Download Lecture 7 Notes: Object-Oriented ... - MIT OpenCourseWare


Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Related search queries