Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Dissertation Expert

Date Class: 
Design and Implement a class called Date that has data members to store month (as a number), day, year, and name of the month. The class should have a three-parameter constructor that allows the data to be set at the time of new Data object instances are created. Default constructor that does not take any parameters should set the default values of 1 (month), 1 (day), 2001 (year). The class should have following three member functions to display date following formats

showDate1() should display the date in 1/1/2001format

showDate2() should display the date in January 1, 2001 format

showDate3() should display the date in 1 January 2001format

Also the class should have method to set the date (setDate()). This method should take month, day, and year as parameters and set the object instance data member values. Then your Date class should work with the Assignment5.cpp given below and produces the following output.

1/1/2001
February 12, 2010
29 August 1986

Assignment5.cpp

#include
using namespace std;
#include "Date.h" 
Int main()

{
Date d1;
Date d2(2, 12, 2010);
d1.showDate1();
d2.showDate2();
d1.setDate(8, 29, 1986);
d1.showDate3();
system("pause");
return 0;
}

Dissertation, Writing

  • Category:- Dissertation
  • Reference No.:- M9416113

Have any Question?


Related Questions in Dissertation

Dissertation for a bachelors degree in actuarial

Dissertation for a Bachelor's Degree in Actuarial Science Estimating the Survival Rates of Infants Using Efron’s Algorithm and Cox-Regression Methods Introduction Literature Review Methodology Results and Discussion Conc ...

Assignment - write a dissertation on given

Assignment - Write a Dissertation on given topic. Dissertation Topic: Are Abu Dhabi Public Sector Organizations Ready for Open Innovation? Carry out Primary and Secondary Research to complete the study. Include each and ...

You have just been hired as the chief executive officer ceo

You have just been hired as the chief executive officer (CEO) in a medium-sized organization. The organization is not suffering financially, but neither is it doing as well as it could do. This is largely because the org ...

As a consultant to a leader in a united states corporation

As a consultant to a leader in a United States corporation, you have been hired to lead a diverse team in the development of a global organization. The organization is planting business operations in Greece, Singapore, G ...

  • 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