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

  Generation and evaluation of alternative solutions

Write two pages for "Generation and Evaluation of Alternative Solutions" for Love Canal case. Total 2 Pages for "Generation and Evaluation of Alternative Solutions" for love canal case and including references.

  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 what does autism play in savant syndrome

Write a Paper on Topic:   What does autism play in savant syndrome?

  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.

  Climate change and the north

The essay topic is: Climate Change and the North (with particular Focus on the Inuit).  The purpose of this research paper is to help you engage with current events and contemporary challenges concerning Aboriginal people in Canada.

  Should manitoba adopt a single transferable vote

Write a paper on Topic: Should Manitoba adopt a single transferable vote (STV) electoral system for provincial elections?

  In crisis and reform

In Crisis and Reform:  Current Issues in American Punishment (p. 126), Alexis Durham writes,Please write a reaction paper (4-6 pages in length) to the quote in which you explore global correctional objectives

  Role play as the corporate social responsibility officer

Your Corporate Social Responsibility Officer  Handout and Rubric, This paper gives you an opportunity to "role play" as the Corporate Social Responsibility Officer for an organization of your choice.

  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.

  Gulliver''s view of science

Write on  Gullivers view of science or politics, Jonathan Swift’s view about science is explicitly portrayed in this novel Gulliver’s travel. Jonathan swift says the scientific researches and the experiments will be utter waste of time and it will be..

  Designing a computer interface with visual disability

The topic is about designing a computer interface to people with visual disability (blindness- colour blindness) also , how to apply decision support systems to such interfaces..

  Social issue

Answer the following questions as these general questions pertain to the specific issue selected.The questions that you will cover with respect to your choice of broad social issue in the paper are given.

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