• Use the example on p. 333 to create your own structure related to an overtime pay calculator and define the variables needed within your structure to do those calculations.
• Define and create a base class using the same variables that may serve the same function as the structure.
This is the example:
BOOK Novel =
{
“Paneless Programming”, // Initial value for Title
“I.C. Fingers”, // Initial value for Author
“Gutter Press”, // Initial value for Publisher
1981 // Initial value for Year
};
I am reading the material but not really comprehending it. Can some one help me out here? In the file am I supposed to have a struct and a class or does the class replace the struct?
I started to create a struct but that is as far as I got.
#include <iostream>
using namespace std;
using std::cout;
using std::endl;
using std::cin;
struct Overtime
{
double wage;
double hours;
double otpay;
};

New Topic/Question
Reply




MultiQuote








|