Function to retrieve each of the private data members

Assignment Help Programming Languages
Reference no: EM1354017

Q1) Write a class called "Date" with month, day and year as the private members. Have a constructor which sets default date to 1st January 2000. Have an accessor function which retrieves each of the private data members. Also have mutator functions which set valid values for date as well as each of the private data members. For any invalid entry, set the date to the default value. Finally have a printDate() function which prints date in the following format: mm-dd-yyyy - pad with 0s wherever necessary.

In your client program have a function called "void IncrementMonth (Date &, int)"

Experiment with setting dates to valid values, invalid values and increment month to 6 months, 12 months and 15 months. Adjust the day and year accordingly. Print out the starting date before you make any increments.

Reference no: EM1354017

Questions Cloud

Find the value added from acquisition of the player : The general manager of the Miami Dolphin a NFL Team is planning paying $2.5 million per year for a Star player, along with a 2$ million up front signing bonus.
Show organizational structure design : Explain the executive, managerial, and administrative organization of a firm and indicates responsibility and hierarchical relationships.
Apollo shoes audit : Obtain an understanding of the company, its internal control, and its audit risk factors (including the risk of material misstatements due to fraud).
How far to the right of the center of the circle : Two charged dust particles exert a force of 8.5 x10-2 N on each other. What will be the force if they are moved so they are only one-seventh as far apart.
Function to retrieve each of the private data members : Write a class called "Date" with month, day and year as private members. Have constructor that sets default date to 1st January 2000. Have accessor function which retrieves each of the private data members.
Explain about reward structure : Potential inadvertent cause may help understand why it is possible for highly ethical leaders to preside over an organization that commits several unethical acts.
Real life case for decision making : Provide three real-life examples of problems for which it would be helpful to go through the problem-solving stages. Discuss your answer to the question concerning this scenario:
Among which of the following us policies and institutions : Among which of the following U.S. policies and institutions may negatively influence U.S. long-run economic growth.
Considering the internal control component : Which of the following describes the internal control component "monitoring of controls"?

Reviews

Write a Review

Programming Languages Questions & Answers

  Create class templates for administrative employess

Create classes or class templates for the following: Administrative Employess are paid a salary, but they also receive a bonus at regular intervals during the year.

  Write a program using binary search approach

Write a program using binary search approach

  Characteristics used for biometric user authentication

You have just been promoted to manager of computer security for large enterprise (XYZ Corporation). Your first project as security manager is to estimate principal physical characteristics used for biometric user authentication.

  Advantages and disadvantages for windows login

The Windows login can be a user or a group with users defined to the group. What do you think the advantages and disadvantages are for each type?

  Program to return the array index having largest savings

Write down function also called from main module - this function will find out and return array index containing the largest savings.

  Benefits of validating the forms

When you are collecting data, you need to consider what data to collect, why you are collecting the data. What are other benefits of validating your forms? How are forms validated? What are some form validation best practices?

  Examine the boxplot

Examine the boxplot and briefly discuss the overall pattern of electricity usage for the households.

  Design interactive program using prewritten methods

Design an interactive program that does the following, using the prewritten methods whenever they are appropriate. Prompt the user for and read a library card number, which must be between 1000 and 9999.

  Design program to accepts account number

Design a program that accepts an account number, the account owner's first and last names, and a balance. Print the projected running total balance for each year for the next 20 years.

  Expression evaluate to true if string variable equals string

Write an expression that evaluates to true if and only if the string variable equals the string "end". Suppose that the value of s were "friend".

  Create child processes

Create child processes

  Program for insertion sort and selection sort algorithms

Write a program involving the insertion sort, merge sort and selection sort algorithms.

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