Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a project consisting of three files - driver program, implementation, and specification - which will allow a month, day, and year between January 1, 1850, and December 31, 2100, to be entered and verified as valid. The solution will satisfy the following requirements:

(1) Create a class called VerifyDate that will contain data members and member functions to meet the listed criteria listed:

The VerifyDate class is used for inputting and validating a date by month, day, and year.

Create private integer data members names: month, day, year.

A default constructor will set the date to 1/1/2000; another constructor may be created with parameters for the month, day, and year.

Create accessor and mutator functions for the date variables.

Create a public function, PrintDate, to print the date in the form mm/dd/year, e.g., 10/22/2000 or 4/08/2011.

Create a private function, IsLeap, which will return true when the year is a leap year and false when it is not.

Create a public function, CheckDate, which will return true when the month, day, and year are valid and false when they are not. For example, to be valid, the day must be appropriate for the given month and/or year, if a leap year. The date must be between January 1, 1850, and December 31, 2100.

(2) Create a specification file containing the declaration of the VerifyDate class.

(3) Create a implementation file containing the member function definitions for VerifyDate.

(4) Create a driver program which uses the VerifyDate class. The main function should prompt the user to input month, day, and year, call the function to display the date, call the function to verify the date and indicate the result to the user, and permit the user to enter another date for verification.

(5) Debug the program.

Supporting Information:

In a leap year, February has 29 days. The following three criteria determine which years will be leap years:

A year which is divisible by 400 is a leap year.

A year not divisible by 400 but which is divisible by 100 is NOT a leap year.

A year not divisible by 100 but which is divisible by 4 is a leap year.

Example: 2000, 2004, and 2008 are leap years. 1900 and 2100 are not leap years.

Days in each month: January = 31, February = 28 or 29, March = 31, April = 30, May = 31, June = 30, July = 31, August = 31, September = 30, October = 31, November = 30, December = 31.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92026849
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question a suppose that a particular algorithm has time

Question : a) Suppose that a particular algorithm has time complexity T(n) = 3 x 2 n , and that executing an implementation of it on a particular machine takes t seconds for n inputs. Now suppose that we are presented wi ...

Do a system model in terms of states inputs outputs next

Do a system model in terms of: States, Inputs, Outputs, Next state (state transition) function, and Readout (output) function. Define the states, inputs and outputs in terms of a description and as formal mathematical se ...

Taskwrite a cc program to emulate a simple calculator that

Task Write a C/C++ program to emulate a simple calculator that can calculate and display the results of performing one of the following arithmetic operations between two integer numbers (+, -, *, /). The Calculator progr ...

Junit test labyou will be creating a junit test class for

JUnit Test Lab You will be creating a JUnit Test Class for Gradebook.java, that has been provided for you.   Add a getScoreSize() method to the Gradebook class which returns scoresSize; Add a toString() method to the Gra ...

Please help with anbspfunctionnbspcodesymbol to convert

Please help with a function  codeSymbol , to convert each mark to a symbol (A, B, C, D, E, F) and a code (7,6,5,4,3,2,1) according to the table below. And call it in the main function. Use the table below to determine th ...

Question suppose a computer using direct mapped cache has

Question Suppose a computer using direct mapped cache has 2 40 bytes of byte-addressable main memory and a cache of 64 blocks, where each block contains 32 bytes. a. how many blocks pf main memory are there? b. what is t ...

Strengths and weaknesses of university that attracts and

Strengths and Weaknesses of University that attracts and distracts students from joining that university with respect to the theory of planned behaviour

A federal agency responsible for enforcing laws governing

A federal agency responsible for enforcing laws governing weights and measures routinely inspect packages to determine whether the weight of the content is at least as great as that advertised on the package. A random sa ...

What are the typical types of risk faced by a firm explain

What are the typical types of risk faced by a firm? Explain each type of risk in details.

Can someone please show me how to do this step by step

Can someone please show me how to do this step by step please. I dont understand any of it 1.) Add a new virtual disk a) Edit VMware player settings to add a new virtual hard disk. b) Start or reboot the virtual machine ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As