Question: Introduction to Computer Science I 1 Assignments submitted after the due date will incur a grade penalty of three ( 3 ) points per day
Introduction to Computer Science I
Assignments submitted after the due date will incur a grade penalty of three points per day after the
first day, and will not be accepted more than one week late.
Project # String manipulation and algorithm development extra credit options
Design and implement a computer based solution program that meets the following requirements:
The program will prompt the user for a date in the format:
mmddyyyy sample input:
The program will convert the date entered into the following format:
Month day, year sample output: January
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.
The program will loop to allow the user to enter another date.
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 reprompts for a valid input.
b A void function that receives the valid string, tests the month and day
for the proper range, converts the input string into the proper output format and displays it
Consider using an array for the month names:
string monthsJanuary "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December" ;
Months with days April, June, September, and November
Lab references:
Character Testing Table page
String to Number Functions Table page
String Class Operators Table page
String Class Member Functions Table page
myString.substrx n page
Note: if using stoi for stringtoint conversion, use stoimyStringcstr page
Extra credit options on next page.
Introduction to Computer Science I
Assignments submitted after the due date will incur a grade penalty of three points per day after the
first day, and will not be accepted more than one week late.
EXTRA CREDIT # Points: Modify the output function to output red text for errors and green text
for success.
EXTRA CREDIT # Points: Adjust the range for February to days if it is a leap year. A leap year is
evenly divisible by except if it is evenly divisible by unless it is also evenly divisible by
Example: and were not leap years, but and 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 points for each standards violation or missing requirement.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
