![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 16.04.2020 00:05 whitan8586
Challenge activity 7.5.1: Basic constructor definition.
Define a constructor as indicated. Sample output for below program:
Year: 0, VIN: -1
Year: 2009, VIN: 444555666#include using namespace std; class CarRecord { public: void SetYearMade(int originalYear); void SetVehicleIdNum(int vehIdNum); void Print() const; CarRecord(); private: int yearMade; int vehicleIdNum; }; // FIXME: Write constructor, initialize year to 0, vehicle ID num to -1. /* Your solution goes here */ void CarRecord::SetYearMade(int originalYear) { yearMade = originalYear; } void CarRecord::SetVehicleIdNum(int vehIdNum) { vehicleIdNum = vehIdNum; } void CarRecord::Print() const { cout << "Year: " << yearMade << ", VIN: " << vehicleIdNum << endl; } int main() { CarRecord familyCar; familyCar. Print(); familyCar. SetYearMade(2009); familyCar. SetVehicleIdNum(444555666); familyCar. Print(); return 0; }
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 06:30, miguel3maroghi
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 12:00, clevelandjaniya1
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
![image](/tpl/images/cats/informatica.png)
You know the right answer?
Challenge activity 7.5.1: Basic constructor definition.
Define a constructor as indicate...
Define a constructor as indicate...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 07.05.2020 05:10
![Konu](/tpl/images/cats/mat.png)
Mathematics, 07.05.2020 05:10
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mir.png)