2. Report Heading Design a class called Heading that has data members to hold the company...

80.2K

Verified Solution

Question

Programming

2. Report Heading Design a class called Heading that has datamembers to hold the company name and the report name. Atwo-parameter default constructor should allow these to bespecified at the time a new Heading object is created. If the usercreates a Heading object without passing any arguments, “ABCIndustries” should be used as a default value for the company nameand “Report” should be used as a default for the report name. Theclass should have member functions to print a heading in eitherone-line format, as shown here: Pet Pals Payroll Report or infour-line “boxed” format, as shown here:******************************************************** Pet PalsPayroll Report******************************************************** Try tofigure out a way to center the headings on the screen, based ontheir lengths. Demonstrate the class by writing a simple programthat uses it.

Answer & Explanation Solved by verified expert
4.2 Ratings (488 Votes)
SOLUTIONI have solve the problem in C code with comments andscreenshot for easy understanding    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students