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

  Object-oriented systems is the concept of object

At the heart of all object-oriented systems is the concept of an object. Simply stated, an object is a set of related characteristics and their associated actions.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Write function that randomly produces maze

Write a function mazeGenerator that randomly produces a maze (in C++). The Function should take as arguments a two-dimensional 12-by-12 character array.

  Execute tests and repetitions

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

  Draws a single level for a "rogue­like" computer game

You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..

  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 using c language lab

Computer programming using c language lab

  Determine order in which constructors of class will execute

Suppose that an object of class three enters its scope, so the constructors of theses classes will execute. Determine the order in which the constructors of these classes will execute.

  Write a program using vectors and iterators

Create a program that uses at least two functions that will be called from your main. This program is a number game program that asks for parts of your phone and after manipulating it mathematically, eventually outputs your entire phone number. The d..

  Prepare a program for a retail-mart company

Prepare a program for a company Retail-Mart.

  Write c program that prompts for variable number of integers

Write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out the average.

  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.

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