Please Help with these Problems... Need them done on Matlab ASAP within 45 min.
For this assignment, write all class assignments in their own script or live script. Any other code (like creating objects) can be written in a single live script. So for this assignment, you should be uploading 3 PDF files.
Problem 1:
Copy your class representing the date, we will expand on it here. The date class will be defined by three properties: month (two digits), day (two digits), and year (four digits).
Include the following methods:
1. A set method for the month to only allow numbers 1-12.
2. A set method for the day that only allows numbers 1-31.
3. A set method for the year that only allows numbers 0-9999.
4. A function that will print the date as month/day/year (i.e., 10/1/1999).
Test your class by creating an object and demonstrating all 3 methods. You should demonstrate trying to assign an invalid entry for at least one of the properties.
Problem 2:
Copy your class definition from assignment one for the Cartesian coordinate.
To this class definition, add a constructor. Define it however you wish, but it should have at least 2 cases: one for when they enter at least 3 inputs, and one for when there is less than 3.
In your script, create two objects from this class definition. When you create the first one, demonstrate the constructor working by passing no values for x, y, z. When you create the second one, demonstrate the constructor working by passing values for x, y, z.