Find Jobs
Hire Freelancers

Virtual Functions

$2-8 USD / hour

Скасований
Опублікований over 10 years ago

$2-8 USD / hour

0. Given the following statements, select which function(s) get used. Both Base and Derived have virtual functions, virtual destructors, copy constructors and operator =. Also, unless otherwise specified default values are used. A. Base* pderived = new Derived; a. Base constructor b. Derived constructor c. Base copy constructor d. Base operator = B. Base base = *pderived; // from part A a. Base default constructor b. Base copy constructor c. Derived default constructor d. Derived copy constructor C. base = *pderived; // from part A & B a. Base copy constructor b. Derived copy constructor c. Base operator = d. Derived operator = D. [login to view URL](); // from part B, function is non-virtual a. Base function b. Derived function E. pderived->function(); // from part A, function is non-virtual a. Base function b. Derived function F. [login to view URL](); // from part B, function is virtual a. Base vfunction b. Derived vfunction G. pderived->vfunction(); // from part A, function is virtual a. Base vfunction b. Derived vfunction H. delete pderived; // from part A a. Base destructor b. Derived destructor 1. Using the derived passenger classes from lab4, write a polymorphic function that can take any of the three types of passengers, and access any of the virtual functions. 2. Show how to have a base class copy constructor get called from a derived class copy constructor: 3. Convert this class to be a generic: class triple { int first; double second; string third; public: triple(int f, double s, string t) : first(f), second(s), third(t): { } int getfirst() { return first; } double getsecond() { return second; } string getthird() { return third; } void setfirst(int f) { first = f; } void setsecond(double s) { second = s; } void setthird(string t) { third = t; } }; 4. Describe, in a short paragraph, the difference between inheritance by value and inheritance by reference.
ID проекту: 5220825

Про проект

2 пропозицій(-ї)
Дистанційний проект
Активність 10 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
2 фрілансерів(-и) готові виконати цю роботу у середньому за $14 USD/год.
Аватарка користувача
I am working with same assignment, meantime ......................................................................
$20 USD за 1 день
5,0 (175 відгуки(-ів))
5,9
5,9
Аватарка користувача
I have a full c++ coding experience to complete.I have been working 5years in c++.Please pm more now.
$8 USD за 20 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED STATES
san jose, United States
5,0
43
Спосіб оплати верифіковано
На сайті з трав. 31, 2012

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.