Question
the book is: C++ HOW TO PROGRAM, ninth edition by Paul Deitel Harvey Deitel The below is the Question and Required Programming Problems: For this
The below is the Question and Required Programming Problems:
For this assignment, you will create a class calledCharArraythat can be used to store an array of characters. Here are the requirements for the class:
The class must have 2 properties: one to represent the length of the array and one to represent the array itself.
The class must have 2 constructors. The first constructor will take the length of the array as a parameter, and the array will be dynamically allocated to the specified length. The contents of the array will be initialized to the first characters of the alphabet. For example, an array of length 3 would be initialized to contain the characters A, B, and C. An array of length 5 would be initialized to contain the characters A, B, C, D, and E. The second constructor will be a copy constructor.
The class must have a destructor.
The class must have a standard "getter" method for the length of the array.
The class must have an overloaded = operator to perform the assignment operation.
The class must have an overloaded == operator to perform the equality comparison operation.
The insertion operator ()>
* So the program codes should be in 3 files: 1-CharArray.h , CharArray.cpp , and 3- TestProgram.cpp
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started