Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a Class and the Class has the following: Name a String of maximum 50 characters if upon construction of the object or modification of
Create a Class and the Class has the following:
Name
- a String of maximum 50 characters
- if upon construction of the object or modification of the name data member, the name is being set to a String longer than 50 character you need to truncate the string at 46 characters and append the character sequence ... to the end (that is a leading space before the ...)
Date
- A string of the format yyyy-mm-dd
The class should have the following methods
- a constructor which takes values for all 4 attributes and sets them need to ensure that the name string length is not exceeded otherwise do as require
- Need to ensure that incoming value for Date is in the required format If not, leave blank.
in C, C++
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