Create class has three pieces of information as data members

Assignment Help C/C++ Programming
Reference no: EM1360529

Create a class called Date in C++ that includes three pieces of information as data members: month (type int), day (type int) and yaer (type int). your class should have a constructor with three parameters that uses the parameters to initialize the three data members. provide a set and a get function for each data member.

Provide member function displayDate()

The program should contain

- A constructor.
- A set and get function for day ,month ,year .

If user supplies a day not between 1-30 , reset the day to 1. If user also supplies a month not between 1-12, reset the month to 1.

- A member function displayDate():that displays the month, day ,and year separated by forward slashes(/).

Reference no: EM1360529

Questions Cloud

How fast does bullet move after the bullet emerges : The distance to the Andromeda Galaxy is estimated at about 2 x 10(6) light years. A light year is distance traveled by light in one year; if the speed of light is 3 x 10(8) m/s, about how far is it from our galaxy to Andromeda? (1 year =3.15 x 10(..
Relationship between reliability and validity : While we all agree that there is a close relationship between reliability and validity, can you have reliability that doesn't in fact inform the validity assertions of your construct?
Illustrate business cycle expansions : What is meant by "risk premium". Risk premiums on corporate bonds are usually anticyclical; that is, they decrease during business cycle expansions and increase during recessions. Why is this so.
Explain what happened to nortel is similar : Explain What happened to Nortel is similar to what happened to WorldCom and Enron in the early 2000s
Create class has three pieces of information as data members : Create a class called Date in C++ that includes three pieces of information as data members: month (type int), day (type int) and yaer (type int).
Deprivation-deafness and neurological disruption : Please explain how environmental deprivation, deafness, and neurological disruption (e.g., stroke or brain injury) might influence language acquisition, production, or comprehension (with example).
Economic functions financial intermediaries perform : Suppose you have been asked to write a report for a group of new stock brokers about the American Stock Exchange and the NASDAQ.
Explain and identify the needs of stakeholders : Explain and Identify the needs of stakeholders for each opportunity and build a business plan for the most promising opportunity
Should you get it fixed that car requires repairs : You find that the car requires repairs of 1,200 dollars in order to get it to run. Once it is repaired, it will definitely not break down again. Assuming that the car is worth 3,500 dollars after repairs, should you get it fixed.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Determine the meaof the numbers in the array

Determine the mean(average) of the numbers in the array, and output the reslt. Use a subprogram to input the numbers, a function to find the mean.

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Method celsius return celsius equivalent of fahrenheit

Method Celsius return the Celsius equivalent of a Fahrenheit temperature,using the calculation Celsius = 5.0/9.0*(Fahrenheit -32); method Fahrenheit returns the Fahrenheit equivalent of a Celsius temperature, using the calculation  Fahrenheit = 9.0/5..

  A hierarchical jpeg encode decoder for greyscale images

This project is to develop a program that implements a hierarchical JPEG encoder/decoder for greyscale images.

  Develop a basic temperature class

You have to develop a basic temperature class

  Execute tests and repetitions

Read data from standard input and store them in an array, Execute tests and repetitions

  Write a switch-case programming for calculation

How to use C++ to write a switch-case programming for calculation? Test the program for a wide range of possible inputs including division by zero and square root of negative values.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

  Design for storing the maze layout

Design and implement a C++ program for maze layout

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

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