Write a Visual Basic program that provides information about a character's
You will have one form, one module, and two classes.
The first class file will represent the Character class. CCharacter (note the additional "C" hungarian notation for class) has the following attributes: first name, last name and birthday. It also has another two attributes (i.e. instances or variables) of the other class in the project.
The other class in the project should be called CSkill and it should represent the value of an individual skill of the character. For this assignment, CSkill need only contain a long integer, a property for reading that long integer, and the Class_Initialize event method in which you will initialize the long integer to some random value between 1 and 100.
The Character class will itself contain two variables of the CSkill class, one representing Offensive Skill and one representing Defensive Skill of the character.
Birthdate must be stored internally in the Character class using variables representing month, day and year and it must be displayed in format mm/dd/yyyy (e.g. 12/31/1985).
After the main form is displayed you are to request from the user the first and last name for the character and change it in the character object. The month day and year of the character are initially randomly generated to create a starting default value (see possible date range in next paragraphs).
You should have one form which displays the first and last name, the birth date of the character, the offensive skill value and the defensive skill value.
There should be two buttons on the form which allow you to change the first and last name respectively to strings the user specifies. There should also be buttons to add a user-supplied number of days, months and years to the randomly generated default value (this should work any time the buttons are clicked). For purposes of this simulation you may assume that there are 12 months in a year, every month has 30 days, and the starting year is 1950 and the last possible birthdate is February 4, 2003. That is, if the new birthdate would be later than 02/04/2003 you must not change the birthdate and you must let the user know that the maximum has already been reached. A birthdate before 01/01/1950 should not be allowed.
All attributes and changes to them must be reflected in the window (see example below).
You are to use properties in the CCharacter class to expose the first name, last name and birthdate (in mm/dd/yyyy format) attributes to the rest of the application. You are also to use properties in the CCharacter class to access properties in the CSkill class when necessary for the character to display its skill(s).
You are to perform any necessary calculations in the module (except for those that should naturally be in the class). Your CCharacter class instance is also in the module.
Your form code is to call functions in the module and update the display as necessary.
Notes and Hints:
Use the InputBox function to read in the name
Use the Msgbox statement to inform the user of any significant events
Try to follow object-oriented design principles and also avoid unnecessary duplicate code
You may use the sample code I have posted on the web site as a starting point.
Extra credit of 2 points will also be given for consistent use of "Hungarian Notation"
The window should look like this when your program starts:
After setting the first and last names it should look like this:
[note the space between : and H]