Question: Introduction to Computer Science I Project #3 - String manipulation and algorithm development (2 extra credit options) Design and implement a computer based solution (program)


Introduction to Computer Science I Project \#3 - String manipulation and algorithm development (2 extra credit options) Design and implement a computer based solution (program) that meets the following requirements: 1. The program will prompt the user for a date in the format: mm/dd/yyysampleinput:01/15/2021 2. The program will convert the date entered into the following format: Month day, year sample output: January 15, 2021 3. The program will validate the input, and show an error message if the input is in the wrong format, or a month or day is out of range, and prompt again. 4. The program will loop to allow the user to enter another date. 5. Required functions called from main and included in a header file: a. A string function that prompts for a date, validates the input format with error messages, and returns a valid string, or re-prompts for a valid input. b. A void function that receives the valid string, tests the month (1-12) and day (1-28, 30, 31) for the proper range, converts the input string into the proper output format and displays it. Consider using an array for the month names: stringmonths[]={"January","February","March","April","May","June","July","August","September","October","November","December"}; Months with 30 days - April, June, September, and November Lab references: Character Testing Table 10-1, page 558 String to Number Functions Table 10-5, page 580 String Class Operators Table 10-8, page 596 String Class Member Functions Table 10-9, page 598 myString.substr(x, n), page 599 Note: if using stoi for string-to-int conversion, use stoi(myString.c_str()) - page 599 Extra credit options on next page. 1 Assignments submitted after the due date will incur a grade penalty of three (3) points per day after the first day, and will not be accepted more than one (1) week late. Introduction to Computer Science I EXTRA CREDIT \#1 (10 Points): Modify the output function to output red text for errors and green text for success. EXTRA CREDIT \#2 (10 Points): Adjust the range for February to 29 days if it is a leap year. A leap year is evenly divisible by 4 , except if it is evenly divisible by 100 unless it is also evenly divisible by 400. Example: 1700, 1800, and 1900 were not leap years, but 1600 and 2000 were. Grading will be based on meeting all of the lab requirements, adherence to programming standards, operation and accurate output, and programming style including white space and indentation. The grade penalty is three (3) points for each standards violation or missing requirement. 2 Assignments submitted after the due date will incur a grade penalty of three (3) points per day after the first day, and will not be accepted more than one (1) week late
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
