Chapter Challenges
7 – Programming
Chapter
_ C++ Practice
Challenges
7 – Programming
Questions
_ C++ &Practice
Challenges
Solutions
Questions
_ _Latest
C++ &Practice
2026_2027
Solutions
Questions
_Update.pdf
Latest&2026_2027
Solutions _Update.pdf
Latest 2026_2027 Update.pdf
Chapter 7 – Programming Challenges |
C++ Practice Questions & Solutions |
Latest 2026/2027 Update
Chapter 7 – Programming
Chapter Challenges
7 – Programming
Chapter
_ C++ Practice
Challenges
7 – Programming
Questions
_ C++ &Practice
Challenges
Solutions
Questions
_ _Latest
C++ &Practice
2026_2027
Solutions
Questions
_Update.pdf
Latest&2026_2027
Solutions _Update.pdf
Latest 2026_2027 Update.pdf
,Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf
1. Date
Design a class called Date that has integer data members to store month, day, and year. The
class should have a three-parameter default constructor that allows the date to be set at the
time a new Date object is created. If the user creates a Date object without passing any
arguments, or if any of the values passed are invalid, the default values of 1, 1, 2001 (i.e.,
January 1, 2001) should be used. The class should have member functions to print the date in
the following formats:
3/15/13
March 15, 2013
15 March 2013
Demonstrate the class by writing a program that uses it. Be sure your program only accepts
reasonable values for month and day. The month should be between 1 and 12. The day
should be between 1 and the number of days in the selected month.
Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf
, Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf
2. Report Heading
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.
Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf Chapter 7_ Programming Challenges.pdf