Q2) Write C++ code to create class called number. The private data members for this class are nobl (double), nob2 (double) and nob3(double). The member function for this class is: 1- (Constructor)...


Q2) Write C++ code to create class called number. The private data members<br>for this class are nobl (double), nob2 (double) and nob3(double). The member<br>function for this class is:<br>1- (Constructor) that accepts nobl, nob2 and nob3 as arguments (inside<br>the class).<br>Write a main() that create two objects (hl) with initially data members (nobl<br>:13000, nob2:15 and nob3 :19), (kl) with initially data members (nobl:16000,<br>nob2:77 and nob3:2018) and (TI) with initially data members (nobl:15000,<br>nob2:37 and nob3:2020). Finally print the information of the object that has<br>smallest nob2 for these three objects using void display friend function:<br>

Extracted text: Q2) Write C++ code to create class called number. The private data members for this class are nobl (double), nob2 (double) and nob3(double). The member function for this class is: 1- (Constructor) that accepts nobl, nob2 and nob3 as arguments (inside the class). Write a main() that create two objects (hl) with initially data members (nobl :13000, nob2:15 and nob3 :19), (kl) with initially data members (nobl:16000, nob2:77 and nob3:2018) and (TI) with initially data members (nobl:15000, nob2:37 and nob3:2020). Finally print the information of the object that has smallest nob2 for these three objects using void display friend function:

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here