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

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

  Function declare that it can throw an ioexception

Every C++ function that performs file I/O will thus need to either declare that it can throw an IOException, or contain a try-catch-finally block to deal with it. Response?

  Write a program to calculate students average test scores

Write a program to calculate students average test scores

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Computer programming techniques

Construct a program from a design and use appropriate functions

  Write a program that inputs a dollar amount to be printed

Write a program that inputs a dollar amount to be printed on a check and then prints the amount in check-protected format with leading asterisks if necessary

  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.

  Prepare a linux shell

Prepare a linux shell (in other words, write a C/C++ program) that will recursively prompt for input from the user. The shell should prompt as

  Describe the probability of the moves

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

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

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