Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть CS204 - Advanced Programming Week 14 [1/2] - INHERITANCE and POLYMORPHISM IN C++

  • Artrim Kjamilji Qamili
  • 2017-05-18
  • 580
CS204 - Advanced Programming Week 14 [1/2] - INHERITANCE and POLYMORPHISM  IN C++
programmingc++sabanci universityinheritancevirtual functionsabstract classespure virtual function
  • ok logo

Скачать CS204 - Advanced Programming Week 14 [1/2] - INHERITANCE and POLYMORPHISM IN C++ бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно CS204 - Advanced Programming Week 14 [1/2] - INHERITANCE and POLYMORPHISM IN C++ или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку CS204 - Advanced Programming Week 14 [1/2] - INHERITANCE and POLYMORPHISM IN C++ бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео CS204 - Advanced Programming Week 14 [1/2] - INHERITANCE and POLYMORPHISM IN C++

EXAMPLES:
1) Inheritance: This example is a simulation of a math quiz that contains a bunch of questions. There are three types of questions in the quiz. The first type of question belongs to 'MathQuestion' class. This class is derived from 'Question' class, i.e. base class here is the Question class. The other two types of questions are objects of 'CarryMathQuestion' and 'HardMathQuestion' classes and both of them are derived from MathQuestion class. If you take a look at these classes, you will see that there are some virtual functions in the base classes and those functions are overridden in the derived classes. Each class is supposed to create a different type of question and these types are explained in the header files. In the main function, firstly we create MathQuestion and CarryMathQuestion objects and assign (derived)CarryMathQuestion object to (base)MathQuestion object. When we call the Description method, we observe that the method of the base class is actually called, which is not the desired behavior. However, when we define MathQuestion variables with pointers and later initialize them with different types of derived classes as we did in the loop, we achieve polymorphism. With the help of this, we create a random type of question at each iteration of the loop and we are still able to call the overridden function.

EXAMPLES AVAILABLE AT:
http://people.sabanciuniv.edu/levi/cs...

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]