Design a class called Heading that has data members to hold the company name and
the report name. A two-parameter default constructor should allow these to be
specified at the time a new Heading object is created. If the user creates a
Heading object without passing any arguments, “ABC Industries” should be used as a
default value for the company name and “Report” should be used as a default for
the report name. The class should have member functions to print a heading in
either one-line format, as shown here:
Pet Pals Payroll Report
or in four-line “boxed” format, as shown here:
*********************************************
Pet Pals
Payroll Report
*********************************************
Try to figure out a way to center the headings on the screen, based on their lengths.
Demonstrate the class by writing a simple program that uses it.
-----------------
When I run the program it saying that heading.h file is not found. How would I be able to fix this. Here is what I got so far;
#include <iostream>
#include "Heading.h"
using namespace std;
Hint: You can edit your post, highlight your code and press the <> formatting button. This will not automatically indent your code. That part is up to you.
You can use the preview button at the bottom to see how it looks.
I found the second link to be the most help.
I see the line: #include "Heading.h" . Post the file so people do not have to guess at what might be there.
It sounds like when the program runs it is looking for the file in the current working directory, but you may have put the file somewhere else.
It also helps if you mention what IDE you are using.