Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please make a c++ program Information may be represented in a variety of different formats. For instance, 2:00 pmn can be represented in military time

please make a c++ program image text in transcribed
image text in transcribed
Information may be represented in a variety of different formats. For instance, 2:00 pmn can be represented in military time as 1400. The most common way we see dates represented in the United States is Month Day, Year (February 15, 2019 or 2/15/2019). Military dates are typically represented as DD MM YYYY 15 02 2019). Another date representation is the Hungarian order, also represented in the standard ISO 8601, which is in the form YYYY-MM-DD. This format can be more easily used computationally. For this project, the user will enter one, single integer that represents a date in the ISO 8601 format. Your input should be in the fonn YYYYMMDD (no dashes no spaces/year 1000 or later, maximum year 9999). From the integer in this form, your program will output the date in the format we are familiar with in the United States, MM/DD/YYYY In your output, you may also omit leading O's (example for February 18, 2019. you may represent it as 2/15 2019, instead of 02/18/2019). Examples If 20191216 is entered 12/16/2019 would be the appropriate output 17010301 is entered 311701 would be the appropriate output In addition to pulling out the month day, and year, you will need to validate the following prior to output 1. An 8-digit number is entered Invalid input should result in an "invalid length" message 2. The month is a valid month [1...12] Invalid input should result man "invalid month" message 3. The day is valid [1.31] Invalid input should result in an "invalid der message Note: For any given input, if the input is valid (based upon the 3 constraits given), output the date in the required format. If the input is invalid, only print the appropriate invalid message (no date) In your Test Plan, you must include the 2 sample test cases from above, at least 2 more valid samples at least 2 invalid length samples, at least 2 invalid month samples, and at least 2 invalid day samples

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

demonstrate the importance of induction training.

Answered: 1 week ago

Question

10. What is meant by a feed rate?

Answered: 1 week ago