Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a class definition based on the following: (1) The name of the class shoul

ID: 1858837 • Letter: W

Question

Write a class definition based on the following:


(1) The name of the class should be “Tableâ€.


(2) The main function should be able to declare a Table object with any of the following:
Table myTable;
Table myTable("Kitchen");
Table myTable("Kitchen", "Particle Board", 49.95);
Thus, you will need three constructors.


(3) The class should have three private data values. Two are string objects and one is a float variable. The string objects are “purpose†and “material†and the float variable is “costâ€.


(4) The class should have a three accessors and three mutators. So, for example, the main function should be able to include the following commands:
cout << "Please enter the cost: ";
cin >> c;
myTable.setCost(c);
cout << "This " << myTable.getPurpose() << " table "
<< is made of << myTable.getMaterial()
<< " and cost me $" << myTable.getCost()
<< " dollars." << endl;
It should also be able to set the material and the purpose.


(5) The class should have a member function for displaying information about the table. The main function should be able to give this command:
myTable.displayData();
and the following will appear on the screen:
This [purpose] table is made of [material] and costs $[cost] dollars.
where the quantities in brackets will be filled in by the function.


You should submit a minimum of three files, two cpp files and an h file. One cpp file contains your main function. The other cpp file is called Table.cpp and contains the member function definitions. The third file is Table.h and it contains the class command with the prototypes for the member functions.

Explanation / Answer

from datetime import datetime, date, timedelta from roundtable import Table # Create empty table with column headers tbl = Table(['Timestamp', 'Event', 'Root Cause', 'Due Date']) # Add rows to the table tbl.append((datetime(2013,1,2,12,30), 'Error code 129', 'Short on board', date(2013,1,8))) tbl.append({'Event': 'Pairwise testing', 'Due Date': date(2013,1,7)}) # other columns default to None # Build a sorted list of tasks due in the next week task_list = tbl.take(lambda row: row['Due Date'] - date.today()
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote