Question: We would like for our appointment class to be a bit more friendly. People usually do not use military hour numbers to refer to times.
We would like for our appointment class to be a bit more friendly. People usually do not use military hour numbers to refer to times. It might be easier to create appointments if one could enter a time like "10pm" or "9am". Let's do this by adding a new mutator called setTime(). This mutator should take a single string parameter that consists of an hour number followed by "am" or "pm". It will set the field inside the appointment by examining the characters of the string.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
