Write a programme on date class

Assignment Help Term Paper
Reference no: EM13135928

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<iostream>
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;
}

Reference no: EM13135928

Questions Cloud

Determining us constitution : Explain how the Constitution has shaped political participation in the United States over time, including the impact of the Constitution on activity by policy seekers, on political parties, and on elections.
What mass in grams should the chemist use : A chemist wants to make 6.5 L of a 0.270 M solution. What mass in grams should the chemist use?
Probability tha lenses contains five defective lenses : If there is evidence that percentage of polished lenses that contain surface defects does not exceed 2%. A random sample of 240 lenses contains 5 defective lenses.
Topics in american history : Briefly discuss the strengths and weaknesses of both the Articles of Confederation and the Constitution. What were the concerns with each document?
Write a programme on date class : write a programme on Date Class
What is the standard potential of the unknown m+/m couple : A student was given a standard Fe(s) | Fe2+(aq) half-cell and another halfcell containing an unknown metal M immersed in 1 M MNO3(aq).
How much interest expense results : Keshena Co. borrows $170,000 cash on November 1, 2009, by signing a 120-day, 7% note with a face value of $170,000. How much interest expense results from this note in 2009?
Total manufacturing cost per unit problem : The following department data are avalable :Total materials costs $ 120000 equivalent units of materials 60000 total conversion costs $ 70000 Equivalent units of conversion costs 30000 what is the total manufacturing cost per unit?
American liberalism-american conservatism : Distinguish between American liberalism and American conservatism. In particular, what goals and concerns do each emphasize? Explain in what ways these American idealisms are different from the broader terms of liberalism and conservatism.

Reviews

Write a Review

Term Paper Questions & Answers

  Write a research paper on not bp-gulf of mexico

Write a research paper on NOT BP-Gulf of Mexico or Exxon Valdez

  Company''s global strategy

Explain how the company's global strategy operates. b) What are the nature and drivers of the company global strategies? c) Identify and explain the challenges facing the global strategy in achieving higher performance levels

  Paper on deming theory

Paper on Deming theory: Dr. W. Edwards Deming developed a method for the quality improvement process. He believed that the identification and correction of defects after production is not effective.

  Paper on day-to-day operations

Write a research paper on  Day-to-Day Operations . Industry standards and best practices are explained and utilized where appropriate. If best practices are not used an alternative is recommended.

  Explain ascribed-achieved and master statuses

Write down the 1000 word paper which gives a critical analysis and evaluation of following questions. Write down some of your ascribed, achieved, and master statuses?

  How internet use to communicate patient-specific information

Write the assessment of how Internet, or any other form of electronic communication, may be utilized as the external delivery source in communicating patient-specific information.

  Abstract thoughts as to why mcclelland''s acquired

abstract thoughts as to why McClelland's acquired needs theory is a good motivational method in an organization

  Write a paper on italy and its democracy

Write a Paper on Topic:  Italy and Its Democracy,  Affecting the Event by “The Economist” and  Democracy Appear to Work with including references.

  Research the social determinants of health.

research the social determinants of health. Write a three to five page paper in which you answer the following questions:•What are the social determinants of health?

  Give comments:religion can be associated with positive

give comments:Religion can be associated with positive emotions

  Letter to the editor for current local problem

The Assignment:Write a two to three page (double-spaced) letter to the editor, proposing a solution to a current local problem

  Write advantages of traditional supply relationships

What are the advantages and disadvantages of traditional supply relationships? Please discuss in context of a industry of your choice. Word count 750

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd