Question
DisneyCharacter.h the file that contains the class definition for this exercise o DisneyCharacter.c the source file that contains the method bodies (the code) for the
DisneyCharacter.h the file that contains the class definition for this exercise o DisneyCharacter.c the source file that contains the method bodies (the code) for the class o testDisneyCharacter.c your testharness (main function) which you will use to test your class
The Requirements for this c Program This should be a simple one I want you to write a class definition for a class to be known as DisneyCharacter. Here are the particulars of the class: The Class Particulars The class has the following data members name a string1 of maximum 50 characters if upon construction of the DisneyCharacter 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 creationDate a string of the format yyyy-mm-dd (example value 2012-01-30) numMovies an integer representing the number of movies that the character has been in whichPark a single character value indicating which of the DisneyWorld / DisneyLand parks the character can be found in allowable values are: M for Magic Kingdom S for Disney Studios A for Animal Kingdom E for Epcot C for California Adventure N to indicate the character is not placed The class should have the following methods o a constructor which takes values for all 4 attributes and sets them 1 You can choose to use a char[] for this data member or a string object either way, you still need to be able to limit the maximum length to 50 characters
need to ensure that the name string length is not exceeded otherwise do as required need to ensure that incoming value for whichPark data member is valid. If not, mark the character as Not Placed. need to ensure that incoming value for numMovies is greater than or equal to zero. If not, set to zero. need to ensure that incoming value for creationDate is in the required format. If not, leave blank o a constructor which takes only the name and creationDate attributes and defaults the numMovies attribute to a value of 0, and the whichPark attribute to N need to ensure that the name string length is not exceeded otherwise do as required need to ensure that incoming value for creationDate is in the required format. If not, leave blank no other input validation is necessary in this constructor o a destructor which prints out message to say
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