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

  Operationalize sustainability

This assignment is designed for you to analyze an organization and to help develop a plan for that organization to better Operationalize sustainability in the future.

  Research and read about the chapel of notre dame du haut

Research and read about the Chapel of Notre Dame du Haut, designed by Le Corbusier in 1955, located in Ronchamp, France. Many have said the work of Le Corbusier changed as he aged. Compare this building of his, which was done late in his career to an..

  Reflection assignment:reflect on your development as writer

Reflection Assignment: Reflect on your development as a writer since the beginning of the semester in approximately

  Two consequences of globalization for the u.s

What are two consequences of globalization for the U.S.? How are women uniquely affected?

  Determine the types of inventories

Research two (2) manufacturing or two (2) service companies that manage inventory and complete this assignment. Analyze how each of their goods and service design concepts are integrated.

  Case study:

Case Study:

  Key attributes of larry frymire''s leadership style.

1.Identify and explain four (4) key attributes of Larry Frymire's leadership style. 2.Identify and explain four (4) major influences from the tug of war between Frymire's role as leader and the newly elected governor.

  Write a convincing letter of where you would like to visit

Write a convincing letter of where you would like to visit, states the names of the places and what experience it will serve you and convince them you will return in Indirect format by mentioning your ties if possible.

  Psychometric tests

You may reflect on how much value you have gained from interviewing other students and what you have learned about yourself, your performance in the psychometric tests etc.

  Healthcare setting

1) Identify and discuss at least 3 types of conflict found in a healthcare setting. 2) What type of conflict is represented in this scenario? (Justify your response.)

  Create mission,vision, and value statement on own health org

Create actual mission, vision, and value statements for you own health care organization department or one which you someday hope to lead. Explain your thought process in creating these statements. Your explanation should consist of at least 200 word..

  Write a paper on international customs law

Write a paper on International Customs Law, your paper should include topic Provisions on extradition of the 1961 Convention, Provisions on extradition of the 1971 Convention, Similarities and Differences between 1961 Convention and 1971 Convention,

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